14.06.2014 Views

vim 101 hacks

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Buyer: xiujuan lu (luxiujuan@gmail.com)<br />

Transaction ID: 85W16630AD8515549<br />

Vim <strong>101</strong> Hacks<br />

www.thegeekstuff.com<br />

Set the Size of a Window<br />

To open a vertical split with 25 columns do the following<br />

:25 vsplit filename.txt<br />

To open a horizontal split with 3 lines do the following<br />

:3 split filename.txt<br />

Hack 68. Change Window Title<br />

To change the text displayed in the title, do the following.<br />

:set title titlestring=My\ Favorite\ File<br />

The above will change the text in the Vim window title bar to “My Favorite<br />

File”.<br />

Note: The following example is shown in the Vim documentation, when you<br />

do :help titlestring<br />

:set title titlestring=%

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!