" Don't get into insert mode after adding a line with o/O nnoremap o o nnoremap O O " Ctrl-Backspace deletes the previous word in insert mode. inoremap inoremap " Ctrl+s; Ctrl+c, Ctrl+v, Ctrl+x; Ctrl+z, Ctrl+r; Ctrl+a bindings that work on GUI applications " Partly taken from: https://gist.github.com/jshih/3423345 imap :wi nmap :w "imap An impossible dream vmap "+yi vmap c"+P imap "+Pi vmap "+c imap ui imap i map ggVG " Show all buffers and be able to just type in the number of the buffer map :set nomore:ls:set more:b " Move a line up and down with Alt+k and Alt-j execute "set =\ej" nnoremap :m+1 execute "set =\ek" nnoremap :m-2 " Make session file nnoremap :mksession! .vim-session " Show who edited the current line from git history nnoremap :call gitblame#echo() " Open lazygit in a new tab with = nnoremap = :tab ter ++close lazygit " Cyrillic (Bulgarian yawerty layout) support ca в w ca ва wa ca ь x ca ьа xa " Make x and xa just save and quit without saving. This allows for closing all tabs and terminals. ca x w q! ca xa wa qa! " Open a terminal vim tab with tt and open a blank tab with te ca tt tab ter ca te tabe " Omni completion {{{ " Omni completion supports C, HTML, CSS, JavaScript, PHP, Python, Ruby, SQL, XML set omnifunc=syntaxcomplete#Complete " Completion for all supported languages " Do omni completion from Ctrl+Space inoremap " Thanks to: https://vim.fandom.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE " set completeopt=longest,menuone " [ The following are disabled, because they conflict with delimitMate's autobracket feature ] " inoremap pumvisible() ? "\" : "\u\" " inoremap pumvisible() ? '' : '=pumvisible() ? "\Down>" : ""' " "Disables" arrow navigation in completion menu inoremap pumvisible() ? '' : '' inoremap pumvisible() ? '' : '' " Pressing tab goes from top to bottom let g:SuperTabContextDefaultCompletionType = "" " }}}