added vscode extensions
This commit is contained in:
parent
7cde0829be
commit
26e2a50441
316 changed files with 37301 additions and 0 deletions
31
.vscode/extensions/asvetliakov.vscode-neovim-0.0.82/vim/vscode-insert.vim
vendored
Normal file
31
.vscode/extensions/asvetliakov.vscode-neovim-0.0.82/vim/vscode-insert.vim
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
function! s:vscodePrepareMultipleCursors(append, skipEmpty)
|
||||
let m = mode()
|
||||
if m ==# 'V' || m ==# "\<C-v>"
|
||||
let b:notifyMultipleCursors = 1
|
||||
let b:multipleCursorsVisualMode = m
|
||||
let b:multipleCursorsAppend = a:append
|
||||
let b:multipleCursorsSkipEmpty = a:skipEmpty
|
||||
" We need to start insert, then spawn cursors otherwise they'll be destroyed
|
||||
" using feedkeys() here because :startinsert is being delayed
|
||||
call feedkeys("\<Esc>i", 'n')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:vscodeNotifyMultipleCursors()
|
||||
if exists('b:notifyMultipleCursors') && b:notifyMultipleCursors
|
||||
let b:notifyMultipleCursors = 0
|
||||
call VSCodeExtensionNotify('visual-edit', b:multipleCursorsAppend, b:multipleCursorsVisualMode, line("'<"), line("'>"), col("'>"), b:multipleCursorsSkipEmpty)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup MultipleCursors
|
||||
autocmd!
|
||||
autocmd InsertEnter * call <SID>vscodeNotifyMultipleCursors()
|
||||
augroup END
|
||||
|
||||
" Multiple cursors support for visual line/block modes
|
||||
xnoremap ma <Cmd>call <SID>vscodePrepareMultipleCursors(1, 1)<CR>
|
||||
xnoremap mi <Cmd>call <SID>vscodePrepareMultipleCursors(0, 1)<CR>
|
||||
xnoremap mA <Cmd>call <SID>vscodePrepareMultipleCursors(1, 0)<CR>
|
||||
xnoremap mI <Cmd>call <SID>vscodePrepareMultipleCursors(0, 0)<CR>
|
||||
Loading…
Add table
Add a link
Reference in a new issue