Optimizing Vim: tab style
Optimizing Vim: tab style
As mentioned in a previous post of mine, I use Vim nowadays just like all the cool guys! And just like in that previous post, I would like to share a trick.
I mostly work with two screens. During (Rails) development my MacBook Pro screen is mostly dedicated to fullscreen iTerm with split screens for running Cucumber, rSpec and a tail on test.log. The other screen is used by Vim. In longer sessions my Vim tends to end up with multiple tabs of split screens.
I really like the Mac-styled tabs Vim shows in window mode, but I like
the standard Vim tabs more for fullscreen work. So what I needed was a
way to make command-enter do the fullscreen toggle and change the
tab-style automatically. Making this work didn't prove to be really
easy.
Some problems I encountered to make this work (which I found scattered all over the Internet):
- The help file mentions a fuleave and fuenter (fullscreen-leave and fullscreen-enter) hook, but these are not implemented yet.
- You need to write this in
gvimrc.localand not invimrc.localas the latter is read by Vim too early. - You cannot map the shortcuts used by MacVim itself unless you unmap them first which is done with a special command.
So this way, fullscreen looks like this:
And window mode like this:
blog comments powered by Disqus
