Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim's :open does not tab complete, what does?

Tags:

vim

Instead of tab completed file or directory names, I see ^I

:open ./lib/^I^I^I

Is there another command that would offer tab completion, or perhaps another solution?

I'm considering replacing the following mapping with something that would use buffers, but want to keep tab completion.

map <C-O> :tabnew ./
like image 333
rthbound Avatar asked Jun 26 '13 17:06

rthbound


3 Answers

That might be because :open is not the command you're looking for. Try :edit or :e for short. Also try :help :open and :help :e to see, what the commands do. :e has tab completion.

like image 153
Boldewyn Avatar answered Oct 13 '22 21:10

Boldewyn


Use :enew if you want to create a new empty buffer.

Use :edit filename if you want to edit a specific file in place of the current one.

Use :new if you want to create a new empty buffer in a new horizontal split window.

Use :split filename if you want to edit a specific file in a new horizontal split window.

Use :vnew if you want to create a new empty buffer in a new vertical split window.

Use :vsplit filename if you want to edit a specific file in a new vertical split window.

Use :tabnew if you want to create a new empty tab.

Use :tabedit filename if you want to edit a specific file in a new tab.


Use :help :command if you are unsure about its usage.

like image 35
romainl Avatar answered Oct 13 '22 21:10

romainl


:set wildcharm=<tab> for tab completion.

like image 40
Janani Shivkumar Avatar answered Oct 13 '22 19:10

Janani Shivkumar