diff --git a/vscode-init.vim b/vscode-init.vim new file mode 100644 index 00000000..8e688cf5 --- /dev/null +++ b/vscode-init.vim @@ -0,0 +1,44 @@ +lua require('plugins') + +nnoremap :noh +nnoremap z. +nnoremap z. + +xmap ga (EasyAlign) +nmap ga (EasyAlign) + + +nnoremap +let mapleader = " " +nnoremap f /Nzz " search for word under cursor +noremap c "+y +noremap p "+p +nmap v :vsplit +nmap w +nmap h :split +nmap o :only + +" Align based on next key hit +noremap a (EasyAlign)ip + +" Get folding working with vscode neovim plugin + if(exists("g:vscode")) + nnoremap zM :call VSCodeNotify('editor.foldAll') + nnoremap zR :call VSCodeNotify('editor.unfoldAll') + nnoremap zc :call VSCodeNotify('editor.fold') + nnoremap zC :call VSCodeNotify('editor.foldRecursively') + nnoremap zo :call VSCodeNotify('editor.unfold') + nnoremap zO :call VSCodeNotify('editor.unfoldRecursively') + nnoremap za :call VSCodeNotify('editor.toggleFold') + + function! MoveCursor(direction) abort + if(reg_recording() == '' && reg_executing() == '') + return 'g'.a:direction + else + return a:direction + endif + endfunction + + nmap j MoveCursor('j') + nmap k MoveCursor('k') + endif