Skip to content

Instantly share code, notes, and snippets.

@igorbabko
Created May 28, 2022 21:39
Show Gist options
  • Save igorbabko/e1eba1bc1b893ab121580020ff5c3b15 to your computer and use it in GitHub Desktop.
Save igorbabko/e1eba1bc1b893ab121580020ff5c3b15 to your computer and use it in GitHub Desktop.
Neovim config for VSCode Neovim extension
let mapleader=" "
noremap j h
noremap k j
noremap l k
noremap ; l
noremap ' ;
syntax on
set hlsearch
set guicursor=a:hor20
set ignorecase
set smartcase
nnoremap <Esc> :nohlsearch<Bar>:echo<CR>
map <leader>s :source ~/.config/nvim/init.vim<CR>
map <leader>ev :e ~/.config/nvim/init.vim<CR>
call plug#begin()
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
call plug#end()
" needed to toggle comment selection in vscode
xmap <C-/> <Plug>VSCodeCommentarygv
nmap <C-/> <Plug>VSCodeCommentaryLine
" skip folds
nmap k gj
nmap l gk
" map black whole register
noremap \ "_
" sync system clipboard
set clipboard=unnamedplus
" map redo
noremap U <C-r>
@igorbabko
Copy link
Author

igorbabko commented May 28, 2022

Neovim config path on macOS: ~/config/nvim/init.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment