-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvscode-init.vim
37 lines (30 loc) · 1.31 KB
/
vscode-init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
" Config file for vscode neovim plugin:
" https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim
" Vim pluggin manager requirement:
" https://github.com/junegunn/vim-plug
call plug#begin()
" Delete, change and add surroundings
Plug 'tpope/vim-surround'
" Text objects enhancement
Plug 'wellle/targets.vim'
call plug#end()
" Auto swith to English input method on InsertLeave
if has('win32')
let imselect = stdpath('config') . '\windows\im-select.exe'
autocmd InsertLeave * :silent exe '!'.imselect.' 1033'
elseif has('wsl')
let username = trim(system('whoami'))
let imselect = '/mnt/c/Users/'. username
\. '/AppData/Local/nvim/windows/im-select.exe'
autocmd InsertLeave * :silent exe '!'.imselect.' 1033'
elseif has('mac')
autocmd InsertLeave * :silent exe '!im-select com.apple.keylayout.ABC'
endif
" Use vscode clipbard API
let g:clipboard = g:vscode_clipboard
set ignorecase " Ignore upper case or lower case when searching
set smartcase " Override 'ignorecase' if the search pattern contains upper case chars
set nohls " Don't highlight searching result
set fileformat=unix " Set end of line style to LF
set clipboard+=unnamedplus " Share system clipboard
set shellslash " Use slash instead of backslash in paths