nvim: prefer command abbreviations to user-defined commands
This commit is contained in:
parent
95a3ef6463
commit
080ecf0cd9
3 changed files with 29 additions and 23 deletions
|
@ -47,27 +47,27 @@ vim.cmd 'let mapleader = " "'
|
|||
|
||||
-- *sigh*...
|
||||
vim.cmd [[
|
||||
command! Q q
|
||||
command! W w
|
||||
command! Wq wq
|
||||
command! WQ wq
|
||||
command! Wa wa
|
||||
command! WA wa
|
||||
command! Qa qa
|
||||
command! QA qa
|
||||
command! Wqa wqa
|
||||
command! WQa wqa
|
||||
command! WQA wqa
|
||||
cab Q q
|
||||
cab W w
|
||||
cab Wq wq
|
||||
cab WQ wq
|
||||
cab Wa wa
|
||||
cab WA wa
|
||||
cab Qa qa
|
||||
cab QA qa
|
||||
cab Wqa wqa
|
||||
cab WQa wqa
|
||||
cab WQA wqa
|
||||
]]
|
||||
|
||||
-- Go to previous file, but faster
|
||||
vim.cmd 'command! P previous'
|
||||
vim.cmd 'cab P previous'
|
||||
|
||||
-- Macro for opening a new terminal
|
||||
-- Macro for opening a terminal in a new tab
|
||||
vim.cmd 'command! Term tabnew | term'
|
||||
|
||||
-- Genereate ctags
|
||||
vim.cmd 'command! MakeTags !ctags -R .'
|
||||
vim.cmd 'cab MakeTags !ctags -R .'
|
||||
|
||||
-- Write buffer as root
|
||||
vim.cmd 'cmap w!! w !sudo tee > /dev/null %'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue