Reputation: 17506
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?
Upvotes: 45
Views: 22421
Reputation: 438
This was mentioned in a changelog relatively recently.
https://github.com/JetBrains/ideavim/blob/master/CHANGES.md#features-5
I didn't mange this work. Looks like I need vim-plug
installed and I use another package manager in my NeoVim and also I don't want to mix up two configs. It should work in general.
Upvotes: 1
Reputation: 3613
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.
Upvotes: 8
Reputation: 1835
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
Upvotes: 83
Reputation: 16838
No. Vote for VIM-506 for Vim scripts support (unlikely to be implemented) and for VIM-769 for vim-surround emulation (likely to appear in future versions).
Upvotes: 6
Reputation: 172510
Most applications only emulate Vim's / vi key bindings (and often only the basic navigation and editing commands). That goes a long way to helping vi users edit comfortably, but it isn't the real thing.
Unfortunately, to be able to use Vim plugins, you'll need the full Vimscript interpreter and infrastructure around 'runtimepath'
. I'm not aware of any application that provides this, and because of the complexities and idiosyncrasies of Vim, this would be very hard indeed.
To get more of Vim's special capabilities into your IDE, use both concurrently; it is very easy to set up a external tool in your IDE that launches Vim with the current file (and position). Automatic reloading of changes allows you to edit source code in both concurrently.
If it's any comfort to you, the same applies to Emacs / Elisp as well.
Upvotes: 8