Mercurial > vim
comparison runtime/ftplugin/fortran.vim @ 5400:173c9c860e42
Runtime file updates.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 06 Oct 2013 14:22:40 +0200 |
parents | 3482d151136b |
children | aea5ebf352c4 |
comparison
equal
deleted
inserted
replaced
5399:ecd08086e203 | 5400:173c9c860e42 |
---|---|
1 " Vim settings file | 1 " Vim settings file |
2 " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) | 2 " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) |
3 " Version: 0.48 | 3 " Version: 0.49 |
4 " Last Change: 2012 Apr. 18 | 4 " Last Change: 2013 Oct. 01 |
5 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> | 5 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> |
6 " Usage: Do :help fortran-plugin from Vim | 6 " Usage: Do :help fortran-plugin from Vim |
7 " Credits: | 7 " Credits: |
8 " Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, and Ben | 8 " Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben |
9 " Fritz. | 9 " Fritz, and David Barnett. |
10 | 10 |
11 " Only do these settings when not done yet for this buffer | 11 " Only do these settings when not done yet for this buffer |
12 if exists("b:did_ftplugin") | 12 if exists("b:did_ftplugin") |
13 finish | 13 finish |
14 endif | 14 endif |
62 " compatible with both free and fixed format, then you should do so | 62 " compatible with both free and fixed format, then you should do so |
63 " in column 73 and uncomment the next line | 63 " in column 73 and uncomment the next line |
64 " setlocal tw=73 | 64 " setlocal tw=73 |
65 else | 65 else |
66 setlocal comments=:! | 66 setlocal comments=:! |
67 " Free format allows a textwidth of 132 for code but 80 is more usual | 67 " Free format allows a textwidth of 132 |
68 setlocal tw=80 | 68 setlocal tw=132 |
69 endif | 69 endif |
70 | 70 |
71 " Set commentstring for foldmethod=marker | 71 " Set commentstring for foldmethod=marker |
72 setlocal cms=!%s | 72 setlocal cms=!%s |
73 | 73 |
74 " Tabs are not a good idea in Fortran so the default is to expand tabs | 74 " Tabs are not a good idea in Fortran so the default is to expand tabs |
75 if !exists("fortran_have_tabs") | 75 if !exists("fortran_have_tabs") |
76 setlocal expandtab | 76 setlocal expandtab |
77 endif | 77 endif |
78 | 78 |
79 " Set 'formatoptions' to break comment and text lines but allow long lines | 79 " Set 'formatoptions' to break text lines |
80 setlocal fo+=tcql | 80 setlocal fo+=t |
81 | 81 |
82 setlocal include=^\\c#\\=\\s*include\\s\\+ | 82 setlocal include=^\\c#\\=\\s*include\\s\\+ |
83 setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp | 83 setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp |
84 | 84 |
85 " Define patterns for the matchit plugin | 85 " Define patterns for the matchit plugin |
112 if has("gui_win32") && !exists("b:browsefilter") | 112 if has("gui_win32") && !exists("b:browsefilter") |
113 let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . | 113 let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . |
114 \ "All Files (*.*)\t*.*\n" | 114 \ "All Files (*.*)\t*.*\n" |
115 endif | 115 endif |
116 | 116 |
117 let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc<" | 117 let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc< sua<" |
118 \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" | 118 \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" |
119 | 119 |
120 let &cpoptions=s:cposet | 120 let &cpoptions=s:cposet |
121 unlet s:cposet | 121 unlet s:cposet |
122 | 122 |