7

I'm used to quickly opening a file in vim with :e . Quick and simple, especially with tab filename completion.

However :e doesn't seem to be wired up to open files for ideavim. Typing :e has no response.

Any suggestions?

4 Answers 4

7

You can use :e or :edit or :action OpenFile to open IntelliJ's 'Open File' dialog and then browse to the target file but there is no auto completion available for file paths/names.

There's an open issue against IDEA VIM for this:

4

Double tapping shift (at least in intellij's GoLand) allows super fast searching for files in your project and opening them in a new tab. Not exactly the same as what you (and I) are looking for, but handy and fast.

3

nnoremap <leader>ff :action GotoFile<CR> works quite well for me.

2

:sp (alias for :split, splits editor screen horizontally) and :vsp (split vertically) also work in the way glytching described.

It's nutz that autocomplete for filename/paths isn't a feature.

I guess one sort of cool (probably unintended) feature is that you can :e, :sp, whatever just the filename of any file in your entire project. no need for path specifying (ie :sp ../../dir1/filename is unnecessary, just :sp filename works), so that's a possible workaround for the missing autocomplete.

1
  • you can bind them to the 'default' vim behaviour by adding the following 2 lines to your ~/.ideavimrc -> nnoremap <C-w>n :sp<CR> nnoremap <C-w>v :vsp<CR> Commented Jun 3, 2019 at 7:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.