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 />
$ <strong>vim</strong> /home/jsmith/mythesaurus.txt<br />
important,valuable,substantial,significant<br />
Step 2: Specify Thesaurus File Location in ~/.<strong>vim</strong>rc<br />
Add the following line to .<strong>vim</strong>rc specifying the location of thesaurus file.<br />
$ <strong>vim</strong> ~/.<strong>vim</strong>rc<br />
set thesaurus+=/home/jsmith/mythesaurus.txt<br />
Step 3: Use Thesaurus While Editing Document Using CTRL-X CTRL-T<br />
From <strong>vim</strong>, if you want to use an alternative word, press CTRL x + CTRL t in<br />
the insert mode.<br />
For example, when you’ve typed the word “important”, press CTRL-X and<br />
CTRL-T, which will show a popup with the alternate words “valuable”,<br />
“substantial” and “significant” as shown below from your<br />
/home/jsmith/mythesaurus.txt file.<br />
CTRL-X CTRL-T<br />
Fig: Launch Thesaurus from Vim using CTRL-X and CTRL-T<br />
147