nvim: prefer command abbreviations to user-defined commands

This commit is contained in:
PowerUser64 2022-08-30 13:40:38 -07:00
parent 95a3ef6463
commit 080ecf0cd9
3 changed files with 29 additions and 23 deletions

View file

@ -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 %'