As i like my editor windows the same way as i like my steaks (that is: as rare as possible and not cooked at all) i once researched to make vim behave as close to vi as was possible. I'd still like to see a "vi-compatibility mode".
Colours in vim chave to be switched on/off in three different steps. All the following command can be tested (issue from the ":"-prompt lasts only this session) in a session or/and be put into .exrc for a lasting effect.
Syntax-Highlighting
is switched with the "syntax" parameter:
Search-Highlighting
searching with "/" causes the terms searched for to be highlighted regardless of syntax highlighting. It can be switched by:
Colour-Scheme
Even with everything turned off there is still the class of non-printing characters (the "^M" in DOS-files for instance) which are displayed in some sort of stand-out mode. This will take care of that:
My scripts are now displayed without any underlined things.
Next step for me was to activate (if possible) syntax highlighting using colors.
The context is Putty 0.54 on XP, Vim on Aix 7.1.0.0 (rpm packages vim-enhanced-6.3-1 & vim-common-6.3-1).
The current situation is that only Vim directives for colors using term works. Directives for ctermfg and ctermbg do not produce any setup.
I guess my putty terminal can produce colors becauses all Vim groups which have term=bold are displayed in a Magenta color.
In my Putty confiuration (Window>Colors) Bolded text is a different colour is checked. I've tried to use the other checkbox (Attemps to use logical palettes, Use system colours), but it do not work too.
Searching the web, I've tried to pass some strings to Putty in Connection>Terminal-type string like Putty-256 ... putty-vt100 but Vim display a rapid message before opening the script :
I've tried to pass xterm as Connection>Terminal-type string and now it works.
Vim displays now my scripts in coloured mode (ctermfg and ctermbg are now effective).
Hope this helps people who encounter the same issue
--
ps : using Connection>Terminal-type string setups your $TERM var
Hey,
Just added a new UserCP option so you can change the code tags to look like the code tags in this example (turn this on and off):
Note: I set the default to "SyntaxHighlighting" for debugging purposes. We can change the default back to the original code tags later.
... (36 Replies)
I had a bash script (ma_report.sh) that I was editing when my VPN connection died. So, when I reconnected, I recovered my changes and reopened the file. Everything looks fine except that there is no longer any syntax highlighting. Using ':syntax on' does not work. Other bash scripts in vim do... (1 Reply)
I am slowly developing my .vimrc and would like to know how to turn off the highlighting (black text on orange background) which starts at line 73. This doesn't seem to be controlled by any selected/customized colorscheme.
I do CFD, and some older codes I use are written in F77, for which this... (2 Replies)
I wrote a new .lang file for syntax highlighting a language I use frequently. It works fine, except that it doesn't glob onto the files automatically. Is there a utility I need to run to update a gtksourceview database?
Here's the relevant portion of the code.
<language id="pari"... (0 Replies)
I was using vim about an hour ago doing abit of python (i only just started using vim). And I think i typed something wrong, and all of a sudden the letter i is always highlighted. Turning syntax off and on didn't work. and i couldent find the solution online.
Thanks in advanced. (1 Reply)
Hi,
i am using VIM editor through Putty. By the option of Syntax on in .vimrc file i am able to see syntax colors in .c and .cpp files but not in the files with .pc extension.
How can this be done?
:confused: (2 Replies)
So... i cant get it to work.
I had already posted this but it got deleted. Details:
Im running SSH shell on Windows XP, connecting to a server whose term is vt100 (someone asked me that last time)
Im trying to get the syntax highlighting in cc mode to work in color, but its black and... (0 Replies)
Hi
how to color syntax in terminal in OS X ?
I wrote in .vimrc:
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
syntax on
and no results.
Best regards (1 Reply)