Condition paste toggle on OS
This commit is contained in:
parent
45af25f204
commit
59683c0702
1 changed files with 4 additions and 2 deletions
2
init.lua
2
init.lua
|
@ -89,8 +89,10 @@ vim.opt.directory = os.getenv("HOME") .. "/.var/nvim/swp//"
|
||||||
-- and undo
|
-- and undo
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
|
vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
|
||||||
|
if not vim.fn.has('macunix') then
|
||||||
-- make pastemode more accessible
|
-- make pastemode more accessible
|
||||||
vim.opt.pastetoggle = "<F2>"
|
vim.opt.pastetoggle = "<F2>"
|
||||||
|
end
|
||||||
|
|
||||||
-- save when moving away
|
-- save when moving away
|
||||||
vim.api.nvim_create_autocmd("FocusLost", {pattern = "*", command = "wa"})
|
vim.api.nvim_create_autocmd("FocusLost", {pattern = "*", command = "wa"})
|
||||||
|
|
Loading…
Reference in a new issue