Loading ...
Sorry, an error occurred while loading the content.

Re: fortran highlighting not working

Expand Messages
  • Nico Weber
    Hi, ... 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
    Message 1 of 7 , Sep 3, 2008
    • 0 Attachment
      Hi,

      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

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.