Vscode-neovim: bind K and gO to vscode actions

Created on 19 Dec 2019  路  2Comments  路  Source: asvetliakov/vscode-neovim

enhancement

Most helpful comment

@asvetliakov This plugin is awesome 馃殌

I found out that i could call any vscode command from my vimrc.
Even with arguments!
I think the above should be mentioned in the readme.

nnoremap K  :<C-u>call VSCodeCall('editor.action.showHover')<CR>
nnoremap ? :<C-u>call VSCodeCall('workbench.action.findInFiles', { 'query': expand('<cword>')})<CR>

All 2 comments

@asvetliakov This plugin is awesome 馃殌

I found out that i could call any vscode command from my vimrc.
Even with arguments!
I think the above should be mentioned in the readme.

nnoremap K  :<C-u>call VSCodeCall('editor.action.showHover')<CR>
nnoremap ? :<C-u>call VSCodeCall('workbench.action.findInFiles', { 'query': expand('<cword>')})<CR>

@aminroosta
From readme 馃槃

It's possible to call vscode commands from neovim. See VSCodeCall/VSCodeNotify vim functions in vscode-neovim.vim file. VSCodeCall is blocking request, while VSCodeNotify is not

Probably need to move it to own section for better visibility.

Also there are VSCodeCallRange/VSCodeNotifyRange in case if you need to specify some visual range for vscode command

Generally use VSCodeNotify unless you're really needing a blocking call

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pieterdd picture pieterdd  路  4Comments

kkorus picture kkorus  路  4Comments

DrakeXiang picture DrakeXiang  路  5Comments

haberdashPI picture haberdashPI  路  3Comments

asvetliakov picture asvetliakov  路  5Comments