Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Macvim - how to prevent tab names being abbreviated?

Tags:

macvim

In macvim, is it possible to make tab names full length (i.e. not shortened?)

e.g., If I open a-very-really-quite-long-file-name.txt, its name in the tab is shortened to a-very-really-q.... This is frustrating if you open several files open with long names, which are similar at the start. (In console vim, this shortening doesn't happen).

Is there an option or setting which prevents this shortening?

(My option guitablabel=%M%t where %t is the file name (the docs don't seem to mention shortening), and I'm using macvim 7.3.)

like image 655
mjeppesen Avatar asked Dec 04 '25 02:12

mjeppesen


1 Answers

I found an ok solution at http://code.google.com/p/macvim/wiki/UserDefaults
You can make the tab labels wider with the following code typed into a terminal ($ signs are prompts, don't type them):

$ defaults write org.vim.MacVim MMTabMinWidth 200
$ defaults write org.vim.MacVim MMTabOptimumWidth 300
$ defaults write org.vim.MacVim MMTabMaxWidth 400

Where you can change the numbers (which are pixel widths) as you like. It's not a perfect solution -- tab label widths are not dymnamically sized to the file name length. So it you open a really long file name, too wide even for the extra wide setting you made, you will still get abbreviation & dots.

If anyone knows a better solution, I'd be keen to hear it ...

like image 70
mjeppesen Avatar answered Dec 09 '25 15:12

mjeppesen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!