Is it possible to “extend” IntelliJ such that I can open the current file in VIM

Absolutely! Go to File -> Settings -> External Tools and add a new one. Program and Working Directory fields should be self-explanatory. The parameter field should be $FilePath$. Click the Insert macro button to see more token values that you could use. You can also bind keyboard shortcuts to the external tools you define. See … Read more

Vim Search/Replace, meaning of %s

% is the range over which the :s command (short for :substitute) will be run. % itself is short for the range :1,$, which means Line 1 to the last line in the buffer. The Vim help has a couple topics (user manual – :help 10.3, reference manual – :help cmdline-ranges) describing the forms that … Read more

Copying from vim search term

In command mode (where you are when you hit : in normal mode), you can do ctrl-R /, which will expand to your last search term (other ctrl-R favorites are ” for your yank buffer, or % for the full path of the current window) You actually don’t need to do that though. If you … Read more

Vim: How to keep folds on save?

This behavior is normal. Vim’s default is not to remember which code you had folded vs. unfolded from one session to the next. You can save your current folds; when you finish editing a file, before exiting vim, enter the command :mkview. When you next open the file, if you enter :loadview, it will restore … Read more

vimdiff and MacVim

From the terminal If you have the mvim script installed (it is in the dmg, just put it somewhere in your PATH), you can just type in a shell: mvim -d file1 file2 You can alias this to mvimdiff if you like. From within macvim In macvim, like in vim , you can also use: … Read more