Nvim : <Leader-z> now ignores non-writable buffers.
This commit is contained in:
parent
7acb122e26
commit
02f37e515c
|
@ -1,15 +1,21 @@
|
||||||
require('key/Rekey')
|
require('key/Rekey')
|
||||||
|
|
||||||
rekey_normal('<Leader>.', '@:') -- repeat command.
|
-- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim.
|
||||||
rekey_visual('<Leader>.', '@:') -- repeat command.
|
function bye()
|
||||||
rekey_normal('zz', '<cmd>wa<cr>') -- save all files.
|
pcall(vim.cmd, "wa")
|
||||||
rekey_normal('<Leader>z', '<cmd>wqa<cr>') -- save & quit all.
|
vim.cmd[[qa!]]
|
||||||
rekey_normal('<Leader>v', 'v') -- visual select (duplicate).
|
end
|
||||||
rekey_normal('gh', '0') -- go left.
|
|
||||||
rekey_normal('gl', '$') -- go right.
|
rekey_normal('<Leader>.', '@:') -- repeat command.
|
||||||
rekey_normal('gj', 'G') -- go bottom.
|
rekey_visual('<Leader>.', '@:') -- repeat command.
|
||||||
rekey_normal('gk', 'gg') -- go top.
|
rekey_normal('zz', '<cmd>wa<cr>') -- save all files.
|
||||||
rekey_normal('U', '<C-r>') -- redo.
|
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.
|
||||||
|
rekey_normal('gj', 'G') -- go bottom.
|
||||||
|
rekey_normal('gk', 'gg') -- go top.
|
||||||
|
rekey_normal('U', '<C-r>') -- redo.
|
||||||
|
|
||||||
rekey_normal(';', ':') -- remap ; to :.
|
rekey_normal(';', ':') -- remap ; to :.
|
||||||
rekey_visual(';', ':') -- remap ; to :.
|
rekey_visual(';', ':') -- remap ; to :.
|
||||||
|
|
Reference in a new issue