| View previous topic :: View next topic |
| Author |
Message |
Aaron W. Hsu Guest
|
Posted: Fri Oct 17, 2008 7:07 am Post subject: Why does Vim do Syntax Highlighting in Compatible Mode? |
|
|
Can anyone explain to me why Vim run without a vimrc or in -C
compatible mode seems to enable syntax highlighting even when Vi
does not have syntax highlighting? For someone like me who does
not want syntax highlighting, but is forced to use Vim on some
remote servers, it seems counter-intuitive. If I run in
compatibility mode, shouldn't that imply I want Vi behavior, not
Vim features?
Aaron Hsu
--
+++++++++++++++ ((lambda (x) (x x)) (lambda (x) (x x))) +++++++++++++++
Email: <arcfide@sacrideo.us> | WWW: <http://www.sacrideo.us>
Scheme Programming is subtle; subtlety can be hard.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
| |
|
Back to top |
Bob Cortopassi Guest
|
Posted: Fri Oct 17, 2008 7:07 am Post subject: Re: Why does Vim do Syntax Highlighting in Compatible Mode? |
|
|
On 2008-10-17, Aaron W Hsu <arcfide@sacrideo.us> wrote:
| Quote: | Can anyone explain to me why Vim run without a vimrc or in -C
compatible mode seems to enable syntax highlighting even when Vi
does not have syntax highlighting?
|
:help compatible
Compatible mode does not make Vim emulate vi, it simply sets some
default options to the way vi works.
--
email: echo "sbs@sbsrearg.pbz" | sed 's/s/o/g' | rot13
All posts from Google Groups are auto-killed. |
|
| |
|
Back to top |
Patrick Texier Guest
|
Posted: Fri Oct 17, 2008 8:19 am Post subject: Re: Why does Vim do Syntax Highlighting in Compatible Mode? |
|
|
On Thu, 16 Oct 2008 21:07:04 -0500, Aaron W. Hsu wrote:
| Quote: | If I run in
compatibility mode, shouldn't that imply I want Vi behavior, not
Vim features?
|
:help design-compatible
"- Vim adds new commands, you cannot rely on some command to fail
because it didn't exist in Vi."
In compatibility mode, Vim works like Vi only when behavior is different
(undo) but you can use new features like syntax highlighting, visual
mode...
If you have syntax coloration, your .vimrc has :syntax on command. Start
Vim with a minimal .exrc file. On Unix, you can use
<http://ex-vi.sourceforge.net/>.
--
Patrick Texier
vim:syntax=mail:ai:ts=4:et:tw=72 |
|
| |
|
Back to top |
Aaron W. Hsu Guest
|
Posted: Fri Oct 17, 2008 8:14 pm Post subject: Re: Why does Vim do Syntax Highlighting in Compatible Mode? |
|
|
Patrick Texier <p.texier@alussinan.org> writes:
| Quote: | On Thu, 16 Oct 2008 21:07:04 -0500, Aaron W. Hsu wrote:
If I run in
compatibility mode, shouldn't that imply I want Vi behavior, not
Vim features?
:help design-compatible
"- Vim adds new commands, you cannot rely on some command to fail
because it didn't exist in Vi."
|
I see. Well, that stinks, but okay.
| Quote: | If you have syntax coloration, your .vimrc has :syntax on command. Start
Vim with a minimal .exrc file. On Unix, you can use
http://ex-vi.sourceforge.net/>.
|
I have remedied the situation on my machine with an appropriate set of
commands in my vimrc file.
Aaron Hsu
--
+++++++++++++++ ((lambda (x) (x x)) (lambda (x) (x x))) +++++++++++++++
Email: <arcfide@sacrideo.us> | WWW: <http://www.sacrideo.us>
Scheme Programming is subtle; subtlety can be hard.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
| |
|
Back to top |
Tony Mechelynck Guest
|
Posted: Sat Oct 18, 2008 2:11 am Post subject: Re: Why does Vim do Syntax Highlighting in Compatible Mode? |
|
|
On 17/10/08 04:07, Aaron W. Hsu wrote:
| Quote: | Can anyone explain to me why Vim run without a vimrc or in -C
compatible mode seems to enable syntax highlighting even when Vi
does not have syntax highlighting? For someone like me who does
not want syntax highlighting, but is forced to use Vim on some
remote servers, it seems counter-intuitive. If I run in
compatibility mode, shouldn't that imply I want Vi behavior, not
Vim features?
Aaron Hsu
|
If Vim does _syntax_ highlighting (as opposed to default non-syntax
highlighting of e.g. Search in black on yellow [or on brown in Console
mode] or statuslines in reverse-video, the current one in bold) then the
"syntax on" command has been executed to tell it to do so.
If you run Vim as
vim -u NONE
does it still display syntax highlighting? I bet it doesn't. Now restart
it as
vim
after moving your own .vimrc or _vimrc out of the way. If it shows
syntax highlighting now, use
:scriptnames
to see which scripts were run. Maybe the first one is a "system vimrc"
installed by your sysadmin or your distribution.
Best regards,
Tony.
--
*** System shutdown message from root ***
System going down in 60 seconds |
|
| |
|
Back to top |
|