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?

ether_joe
  • 1,068
  • 1
  • 13
  • 32

4 Answers4

6

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:

glytching
  • 44,936
  • 9
  • 114
  • 120
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.

JJC
  • 9,547
  • 8
  • 48
  • 53
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.

zzxyz
  • 2,953
  • 1
  • 16
  • 31
nah doe
  • 21
  • 1
  • you can bind them to the 'default' vim behaviour by adding the following 2 lines to your ~/.ideavimrc -> nnoremap n :sp nnoremap v :vsp – Jonas Geiregat Jun 03 '19 at 07:45
1

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

Testare
  • 338
  • 3
  • 12