VIM Project and Tabs - vim

Is there a possibility to combine the Project Plugin with Tabs?
If i open a file in my Project Explorer, i want to open it in a new tab ... :)

You have to hack this plugin yourself (I do not think it would be difficult) or email the author and kindly ask him to do it.
I would also suggest NERDTree as a Project replacement (it can open files in tabs).

For open file of project in other tab use
Leader T
\T

I was having the same issue. For now I'vee learned to use buffers.
To expand on the buffers post above, when you open a new file the Project plugin hides the previous file but it is still an active buffer. ':ls' will list the buffers, switch to a buffer with ':b #' where # is the number of the buffer or split the screen and open a buffer with ':sb #'. Not quite as convenient as tabs but it works until a better solution comes up.

If you open a new buffer window, you can click to open in that buffer.

If you have macVim or gVim of some sort, you can open a finder/explorer window at the project's tree and drag and drop files into windows/tabs.

I had this same desire, so I created a portable configuration called Vim.ana.
It doesn't have many opinions that you can't change easily in the .vimrc
Sauce on layout at the project homepage

Related

How to open a file into the right editor (of split view)? [duplicate]

When I switch between files (Using ctrl-n for examples) in different editors, intellij always opens the file in the original editor the tab for the file is located. Coming from a vim background this seems counter intuitive for me. Is there a way to force intellij to always open the file in the same editor window?
Please vote for the following related issues:
IDEA-67559 Opening a file when there are multiple file groups may re-open in a different group rather than opening in the current group
IDEA-81628 Navigation within same file mistakenly leaves split editor
When using Ctrl-Shift-N to open the desired file, Shift-Enter to confirm will maintain the focused tab group.

Using multiple files simultaneously with tabs in vim NERDTree

Okay, this has been asked before.
But the answers did not really cover what I was looking for. I do not even get the purpose of t shortcut, it just opens another nerdtree where I can't even open folders with enter.
What I would like to do is to open files in new tabs inside one nerdtree session, just like in any other non-terminal text editor.
Now, if I open another file with enter, it closes the previously edited file. It becomes quite tedious very fast while working on a project.
Anybody has a solution for this?

Better Tab Navigation in gVim

How can I get tabs in gVim to work like they do in most good IDEs? I say gVim specifically because that is the version of Vim that I use but I am open to alternatives.
I want the following things for my tabs:
Ctrl+Tab goes to the MRU (most recently used) tab.
Holding down Ctrl and then pressing Tab multiple times continues to change to the next most recently used tab every time you press Tab.
When ctags are built and working and you press Ctrl+], if this takes you to a different file it should open that file in a new tab or if a tab with that file is already open it should switch to that one.
Easy tab reordering with the mouse just by dragging them around.
I am posting all these as a single question because I am hoping there is a good single solution that will do all or most of these things instead of having to hack each customization in individually. I would think this would be the preferred behavior by most of us.
Vim has no built in MRU. There is at least one plugin for that, though, but I've never used it.
The tabs in Vim are not the same as the tabs in your IDE, they are more like perspectives. The equivalent of your IDE's tabs in Vim are buffers and "(split)windows". There are a number of ways to work with buffers including some native ones and a number of third party plugins. Some of these plugins have MRU-like features.
The Vim wiki has a bunch of pages about tabs.

vim - howto close all buffers in the current tab?

I know that using a command like:
:%bdelete
Using this command I can close all buffers, in all tabs, what I'd like to do is to close all buffers open in the current tab, is that possible?
Usage:
What I'd like to do, is to open ViM and load :VSTreeExplorer and then open related files in the same window switching between them using :next and :previous and then open other files a new tab (with VSTreeExplorer as well), when I need to clean one of the tabs, I would like to use whatever command that closes buffers in the current tab.
For now, what I do is use :%bd and then open the VSTreeExplorer and start over...
Thanks
If you're done with a tab you can just use :tabclose.
:windo bd will delete all buffers in the current tab.
Buffers are global to the Vim instance, not confined to a specific tab page. A tab page is simply a way to organize windows and windows are simply a way to display a buffer. Zero or more windows (and therefore tab pages) can display the same buffer. Getting used to this concept should help your workflow in Vim.
The Vim wiki has a couple pages that give some more explanation and tips for using tab pages.

VIM VTreeExplorer plugin (IDE style browsing for VIM)

I've looked at a number of the IDE style file explorer / management plugins for VIM. The most popular one seems to be Project, but I've never got on well with it. Specifically, having to always create a .project file for the files you want to browse, and that changes to that file hierarchy outside of VIM are not picked up.
I stumbled across the VTreeExplorer plugin and I really like the way it works. I'm trying to work out how I can make it work in a more IDE style way, for instance, to always open vertically down the full length of my window, and once I've opened a file from it, it automatically hides the VTreeExplorer buffer again? Also, ideally it wouldn't show up when I use :bn or a buffer explorer to tab through each file buffer.
Any recommendations would be appreciated. Thanks!
What about NERDTree? It is really good, one of the best file tree plugin for vim available.

Resources