Nvim : <Leader-z> now ignores non-writable buffers.
This commit is contained in:
parent
7aee46df7c
commit
221ffe68ca
|
@ -1,9 +1,15 @@
|
|||
require('key/Rekey')
|
||||
|
||||
-- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim.
|
||||
function bye()
|
||||
pcall(vim.cmd, "wa")
|
||||
vim.cmd[[qa!]]
|
||||
end
|
||||
|
||||
rekey_normal('<Leader>.', '@:') -- repeat command.
|
||||
rekey_visual('<Leader>.', '@:') -- repeat command.
|
||||
rekey_normal('zz', '<cmd>wa<cr>') -- save all files.
|
||||
rekey_normal('<Leader>z', '<cmd>wqa<cr>') -- save & quit all.
|
||||
rekey_normal('<Leader>z', '<cmd>lua bye()<cr>') -- save & quit all.
|
||||
rekey_normal('<Leader>v', 'v') -- visual select (duplicate).
|
||||
rekey_normal('gh', '0') -- go left.
|
||||
rekey_normal('gl', '$') -- go right.
|
||||
|
|
Reference in a new issue