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

ASCII value of character n.<br />

ga<br />

110, Hex 6e, Octal 156<br />

Bonus Hack 14. Edit Binary files in Vim Editor<br />

To edit binary files in Vim editor, use the option –b to Vim command line as<br />

shown below.<br />

$ <strong>vim</strong> -b binaryfile<br />

Bonus Hack 15. Folding - View Only Required Part of<br />

Code<br />

Automatic Folding<br />

To enable folding based on indentation, set the following<br />

:set foldmethod=indent<br />

After this setting, your code will be folded based on the indentation as shown<br />

below.<br />

164

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

Saved successfully!

Ooh no, something went wrong!