Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to tab if trying to open already opened file in Vim

Tags:

vim

I'm opening new tabs using command

:tabnew path/to/file

Is it possible to force Vim to jump to already opened tab with file, if I'm trying to open file which is already opened?

like image 792
taro Avatar asked Jan 14 '10 16:01

taro


People also ask

How do I open a file in a new tab in Vim?

In vim, how do you open the currently opened file in a new tab? In order to open the current file in a new tab, utilize tabnew like so: This utilizes the command :tabnew, in which opens a new tab with the argument %, which expands to the currently selected buffer’s file.

How do I edit multiple files at once in Vim?

Editing multiple files at once is made easier in the vim text editor with the use of tabs. Vincent Danen goes over the basic tab commands and shows you how to combine them with key bindings to make the most of a powerful editing tool. Most people use a text editor to edit one file at a time.

How to open a file in a new tab in Linux?

In order to open the current file in a new tab, utilize tabnew like so: This utilizes the command :tabnew, in which opens a new tab with the argument %, which expands to the currently selected buffer’s file. You can move the window, rather than opening the file, with the following keybind:


1 Answers

Try to use the :drop command. It helps. Related infos:

  • http://vim.wikia.com/wiki/Edit_a_file_or_jump_to_it_if_already_open
  • http://vimdoc.sourceforge.net/htmldoc/windows.html#:drop
like image 166
Zsolt Botykai Avatar answered Oct 04 '22 01:10

Zsolt Botykai