Vim: How to Open Current Opened File in New Tab
In vim, one of the largest challenges is learning how to create, open, and manage buffers.
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.
You can move the window, rather than opening the file, with the following keybind:
It should be noted that rather than opening another pane of the file, it moves the open file to a new tab.
Enter the following commands in vim to read more:
:help tabnew :help registers
- Why is Ruby on Rails' default_scope bad?
- Solved: Warning: Using the last argument as keyword parameters is deprecated
- Rails: How to Use Greater Than/Less Than in Active Record where Statements
- Using Let and Context to Modularize RSpec Tests
- What's the difference between a Good Developer and a Good Googler?