News for hackers. Stuff that matters.
Re:Vim: Buffers, Windows, and Tabs by roryokane on Saturday June 09, 2012 @02:09AM (#4087389)
Is there any way to use the "tabs" UI concept within one particular window? That is, for a window, have an editable list of buffers you might want to open in that window, and perhaps a tab bar at the top of that window listing those buffers. I don't like using normal Vim tabs that change between sets of windows because if I have nerdtree enabled in one tab, showing its interface in a window, that window doesn't exist in any new tabs and I have to reopen it.
Re:Vim: Buffers, Windows, and Tabs by johncoltrane on Saturday June 09, 2012 @02:45AM (#4087452)
There are many [1] plugins attacking the buffer switching "problem" from every possible angle. TabBar [2], for example, seems to do exactly what you are after.

My opinion is that such an "always on" list is a useless waste of place. My prefered way to switch buffers is to use CtrlP [3]. When it's not available,

    :sb <Tab> 
is very nice. I've also recently added this line to my ~/.vimrc which is remarkably effective:

    nnoremap ,ls :ls<CR>:sb<Space>
[1] http://vim.wikia.com/wiki/Easier_buffer_switching#Scripts

[2] http://www.vim.org/scripts/script.php?script_id=1338

[3] http://www.vim.org/scripts/script.php?script_id=3736

Re:Vim: Buffers, Windows, and Tabs by mmahemoff on Saturday June 09, 2012 @07:35AM (#4087857)
I don't understand how anyone can use vanilla NERDTree because of exactly this problem. It just doesn't feel like a normal or sane editing experience when the tree keeps appearing and disappearing as you switch tabs! It's the primary reason I left Vim for an IDE at one point.

Fortunately, there's a remedy for this (which should really be default in the Janus distro). A simple plugin that makes sure NERDTree is always present and always in the same state across all tabs. https://github.com/jistr/vim-nerdtree-tabs

Re:Vim: Buffers, Windows, and Tabs by tyrmored on Saturday June 09, 2012 @08:55PM (#4089823)
I found NERDTree had no advantages for me over just plain :Vex. I'm sure it does have other features, but how whizbang does a file browser need to be, anyway?

Besides, anything you want to do outside of choosing files to edit in your editor should be done in a shell: http://blog.sanctum.geek.nz/unix-as-ide-editing/

Re:Vim: Buffers, Windows, and Tabs by mmahemoff on Sunday June 10, 2012 @06:09PM (#4092392)
I didn't know about :Vex. At a quick glance, I'd still prefer NERDTree though, especially with nerdree-tabs as I like having a file tree and I like having one that's always present.

I do shell out a lot, but I still think it's more convenient to perform operations against nodes in NERDTree. Saves having to navigate/down/a/really/long/hierarchy.