diff --git a/ansible/roles/vim/templates/.vimrc.j2 b/ansible/roles/vim/templates/.vimrc.j2 index f6c4a26..43c2ce1 100644 --- a/ansible/roles/vim/templates/.vimrc.j2 +++ b/ansible/roles/vim/templates/.vimrc.j2 @@ -25,6 +25,22 @@ set spellfile=~/.vim/spell/en.utf-8.add " improve autocomplete behavior based on https://vim.fandom.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE set completeopt=longest,menuone +" Set line moves with Ctrl +hjkl +nnoremap :m .+1 +nnoremap :m .-2 +inoremap :m .+1gi +inoremap :m .-2gi +vnoremap :m '>+1gv +vnoremap :m '<-2gv + +:set shiftwidth=1 +nnoremap :<1 +nnoremap :>1 +inoremap :<1gi +inoremap :>1gi +vnoremap < gv +vnoremap > gv + call plug#begin('~/.vim/plugged') Plug 'mzlogin/vim-markdown-toc' diff --git a/docs/content/kb/vim.md b/docs/content/kb/vim.md index 6760485..96901a6 100644 --- a/docs/content/kb/vim.md +++ b/docs/content/kb/vim.md @@ -42,6 +42,22 @@ vnoremap "hy:%s/h//gc " point to additional words for spellchecking set spellfile=~/.vim/spell/en.utf-8.add +" Set line moves with Ctrl +hjkl +nnoremap :m .+1 +nnoremap :m .-2 +inoremap :m .+1gi +inoremap :m .-2gi +vnoremap :m '>+1gv +vnoremap :m '<-2gv + +:set shiftwidth=1 +nnoremap :<1 +nnoremap :>1 +inoremap :<1gi +inoremap :>1gi +vnoremap < gv +vnoremap > gv + " improve autocomplete behavior based on https://vim.fandom.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE " enable vim-plugin