Re: Fortran plugin and vimrc_example

2008-05-25 Fir de Conversatie Ajit Thakkar

On Sun, May 25, 2008 at 11:57 AM, Ajit Thakkar <[EMAIL PROTECTED]> wrote:
> A different way to achieve this is to put the lines that select fixed
> or free format not in your .vimrc but to create
> ~/after/syntax/fortran.vim and put the lines there.

That should have been ~/vimfiles/after/syntax/fortran.vim

Ajit

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: Fortran plugin and vimrc_example

2008-05-25 Fir de Conversatie Ajit Thakkar

A different way to achieve this is to put the lines that select fixed
or free format not in your .vimrc but to create
~/after/syntax/fortran.vim and put the lines there.

I'll add a line about this possibility under :help fortran before vim
7.2 comes out --- only Bram knows when that will be.

Ajit

On Sun, May 25, 2008 at 5:18 AM, Szabolcs <[EMAIL PROTECTED]> wrote:
>
> The Fortran plugin's documentation gives instructions on how to enable
> automatic selection of source format (fixed or free form) based on the
> file extension (see :help fortran).  It also mentions that this will
> only work if the "filetype plugin indent on" line precedes the "syntax
> on" one in vimrc.  This is not true for the included vimrc_example.
>
> Unless there is a reason not to, it would be nice to swap the order of
> these two lines in the 'official' vimrc_example to make sure that it
> is compatible with the Fortran plugin.
> >
>

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: Fortran plugin and vimrc_example

2008-05-25 Fir de Conversatie Bram Moolenaar


Szabolcs wrote:

> The Fortran plugin's documentation gives instructions on how to enable
> automatic selection of source format (fixed or free form) based on the
> file extension (see :help fortran).  It also mentions that this will
> only work if the "filetype plugin indent on" line precedes the "syntax
> on" one in vimrc.  This is not true for the included vimrc_example.
> 
> Unless there is a reason not to, it would be nice to swap the order of
> these two lines in the 'official' vimrc_example to make sure that it
> is compatible with the Fortran plugin.

This dependency is unexpected.  I could change the vimrc_example, but
there will still be people who run into this.

The problem appears to be in the order of the autocommands.  If the
proposed lines to set fortran_free_source and fortran_fixed_source are
executed after doing the normal syntax detection.

Simplest, but with a bit of overhead, is to add to the recommended lines
of the plugin:

if exists("b:fortran_fixed_source")
  syn clear
  set syntax=fortran
endif

(untested)


-- 
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
  KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
  HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
  LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
  BROTHER MAYNARD
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Fortran plugin and vimrc_example

2008-05-25 Fir de Conversatie Szabolcs

The Fortran plugin's documentation gives instructions on how to enable
automatic selection of source format (fixed or free form) based on the
file extension (see :help fortran).  It also mentions that this will
only work if the "filetype plugin indent on" line precedes the "syntax
on" one in vimrc.  This is not true for the included vimrc_example.

Unless there is a reason not to, it would be nice to swap the order of
these two lines in the 'official' vimrc_example to make sure that it
is compatible with the Fortran plugin.
--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---