1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00

vim: change shortcuts to edit configs in vsplit

This commit is contained in:
bretello 2024-06-19 12:08:25 +02:00
parent 8214de3d65
commit ce72565b91
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
2 changed files with 8 additions and 6 deletions

View File

@ -7,12 +7,12 @@ nmap <leader>w :w!<CR>
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
" nmap <leader>W :w!<CR>
"Reload vimrc on config change
map <leader>e :e! ~/.vimrc<CR>
map <leader>ef :e! $DOTFILES/vim/functions.vim<CR>
map <leader>ec :e! $DOTFILES/vim/plugins_config.vim<CR>
map <leader>es :e! $DOTFILES/vim/shortcuts.vim<CR>
map <leader>ep :e! $DOTFILES/vim/plugs.vim<CR>
" config editing
map <leader>e :vsplit ~/.vimrc<CR>
map <leader>ef :vsplit $DOTFILES/vim/functions.vim<CR>
map <leader>ec :vsplit $DOTFILES/vim/plugins_config.vim<CR>
map <leader>es :vsplit $DOTFILES/vim/shortcuts.vim<CR>
map <leader>ep :vsplit $DOTFILES/vim/plugs.vim<CR>
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<CR>

View File

@ -111,9 +111,11 @@ augroup iptables
augroup END
augroup vimconfig
" Reload vimrc on config change
autocmd! bufwritepost ~/.vimrc source ~/.vimrc
autocmd! bufwritepost $DOTFILES/vim/vimrc source ~/.vimrc
autocmd! bufwritepost $DOTFILES/vim/shortcuts.vim source ~/.vimrc
" Install/Update plugs on change
autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugInstall
autocmd! bufwritepost $DOTFILES/vim/plugs.vim PlugUpdate
augroup END