18665Re: Five questions about VIM
- Jun 1, 2001Dave McCooey wrote:
>I usually don't change the syntax highlighting. I do a
> I started using vim recently, and there are five things that I cannot
> out how to do in vim, or whether they are even possible.
> (1) How can I change the colors used for syntax highlighting.
> For example, the blue used for C-style comments is way too dark on
> my system.
instead and do a :syntax on if I have a dark background (black). This
will change all the syntax colors to fit a dark background. I rarely
need to tweak the colors. In fact, it's one of the wonderful things I
found about Vim. If you really want to change the color, you should
>I'm not so clear on this. Are you wrapping a long line into multiple
> (2) When the cursor is at the end of a line, I would like the 'L' (move
> right) key
> to cause an alert (e.g. audible bell or visual flash) rather than
> moving to the
> first character of the next line. Is there a way to do this?
> (3) I would like the '%' command to work on angle brackets ("<" and ">")I'm not quite sure about matching "<" and ">", but there's an excellent
> the way it works on other matched-pair characters. This is very
> in HTML files and other files with similar angle-bracket syntaxes.
> The previous vi-like editor I used did this, but vim does not (at
> least by default).
> Is there a way to enable this?
package called matchit.vim. It can even match html tags and other
things. With it, you can even jump from the <table> to the matching
</table> tags. There maybe some other ways to do what you want.
>You usually do a:
> (4) The vim editor appears to hide MS-DOS-style ctrl-M's at the end of
> I like to know when a file has ctrl-M's at the end of its lines, so
> that I can see
> them and remove them (using :1,$s/^V^M$//). By hiding them, vim
> me not only from seeing them, but also from removing them, because
> the above
> removal command doesn't work in vim.
to check whether a file is dos or unix format. You shouldn't really
care about the ^M at the end.
You then can do:
to convert the file in unix ending chars or
to convert the file in dos format.
It's just a different way to do things.
>Hmm..dunno about this one. Some other vimmers may be able to answer
> (5) When switching back and forth between two files (using :e#), the vim
> does not preserve the exact set of lines being shown within the file
> that were
> showing originally. It does this, I believe, so that the line on
> which the cursor
> lies ends up in the middle of the screen. Vim behaves like the
> original vi in
> this respect. Is it possible to disable this auto-centering
> behavior in vim?
>Wow, you should upgrade to the latest 5.8 instead. (or be brave and try
> I am using vim version 5.2.
the 6.0 alpha)
William Lee (Will) | Sendmail Inc.
Email: wlee@... | http://www.sendmail.com
Tel: (510) 594-5505 |
- << Previous post in topic Next post in topic >>