Skip to content

Goto Tab if file is already open, otherwise open a new tab #1598

Answered by alex-courtis
omar-shahid asked this question in Q&A
Discussion options

You must be logged in to vote

how to navigate to an open tab if it is already open, else open the file in a new tab

As you are new to vim: do you mean a vim tab or a vim window? I am going to assume window.

You can open in a new window split vertcally via <C-v> and horizontally via <C-x>.

On edit (open) via <CR> or o or <2-LeftMouse> nvim-tree will navigate to the window if it is open.

See Beginners Guide to Tabs in Vim if you are interested in vim tabs.

Use <C-t> to open in a new vim tab. The tab switching behaviour can be customised via options such as :help nvim-tree.open_on_tab.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@alex-courtis
Comment options

@omar-shahid
Comment options

@alex-courtis
Comment options

@alex-courtis
Comment options

@omar-shahid
Comment options

Answer selected by omar-shahid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants