annotate runtime/ftplugin/msmessages.vim @ 20059:de756b3f4dee v8.2.0585

patch 8.2.0585: Vim9: # comment not recognized after :vim9script Commit: https://github.com/vim/vim/commit/7a09224583b2ad0d9d0648b53cc2d989d45ae96e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 16 22:10:49 2020 +0200 patch 8.2.0585: Vim9: # comment not recognized after :vim9script Problem: Vim9: # comment not recognized after :vim9script. Solution: Check script type. Make comment after ":echo" work. And in several other places.
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 Apr 2020 22:15:04 +0200
parents 73fe8baea242
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1620
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
2 " Language: MS Message files (*.mc)
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
3 " Maintainer: Kevin Locke <kwl7@cornell.edu>
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
4 " Last Change: 2008 April 09
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
5 " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
6
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
7 " Based on c.vim
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
8
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
9 " Only do this when not done yet for this buffer
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
10 if exists("b:did_ftplugin")
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
11 finish
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
12 endif
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
13
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
14 " Don't load another plugin for this buffer
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
15 let b:did_ftplugin = 1
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
16
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
17 " Using line continuation here.
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
18 let s:cpo_save = &cpo
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
19 set cpo-=C
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
20
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
21 let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter"
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
22
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
23 " Set 'formatoptions' to format all lines, including comments
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
24 setlocal fo-=ct fo+=roql
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
25
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
26 " Comments includes both ";" which describes a "comment" which will be
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
27 " converted to C code and variants on "; //" which will remain comments
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
28 " in the generated C code
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
29 setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
30 setlocal commentstring=;\ //\ %s
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
31
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
32 " Win32 can filter files in the browse dialog
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
33 if has("gui_win32") && !exists("b:browsefilter")
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
34 let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" .
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
35 \ "Resource Files (*.rc)\t*.rc\n" .
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
36 \ "All Files (*.*)\t*.*\n"
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
37 endif
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
38
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
39 let &cpo = s:cpo_save
73fe8baea242 updated for version 7.2a
vimboss
parents:
diff changeset
40 unlet s:cpo_save