eric@lucii.org on 13 Jan 2005 00:34:36 -0000 |
On Wed, Jan 12, 2005 at 09:48:06AM -0500, Bill Hance wrote: > > I would like to know how to turn off highlighting in vi. If anyone can > provide a clue, that would be great. One of my PCs (RHL9) - whenever I > open a file with vi - every instance of "192" is glowing an ugly orange. > How it got this way is a mystery. > > I RTF man page, and am still clueless. > > Thanks! > -Bill Bill, I have a somewhat longer but (for me) more effective way to deal with highlighting in VIM. In my .vimrc file, I have this line: map <F12> :source /home/eric/vim/hlsearch-toggle Then, in the vim directory I have a script called hlsearch-toggle: " number-toggle script " Copyright 2004 by Eric Lucas. " Licensed under the GNU General Public License " See: http://www.gnu.org/licenses/licenses.html :if &hlsearch == 0 set hlsearch :else set nohlsearch :endif :echo &hlsearch == 0 ? "Search highlighting OFF" : "Search highlighting ON" Now, restart vim. if you search, the highlighting will be on. Tap the F12 key and it's off. F12 again and it's on. Repeat as necessary :-D Yes, it's nuts to copyright a 6 line script but I'm not seeking legal _rights_ under the GPL but legal _protections_. This, and other VIM scripts are available at http://www.lucii.com/vim.html I have shortcut keys mapped to scripts that toggle line numbers, scroll binding and syntax highlighting. There is also a script to "cycle" the line lengths (yeah, I write _WAY_ too much with VIM :-D ). Hope this helps! Eric -- ------------------------------------------------------------------------ # Eric Lucas ======================================================================== An honest man can feel no pleasure in the exercise of power over his fellow citizens.... Power is not alluring to pure minds and is not with them the primary principle of contest. -- Thomas Jefferson ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|