commit 39bccc10dc710af9a04e6cc5eb16e3f9b22516c5
parent 13867a1b216b15085c4afb94772c7cea13b55e37
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Sun, 30 Jan 2022 19:09:15 +0100

Vim maps use <Cmd> instead of colon

Diffstat:
M.config/nvim/init.vim | 30+++++++++++++++---------------
M.config/nvim/lua/plugins.lua | 12++++++------
2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -73,7 +73,7 @@ augroup vimrc autocmd FileType markdown,vimwiki set shiftwidth=2 " number of spaces for indentation autocmd FileType mail set textwidth=72 autocmd FileType c set noexpandtab - autocmd FileType help nnoremap q :q<CR> + autocmd FileType help nnoremap q <Cmd>q<CR> augroup END " netrw config @@ -94,26 +94,26 @@ noremap <C-k> <C-w>k noremap <C-l> <C-w>l " resize pane -noremap <silent> <C-Up> :resize +3<CR> -noremap <silent> <C-Down> :resize -3<CR> -noremap <silent> <C-Left> :vertical resize +3<CR> -noremap <silent> <C-Right> :vertical resize -3<CR> +noremap <silent> <C-Up> <Cmd>resize +3<CR> +noremap <silent> <C-Down> <Cmd>resize -3<CR> +noremap <silent> <C-Left> <Cmd>vertical resize +3<CR> +noremap <silent> <C-Right> <Cmd>vertical resize -3<CR> " undo nnoremap U <C-r> " search and replace all -nnoremap S :%s//g<Left><Left> +nnoremap S <Cmd>%s//g<Left><Left> " edit/reload config file -nnoremap <silent> <Leader>v :e $MYVIMRC<CR> -nnoremap <silent> <Leader>r :so $MYVIMRC<CR> +nnoremap <silent> <Leader>v <Cmd>e $MYVIMRC<CR> +nnoremap <silent> <Leader>r <Cmd>so $MYVIMRC<CR> " edit file -nnoremap <Leader>e :Lexplore<CR> +nnoremap <Leader>e <Cmd>Lexplore<CR> " clean search highlights -nnoremap <silent> <Leader>/ :nohlsearch<CR> +nnoremap <silent> <Leader>/ <Cmd>nohlsearch<CR> " space to toggle fold nnoremap <Space> za @@ -134,7 +134,7 @@ function! ToggleMouse() echo "Mouse desactivated" endif endfunc -nnoremap <Leader>m :call ToggleMouse()<CR> +nnoremap <Leader>m <Cmd>call ToggleMouse()<CR> " /shortcuts }}} @@ -193,10 +193,10 @@ set laststatus=2 " activate status line " templates {{{ -nnoremap <Leader>ts :-1read $XDG_CONFIG_HOME/nvim/templates/shebang.sh<CR>:w<CR>:e<CR> -nnoremap <Leader>tp :-1read $XDG_CONFIG_HOME/nvim/templates/shebang.py<CR>:w<CR>:e<CR> -nnoremap <Leader>tb :-1read $XDG_CONFIG_HOME/nvim/templates/shebang.bash<CR>:w<CR>:e<CR> -nnoremap <Leader>tw :lua telescope_vimwiki_categories_picker()<CR> +nnoremap <Leader>ts <Cmd>-1read $XDG_CONFIG_HOME/nvim/templates/shebang.sh<CR><Cmd>w<CR><Cmd>e<CR> +nnoremap <Leader>tp <Cmd>-1read $XDG_CONFIG_HOME/nvim/templates/shebang.py<CR><Cmd>w<CR><Cmd>e<CR> +nnoremap <Leader>tb <Cmd>-1read $XDG_CONFIG_HOME/nvim/templates/shebang.bash<CR><Cmd>w<CR><Cmd>e<CR> +nnoremap <Leader>tw <Cmd>lua telescope_vimwiki_categories_picker()<CR> " /templates }}} diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua @@ -28,23 +28,23 @@ end do -- telescope - vim.cmd "nnoremap <Leader>f :Telescope find_files<CR>" - vim.cmd "nnoremap <Leader>g :Telescope git_files<CR>" - vim.cmd "nnoremap <Leader>b :Telescope buffers<CR>" - vim.cmd "nnoremap <Leader>h :Telescope help_tags<CR>" + vim.cmd "nnoremap <Leader>f <Cmd>Telescope find_files<CR>" + vim.cmd "nnoremap <Leader>g <Cmd>Telescope git_files<CR>" + vim.cmd "nnoremap <Leader>b <Cmd>Telescope buffers<CR>" + vim.cmd "nnoremap <Leader>h <Cmd>Telescope help_tags<CR>" require("telescope-pickers") end do -- vimwiki vim.cmd "nmap <Leader>t <Plug>VimwikiVSplitLink" - vim.cmd "nnoremap <Leader>wha :VimwikiAll2HTML<CR>" + vim.cmd "nnoremap <Leader>wha <Cmd>VimwikiAll2HTML<CR>" vim.cmd [[ augroup paq_vimwiki autocmd! autocmd FileType vimwiki - \ autocmd! paq_vimwiki BufWritePost <buffer> silent :Vimwiki2HTML + \ autocmd! paq_vimwiki BufWritePost <buffer> silent <Cmd>Vimwiki2HTML augroup END ]]