问题
I am used to navigating code in vim using cscope/ctags style Ctrl + [ for function definition and Ctrl + t to go back. With Intellij Idea's vim plugin enabled, I am still able to do that. However, other cscope commands like Ctrl + \ s don't seem to work.
I could try adding .ideavim to add my own mapping, but I am looking for something that does not require this step.
回答1:
cscope
is not one of the emulated plugins. You can use IntelliJ IDEA navigation to reach that.
Also, you can map keys to standard idea actions.
For example, to get all callers of the method you can execute Call Hierarchy action. You can map this action to ctrl-\ s
as follows:
- Search for actions with
hierarchy
pattern::actionlist hierarchy
- Place
map <C-\>s :action CallHierarchy<CR>
to your.ideavimrc
If you want this behavior to be the default, you can create a feature request.
来源:https://stackoverflow.com/questions/56386205/cscope-ctags-navigation-in-intellij-idea-vim-plugin