Created
October 5, 2022 20:17
-
-
Save mkcode/4d8077ddf473d0f4090607637a9b0493 to your computer and use it in GitHub Desktop.
Minimal yet functional config for VSpaceCode with VSCode-Neovim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Our .vscode-neovim directory | |
let data_dir = '~/.vscode-neovim' | |
let plugFile = data_dir . '/plug.vim' | |
" Download plug.vim if it doesn't exist | |
" Then install the plugins in this file | |
if empty(glob(plugFile)) | |
silent execute '!curl -fLo '.plugFile.' --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
execute "autocmd VimEnter * PlugInstall --sync | source " . expand('%:p') | |
endif | |
" Source vim-plug directly since we install it in a non-autoload directory | |
execute "source " . expand(plugFile) | |
call plug#begin(data_dir) | |
Plug 'chaoren/vim-wordmotion' | |
Plug 'justinmk/vim-sneak' | |
Plug 'rhysd/clever-f.vim' | |
Plug 'tpope/vim-surround' | |
call plug#end() | |
" Clever-f config | |
let g:clever_f_across_no_line = 0 | |
let g:clever_f_chars_match_any_signs = 1 | |
let g:clever_f_fix_key_direction = 0 | |
let g:clever_f_mark_direct = 0 | |
let g:clever_f_smart_case = 1 | |
" Vim-sneak config | |
set ignorecase | |
let g:sneak#s_next = 1 | |
let g:sneak#label = 1 | |
let g:sneak#use_ic_scs = 1 | |
map n <Plug>Sneak_; | |
map N <Plug>Sneak_, | |
" VSCode built-in commenting works way better than NERDcommenter | |
" Use C-/ to comment/uncomment | |
" Plug 'preservim/nerdcommenter' | |
" Sync vim yanking with system clipboard | |
set clipboard=unnamedplus | |
" Keybindings | |
let mapleader=";" | |
nnoremap <space> :call VSCodeNotify('vspacecode.space')<CR> | |
xmap <space> :call VSCodeNotify('vspacecode.space')<CR> |
Hey @gdw2 - I abandoned this method a while ago. I found that I was not able to get vscode working reliably with a vim like setup. I’m now happily using neovim.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After I do a
/
search, I expectn
to be able to go to the next search result but it doesn't. Also, the major-mode leader,,
, doesn't work.