From 3d149ce17a633344dd94fd3be0ce09c753c634a3 Mon Sep 17 00:00:00 2001 From: Eric Tiedemann Date: Mon, 20 Nov 2023 08:16:36 -0500 Subject: [PATCH] Add VSCODE settings file --- vscode-init.vim | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vscode-init.vim 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