Using Vim plugins in IntelliJ through IdeaVim - vim

Is there a way I can use Vim plugins in IntelliJ through IdeaVim? In this case I am looking for a way to use the easymotion Vim plugin.

You can use the acejump plugin or emacsIDEAs (Don't be scared by its name. It just introduces ace-jump features) plugin along with the IdeaVim plug.

KJump is a clone of the Vim EasyMotion plugin designed to integrate with IdeaVim. (But it also works standalone.)

Related

Clojure comment highlights not working in neovim with basic syntax plugins installed

I'm using neovim with vim-clojure-static, among other vim plugins. But for some reason when I comment out text in my clojure files they are not highlighted as such.
The plugins I'm using are:
Plugin 'tpope/vim-fireplace'
Plugin 'guns/vim-sexp'
Plugin 'tpope/vim-sexp-mappings-for-regular-people'
Plugin 'tpope/vim-repeat'
Plugin 'guns/vim-clojure-static'
Plugin 'guns/vim-clojure-highlight'
Plugin 'oblitum/rainbow'
Plugin 'tpope/vim-classpath'
Plugin 'tpope/vim-surround'
Any idea what might be going wrong? Is there other information I can provide here to uncover the issue?
I think you’re running into a compatibility issue here. According to the notice at the top of its README, oblitum/rainbow is unmaintained, and the replacement for it is luochen1990/rainbow.
So, try replacing Plugin 'oblitum/rainbow' with Plugin 'luochen1990/rainbow'.

Ideavim plugin for Intellij keymaps

I'm trying to get the Ideavim plugin to work correctly in Intellij IDEA and PyCharm, but the documentation is rather poor and I can't configure it properly.
For starters, the documentation tells me to choose the VIM keymap under Preferences/Keymap but there is no VIM keymap there before or after installing Ideavim.
Also, according to the documentation some plugins are suposed to be supported (altough the documentation doesn't say wich and only talks about vim-surreound), but even after putting the line in ~/.ideavimrc:
set vim-surround
The vim-surround commands simply don't work.
Also, where are the actions/commands list that can be used in ~/.ideavimrc to map some keybinding.
For instance, imagine I want to remap <leader> f s to save my file. Where do I find out the commands available so that I can put something like in ~/.ideavimrc:
let mapleader = " "
nmap <LEADER>fs :SaveFile<CR>
Vim-surround emulation is not released yet. You can download CI builds that include vim-surround support using a link at https://github.com/JetBrains/ideavim.
In order to enable vim-surround, use:
set surround
You can list all the IDE commands available for mapping using :actionlist. See the documentation at the GitHub page.
Update: IdeaVim 0.46 supports vim-surround commands.

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?
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
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.
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.
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).
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.

Can I write Vimscript in my IdeaVim .ideavimrc file?

I am experimenting with Vim mode in the various JetBrains editors, using their IdeaVim plugin.
I'm trying to port over some of the existing functionality from my native .vimrc file. However, I don't seem to be able to get even the simplest vimscript function to work in my ~/.ideavimrc file.
After some searching I can't determine if this is something that IdeaVim even supports. Can I execute functions in the JetBrains editors with the IdeaVim plugin enabled?
You can use only a very limited set of Vim commands like some "set" options, various "map" commands, etc. See the IdeaVim repository on GitHub for more info.

How to make vim pathogen to reload plugins?

Is it possible to make vim to reload pathogen plugins without restarting vim?
I have opened vim with many files, then I add plugin to:
~/.vim/bundle
Since now I'd like to force vim to use the new plugin.
Pathogen just manipulates the 'runtimepath' option; the situation with plugin reloads is therefore the same as with the plain default plugin structure. (Other plugin managers may offer this kind of reload / dynamic enable functionality; I suppose you want to stick with Pathogen.)
To retroactively enable a plugin in a running Vim session, you need to :source all (usually that's only one) plugin scripts that have been added. For a plugin named foobar, that would be:
:source ~/.vim/bundle/foobar/plugin/foobar.vim
If you can get Pathogen to re-initialize the 'runtimepath' (or augment it yourself via :set rtp+=~/.vim/bundle/foobar), you can also use the shorter
:runtime plugin/foobar.vim
If you use a modern version of vim, you can use its built-in package manager, which has a convenient function to reload all plugins:
:packloadall
http://vimhelp.appspot.com/repeat.txt.html#%3Apackloadall
I was in the same boat before util I find an awesome plugin(vim-reload) to do these stuffs automatic in an amazing way.You should have a shot at this plugin.

Resources