ideavim - open a file with command mode?

Viewed 4349

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

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:

: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.

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.

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

Related