'vi' is driving me crazy
Bill Campbell
linux-sxs
Wed Dec 29 16:06:27 PST 2004
On Fri, Jan 21, 2005, Roger Oberholtzer wrote:
>On Tue, 2004-12-28 at 23:09, Bill Campbell wrote:
>> On Mon, Dec 27, 2004, Ken Moffat wrote:
>> >Roger Oberholtzer wrote:
>> >
>> >>I really like the colorization when printing C code. In vi, I
>> >>do :hardcopy and get syntax hilighting and (the best part) proper line
>> >>wrapping for code lines that are too long.
>>
>> >I like the ":syntax on" command, which can be added to /etc/vim/vimrc
>>
>> I find this useful on occassion, but normally leave it off as I
>> find the colors used to identify things virtually illegible. It
>> can be invaluable though to find things like missing quotes in
>> shell scripts. I find it less useful in perl where I can use the
>> ``%'' key to find matching braces, parens, etc. and I always use
>> perl's ``q(...)'' variations for quoted text since it then allows
>> the same feature -- not to mention not having to backwhack quotes
>> in the text.
>
>Same when editing C. I am notorious for using parentheses to force
>evaluation order. I know C has a set method. But I can't help myself.
>Having vi show which parenthesis is the one that matches the one just
>typed is great. Also, the command 'K' gives the man page for the word
>the cursor is in. And, if you want the man page in a specific section,
>type the section number before the 'K'. OK, in the world of multiple
>windows, this has less wow. But I still like it.
The ``K'' option is new to me (22 years using vi and still learning :-).
The thing that I really like that vim has that vanilla vi doesn't is the
split windows. To edit a file in a new window, place the cursor anyplace
in the file name, and press <ctrl-w>f. Editing C, you can even do this
with tags. Put the cursor in a routine name and press <ctrl-w>].
>> It's a bit better if I have colors set off so it just uses underlines.
>
>What is this?
The effects of the ``:syntax on'' command. If your terminal
doesn't support color, vim uses underscore to mark syntax.
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
The pinnacle of open systems is: when moving from vendor to vendor, the
design flaws stay the same.
More information about the Linux-users
mailing list