spartacus
5th February 2003, 10:04
Hi all,
don't sure, if this the right place for my question, but anyway:
I'm trying to use gvim as editor. I managed to set in the "vimrc" with "set nu", that line numbering is on. I also tried switching on syntax highlighting for Baan with "set syn=Baan", which works in the command line of gvim, but it doesn't work in "vimrc". How can I set syntax highlighting on automaticaly for Baan??
Thanks
Spartacus
OmeLuuk
5th February 2003, 10:58
I have this setting in my _gvimrc file:
set dictionary=$VIMRUNTIME\syntax\b4gl.vim
set ignorecase " ignore upper/lower in searches; required for correct syntax checking with b4gl
spartacus
5th February 2003, 11:38
Hi OmeLuuk,
tried the same. I have had no "_gvim" before. So I created one. I placed "set dictionary=$VIMRUNTIME\syntax\b4gl.vim" also in "_vimrc". 'till now without success.
Btw: I replaced "b4gl.vim" because in my "syntax" - dir is only a file called "baan.vim"
Thanks
Spartacus
OmeLuuk
5th February 2003, 13:31
spartacus: Btw: I replaced "b4gl.vim" because in my "syntax" - dir is only a file called "baan.vim"... we use our own customized version ;)
Lets see what I have:
My VIM dir is "c:\vim" and my program dir is "c:\vim\vim61"
My $VIMRUNTIME points to "c:\vim\vim61"
C:\vim>dir /b
vim61
vimfiles
own_settings.vim
_gvimrc
_viminfo
_vimrc
In own_settings.vim a.o.:
set number " Show Line numbers
set columns=88 " To show Line Numbers
In _vimrc a.o.:
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
In _gvimrc a.o. including what is mentioned before:
"*************************************************************
" Set syntax file to Baan 4GL
"*************************************************************
" for Baan IV *.cln / V *.bc
au BufNewFile,BufRead *.cln,*.bc,* so $VIMRUNTIME\syntax\b4gl.vim
:so $VIM\own_settings.vim
Maybe your vim did not associate the syntax with file type yet... If you had your script loaded, could you switch syntax to baan?
spartacus
5th February 2003, 13:51
Hi OmeLuuk,
didn't evaluate right now, all the cryptical lines you wrote...
"VIM dir", "program dir" and so on. Will do that later with more time.
But I can answer your last question: Yes, if the script is loaded, I can switch with ":set syn=Baan" to Baan.
What works in vimrc is: "set nu" for line numbering.
Thanks
Spartacus
spartacus
5th February 2003, 14:29
Now I know a little more:
I put "set nu" to "vimrc_example.vim"
In "_vimrc" I have the same as you:
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
I created a "_gvimrc" in "d:\vim" (I have it on "d:"). In that I put your:
"au BufNewFile,BufRead *.cln,*.bc,* so $VIMRUNTIME\syntax\Baan.vim"
!!If I misstype "Baan.vim" (for example: Baanx.vim", I get an error message. With "Baan.vim" none, But syntax highlighting still istn't set correct.
Maybe there is a prob with NT4? I dont't remember if I have had admin rights during installation of gvim. There was also an error message regarding an attempt to write to the registry??
Is "$VIMRUNTIME" a environment var I have to set?
Thanks
Spartacus
evesely
5th February 2003, 15:55
In my _vimrc, all I have is syntax on.
In my filetype.vim file, which in my case is in the vim61 subdirectory, I have the following line:
au BufNewFile,BufRead *.cln,*.bc set ft=baan
This performs the association for me so that when I edit the Baan scripts/libraries (which Baan creates as tmp files with either the cln or bc suffix depending on version) it automatically selects the Baan syntax.
I hope this helps.
spartacus
6th February 2003, 11:14
Hi evesely,
thanks a lot, that helps !!!!
Spartacus