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 />

View advanced file details.<br />

g CTRL-G<br />

Col 1 of 5; Line 3 of 6; Word 3 of 6; Byte 10 of 29<br />

Hack 51. Take Control of the Vim Status Bar<br />

You can enable status bar in Vim editor to display useful information about<br />

the current file.<br />

By default the status bar is disabled in the Vim editor. Enable the status bar<br />

as shown below.<br />

:set laststatus=2<br />

The following is a simple status line example:<br />

:set statusline=Filename:%t\ Line:\ %l\ Col:\ %c<br />

Additional status line examples from :help statusline<br />

• :set statusline=%

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

Saved successfully!

Ooh no, something went wrong!