Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use vim plugins with Ideavim?

I would like to use Tim Pope's vim surround plugin in my Pycharm IDE. I've been using the IdeaVim plugin for Pycharm to use vim motions and commands.

I know I can use ~/.ideavimrc like my normal .vimrc but I cannot find information about how to use plugins with ideavim.

Can I specify the plugins directory inside my ~/.ideavimrc or do I have to go another way? Can I use a plugin manager like pathogen?

like image 373
Sebastian Wozny Avatar asked Nov 25 '15 02:11

Sebastian Wozny


People also ask

What is IdeaVim plugin?

IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs.

Where do I put Vim plugins?

You can place Vim plugins in the ~/. vim/pack/vendor/start/plugin_name directory. Note that the plugin_name folder name will vary from plugin to plugin. To demonstrate this point, let's install a Vim plugin known as NERDTree.

Does PyCharm have Vim?

Both Vim and PyCharm are keyboard-centric. Your keymap in PyCharm may conflict with Vim's key combinations. To resolve this, select the shortcuts you prefer for different actions. In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Editor | Vim Emulation.


2 Answers

The latest version of IdeaVim includes the vim-surround plugin. Enable it by adding

set surround

to your .ideavimrc file

https://github.com/JetBrains/ideavim#emulated-vim-plugins

like image 121
jeff_kile Avatar answered Oct 09 '22 04:10

jeff_kile


The ideaVim plugin added "Support for vim-surround commands ys, cs, ds, S, enable it with set surround in your ~/.ideavimrc" since version 0.46.

like image 28
DavidGamba Avatar answered Oct 09 '22 06:10

DavidGamba