英文:
IdeaVim and Neovim shared keyboard shortcuts map
问题
我同时使用:
- 带有LSP的Neovim,等等(使用LazyVim配置,但愿意改用另一种现代配置)
- 带有IdeaVim的IntelliJ,主要用于Java/Kotlin与Spring等
是否有人提出了一组可以在两者之间共享的键映射,可以在两个编辑器/IDE中都能工作?我不是指使用单一配置文件,分别配置两者是可以的。但我不想在同时使用这两个编辑器/IDE时需要学习两套完全不同的映射。
英文:
I'm using both:
- Neovim with LSP, etc (using LazyVim config but open to change to another modern one)
- IntelliJ with IdeaVim, mainly for Java/Kotlin with Spring, etc
Has anyone come up with a shared set of key mappings that would work across both? I don't mean using single configuration file, configuring both separately is fine. But I'd like not to have to learn two completely separate set of mappings when using both editors/IDEs.
答案1
得分: 1
Regular VIM bindings will work in Ideavim as well, you can even source your VIM mappings file in your .ideavimrc to only write them once.
LSP features like diagnostics, code actions, goto definition, etc... do not exist in Ideavim because you are supposed to use the equivalent features from your Jetbrains IDE instead.
The trick is that you can setup an Ideavim mapping for almost any IDE action. For example, in my config, I have nmap gl <Action>(ShowErrorDescription)
to map the key sequence g + l to the IDE equivalent of Neovim LSP diagnostics.
You can get a list of all the IDE action codes by using the :actionlist
command for the whole list or :actionlist keyword
to search for something specific.
You may also take a look at this Github discussion where people share their Ideavim config. That should give you a good idea of all the cool things you can do with it.
英文:
Regular VIM bindings will work in Ideavim as well, you can even source your VIM mappings file in your .ideavimrc to only write them once.
LSP features like diagnostics, code actions, goto definition, etc... do not exist in Ideavim because you are supposed to use the equivalent features from your Jetbrains IDE instead.
The trick is that you can setup an Ideavim mapping for almost any IDE action. For example, in my config, I have nmap gl <Action>(ShowErrorDescription)
to map the key sequence g + l to the IDE equivalent of Neovim LSP diagnostics.
You can get a list of all the IDE action codes by using the :actionlist
command for the whole list or :actionlist keyword
to search for something specific.
You may also take a look at this Github discussion where people share their Ideavim config. That should give you a good idea of all the cool things you can do with it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论