annotate runtime/ftplugin/cmake.vim @ 27557:ce72087b601f v8.2.4305

patch 8.2.4305: tex filetype detection fails Commit: https://github.com/vim/vim/commit/e5b7897585eccec84431d8b23df5cde2e283828c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 5 19:50:34 2022 +0000 patch 8.2.4305: tex filetype detection fails Problem: Tex filetype detection fails. Solution: Check value to be positive. (closes https://github.com/vim/vim/issues/9704)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Feb 2022 21:00:03 +0100
parents 34fd018452ed
children db548356f001
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim filetype plugin
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: CMake
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Keith Smiley <keithbsmiley@gmail.com>
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
4 " Last Change: 2018 Aug 30
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " Only do this when not done yet for this buffer
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 finish
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endif
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
11 " save 'cpo' for restoration at the end of this file
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
12 let s:cpo_save = &cpo
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
13 set cpo&vim
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
14
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 " Don't load another plugin for this buffer
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 let b:did_ftplugin = 1
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 let b:undo_ftplugin = "setl commentstring<"
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
20 if exists('loaded_matchit')
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
21 let b:match_words = '\<if\>:\<elseif\>\|\<else\>:\<endif\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
22 \ . ',\<foreach\>\|\<while\>:\<break\>:\<endforeach\>\|\<endwhile\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
23 \ . ',\<macro\>:\<endmacro\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
24 \ . ',\<function\>:\<endfunction\>'
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
25 let b:match_ignorecase = 1
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
26
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
27 let b:undo_ftplugin .= "| unlet b:match_words"
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
28 endif
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
29
13100
656ab57d1ddc update a few runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 setlocal commentstring=#\ %s
14668
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
31
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
32 " restore 'cpo' and clean up buffer variable
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
33 let &cpo = s:cpo_save
34fd018452ed Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13100
diff changeset
34 unlet s:cpo_save