diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-09-21 20:09:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-09-21 20:09:51 +0200 |
commit | 34cc7d8c034f2bc5b57455577051db8d72e2b87c (patch) | |
tree | de1790044f221b5cc942b47d42dff8b847fd9db3 /runtime/ftplugin/c.vim | |
parent | 690c524ce6629f9ff67728541ba211f831caf0ee (diff) |
Update runtime files
Diffstat (limited to 'runtime/ftplugin/c.vim')
-rw-r--r-- | runtime/ftplugin/c.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim index 70e54b303a..b6aed9cb04 100644 --- a/runtime/ftplugin/c.vim +++ b/runtime/ftplugin/c.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Feb 01 +" Last Change: 2021 Sep 21 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -40,8 +40,11 @@ endif " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments properly. -let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' -let b:match_skip = 's:comment\|string\|character\|special' +if !exists("b:match_words") + let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' + let b:match_skip = 's:comment\|string\|character\|special' + let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words" +endif " Win32 can filter files in the browse dialog if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") @@ -62,6 +65,7 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "All Files (*.*)\t*.*\n" endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif let &cpo = s:cpo_save |