" vim: set foldmethod=marker foldmarker=[[[,]]] foldlevel=0 nomodeline : set noloadplugins " [[[ General Settings " and let mapleader = "\" let maplocalleader = "\\" " General Settings ]]] " [[[ General Keymaps " beginning/end of line nnoremap B ^ nnoremap E $ onoremap B ^ onoremap E $ xnoremap B ^ xnoremap E $ " save nnoremap s :call VSCodeNotify('workbench.action.files.save') nnoremap js :call VSCodeNotify('workbench.action.files.saveWithoutFormatting') " yank from the cursor position to the end of the line nnoremap Y y$ " yank/paste with system clipboard nnoremap y "+y vnoremap y "+y nnoremap Y "+y$ vnoremap Y "+y$ nnoremap p "+p vnoremap p "+p nnoremap P "+P vnoremap P "+P " General Keymaps ]]] " [[[ Plugins " install vim-plug automagically let plug_path = stdpath('data') . '/site/pack/vscode/opt/plug/autoload/plug.vim' if empty(glob(plug_path)) silent execute '!curl -fLo ' . plug_path . ' --create-dirs ' \ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' autocmd VimEnter * packadd plug | PlugInstall --sync | execute 'source ' . expand('') else packadd plug endif call plug#begin(stdpath('data') . '/site/pack/vscode/opt') Plug 'junegunn/vim-plug' Plug 'tpope/vim-sensible' Plug 'tpope/vim-surround' call plug#end() " [[[ Plugin: vscode-neovim " remove move editor mappings nunmap xunmap nunmap xunmap nunmap xunmap nunmap xunmap " vim-commentary equivalent xmap gc VSCodeCommentary nmap gc VSCodeCommentary omap gc VSCodeCommentary nmap gcc VSCodeCommentaryLine " Plugin: vscode-neovim ]]] " Plugins ]]] " [[[ VSCode Keymaps noremap e :call VSCodeNotify('workbench.action.toggleSidebarVisibility') " window navigation nnoremap j :call VSCodeNotify('workbench.action.navigateDown') xnoremap j :call VSCodeNotify('workbench.action.navigateDown') nnoremap k :call VSCodeNotify('workbench.action.navigateUp') xnoremap k :call VSCodeNotify('workbench.action.navigateUp') nnoremap h :call VSCodeNotify('workbench.action.navigateLeft') xnoremap h :call VSCodeNotify('workbench.action.navigateLeft') nnoremap l :call VSCodeNotify('workbench.action.navigateRight') xnoremap l :call VSCodeNotify('workbench.action.navigateRight') " window split nnoremap - :New xnoremap - :New nnoremap \ :Vnew xnoremap \ :Vnew " code navigation nmap gd :call VSCodeNotify('editor.action.revealDefinition') nmap gy :call VSCodeNotify('editor.action.goToTypeDefinition') nmap gi :call VSCodeNotify('editor.action.goToImplementation') nmap gr :call VSCodeNotify('editor.action.goToReferences') " rename symbol nmap rn :call VSCodeNotify('editor.action.rename') " VSCode Keymaps ]]]