On 26.08.2008, at 08:09, Srinath wrote:
>
> With the most recent snapshot, the fortran highlighting for
> fortran_free_form is not working.
does it work with the system stock `vim` in Terminal.app? If so,
please do `:e $VIMRUNTIME/syntax/fortran.vim`. What's the version of
that file (third line)? MacVim ships with version 0.88, which is the
official fortran syntax file -- also included with vim7.2 (7.0 even).
If highlighting for `fortran_free_form` stopped working, it's probably
because the fortran syntax file was changed.
Hm, after some googling I suspect that you're talking about
`fortran_free_source`. Could you elaborate on the problem?
Nico
On 02.09.2008, at 20:04, Srinath wrote:
> Is it the case that the .gvimrc is sourced only once upon starting
> MacVim?
Yes. That's normal vim behavior.
> So, how do get the .vimrc or .gvimrc source with every new tab?
You do not really want to do that :-) What you want is a file plugin.
`:h vimrc-filetype` gives an overview what this is, but a not very
good one. Here's what you want to do, in a nutshell:
1. Put `filetype plugin on` in your .vimrc
2. Add a file called `f90.vim` to the folder ~/.vim/ftplugin/. This
file will be execute every time you edit a .f90 file
3. Put `let fortran_free_source=1` in that file.
Now everything should work fine. If not, get back to us.
> Also, can I get an explanation for the different purposes for .vimrc
> and .gvimrc?
Sure. .vimrc is read ever time you start MacVim. .gvimrc is only read
when starting in gui mode (type `vim` in a terminal and hit enter to
see vim in non-gui mode).
>
HTH,
Nico
On 03.09.2008, at 06:35, Srinath wrote:
> I had to create ~/.vim/ftplugin directories. I added f90.vim
> and also added a F90.vim with the solo line:
>
> let fortran_free_source=1
>
> This did not work. I must be missing some.
my fault, I'm just not familiar with that fortran stuff :-P So, remove
f90.vim and F90.vim and instead put a file called 'fortran.vim' into
~/.vim/ftplugin (the file needs to be called like the filetype it
should be loaded for -- the output of `:set filetype?` is hopefully
"fortran" on your system, too). In that file fortran.vim put
let s:extfname = expand("%:e")
if s:extfname ==? "f90"
let fortran_free_source=1
unlet! fortran_fixed_source
else
let fortran_fixed_source=1
unlet! fortran_free_source
endif
Note that this will work only if the "filetype plugin indent on" command
precedes the "syntax on" command in your .vimrc file.
(taken from `:h fortran`).
Does this help?
Nico