Skip to content

Commit

Permalink
UPD vimrc: block mgmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamut3D committed Dec 8, 2023
1 parent 6c6f8be commit 99bdb77
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ansible/roles/vim/templates/.vimrc.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 <C-j> :m .+1<CR>
nnoremap <C-k> :m .-2<CR>
inoremap <C-j> <Esc>:m .+1<CR>gi
inoremap <C-k> <Esc>:m .-2<CR>gi
vnoremap <C-j> :m '>+1<CR>gv
vnoremap <C-k> :m '<-2<CR>gv

:set shiftwidth=1
nnoremap <C-h> :<1<CR>
nnoremap <C-l> :>1<CR>
inoremap <C-h> <Esc>:<1<CR>gi
inoremap <C-l> <Esc>:>1<CR>gi
vnoremap <C-h> < gv
vnoremap <C-l> > gv

call plug#begin('~/.vim/plugged')

Plug 'mzlogin/vim-markdown-toc'
Expand Down
16 changes: 16 additions & 0 deletions docs/content/kb/vim.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
" point to additional words for spellchecking
set spellfile=~/.vim/spell/en.utf-8.add
" Set line moves with Ctrl +hjkl
nnoremap <C-j> :m .+1<CR>
nnoremap <C-k> :m .-2<CR>
inoremap <C-j> <Esc>:m .+1<CR>gi
inoremap <C-k> <Esc>:m .-2<CR>gi
vnoremap <C-j> :m '>+1<CR>gv
vnoremap <C-k> :m '<-2<CR>gv

:set shiftwidth=1
nnoremap <C-h> :<1<CR>
nnoremap <C-l> :>1<CR>
inoremap <C-h> <Esc>:<1<CR>gi
inoremap <C-l> <Esc>:>1<CR>gi
vnoremap <C-h> < gv
vnoremap <C-l> > 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
Expand Down

0 comments on commit 99bdb77

Please sign in to comment.