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

Bonus Hack 4. Format a Paragraph<br />

To format a paragraph, do the following.<br />

gqap<br />

Bonus Hack 5. Edit Macros for Reuse<br />

After you’ve recorded a macro, if you found that there is a mistake in the<br />

macro, you have following two options:<br />

• Record the macro again.<br />

• Edit the macro and correct only the mistake.<br />

The following three steps explain how to edit the macro and correct the<br />

mistake (Instead of recording the macro again)<br />

Step 1: Paste the macro from the register where the macro is recorded.<br />

"ap<br />

ALTER USER wywA IDENTFIED FOR 'pa';:w<br />

Step 2: Edit the macro. In this example, the FOR should be BY as shown<br />

below.<br />

ALTER USER wywA IDENTIFIED BY 'pa';:w<br />

158

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

Saved successfully!

Ooh no, something went wrong!