Often when coding I have this window layout - which is mapped to the flow of the program I am editing.
Tab1
+------------+--------------+
| | |
| | B |
| | |
| | |
| A +--------------+
| | |
| | |
| | C |
| | |
+------------+--------------+
Now I want to open B
in a new tab to work on it, but I want to leave the layout of tab1
intact.
Here is my desired outcome.
tab1 tab2
+------------+--------------+ +---------------------------+
| | | | |
| | B | | |
| | | | |
| | | | B |
| A +--------------+ | |
| | | | |
| | | | |
| | C | | |
| | | | |
+------------+--------------+ +---------------------------+
What I have tried using vim
- From inside
B
, open it in a new tab with<C-w>T
.
The problem is that destroys theB
window intab1
. tabe <full path to filename>
- this works, but I am trying to find a "shortcut"
What I have tried using ctrlp
<C-p>
, type in few characters of filename,<C-t>
Unfortunately ctrlp excludes the current buffer from its results, I know I can move to another window, buy I always forget this when I am coding, so I just assume ctrlp cant find the file and resort to some other way to open the file.
Is there a shortcut to open a file in a new tab, leaving the current one intact or to enable ctrlp to include the current buffer in its results?