Hi community,
The company I work for has deployed an AIX (7200-01-05-1845) installation and I want to setup vim(7.4) editor. The problem I have is that syntax highlight is not working.
For example, I open a .c file and I can tell that filetype and format are properly set (I added some echo debug messages in c.vim file which are properly printed, which means up to that point that everything goes well) but no matter what I have tried I am not able to make vim to highlight correctly my files.
my .vimrc
" activates filetype detection
filetype plugin indent on
" activates syntax highlighting among other things
syntax on
set t_Co=256
" allows you to deal with multiple unsaved
" buffers simultaneously without resorting
" to misusing tabs
set hidden
" just hit backspace without this one and
" see for yourself
set backspace=indent,eol,start
@manag, welcome , we hope you find the forum helpful and friendly.
please confirm you are invoking as vim filename and not vi filename (or some aliased command .... )
When you say '...and I want to setup vim(7.4) editor...' is that
from scratch - ie no existing installation of vim exists ?
why not ask the sysadmins to install any everyone can get the benefit of vim ?
or
vim is installed and you are talking about your specific configuration?
or
no vim was installed but you have downloaded and installed it locally (did you keep all logs/outputs generated by that process)?
(assuming the last case -- ) what does vim -V show
on my host I see the following relating to syntax
(NB: all these files are root owned !)
grep sourc vim.sources | grep -i syntax
line 27: sourcing "/usr/share/vim/vim80/syntax/syntax.vim"
line 19: sourcing "/usr/share/vim/vim80/syntax/synload.vim"
line 21: sourcing "/usr/share/vim/vim80/syntax/syncolor.vim"
finished sourcing /usr/share/vim/vim80/syntax/syncolor.vim
finished sourcing /usr/share/vim/vim80/syntax/synload.vim
finished sourcing /usr/share/vim/vim80/syntax/syntax.vim
Hi munkeHoller,
thanks for the welcoming and your reply.
I confirm I am talking about vim (not vi). There is a current installation of vim, on which I am trying to syntax highlight the various .c .sh .h (etc) files.
It seems that vim recognizes , for example, a .c file and correctly executes syntax/c.vim file but no syntax highlight is applied.
Regarding vim.sources, there is not such a file in our installation. I can only find syntax/debsources.vim, which does not include anything like "sourcing ....
Can I ask what your terminal type is set to ? If you are using a TERM that does not support colour (such as vt100, for example), then you wouldn't actually see any colours in your terminal window, regardless of whether or not vim is correctly loading the syntax highlighting plugins.
Btw, let me share the process that led me to the solution. It may be helpful for others.
I first tried setting TERM=aixterm as someone had suggested a few years ago in a thread in AIX forum, but I got the following message when I opened vim.
E558: Terminal entry not found in terminfo
'aixterm' not known. Available builtin terminals are:
builtin_gui
builtin_ansi
builtin_xterm
builtin_iris-ansi
builtin_dumb
defaulting to 'ansi'
After trying a couple of these, I concluded to builtin_iris-ansi.
Thanks
Marios