Skip to content

Commit 9b79235

Browse files
committed
Add support for vim-endwise
Derived from (seemingly dead) PR: tpope/vim-endwise#97
1 parent c42ede9 commit 9b79235

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

after/ftplugin/cmake.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
scriptencoding utf-8
2+
3+
if exists('b:loaded_cmake_plugin')
4+
finish
5+
endif
6+
let b:loaded_cmake_plugin = 1
7+
8+
let b:endwise_addition = '\=submatch(0) ==# toupper(submatch(0)) ? "END" . submatch(0) . "()" : "end" . submatch(0) . "()"'
9+
let b:endwise_words = 'foreach,function,if,macro,while'
10+
let b:endwise_pattern = '\%(\<end\>.*\)\@<!\<&\>'
11+
let b:endwise_syngroups = 'cmakeStatement,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommand'

0 commit comments

Comments
 (0)