vim/after/ftplugin/cmake.vim

16 lines
749 B
VimL

" Enable syntax folding, see .vim/after/syntax/cmake.vim
setlocal foldmethod=syntax
" Set comment string
setlocal commentstring=#%s
" setlocal indentkeys=0{,0},:,0#,!^F,o,O,e,=ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
setlocal indentkeys=:,!^F,o,O,e,=endif(,=ENDIF(,endforeach(,ENDFOREACH(,endmacro(,ENDMACRO(,else(,ELSE(,elseif(,ELSEIF(,endwhile(,ENDWHILE(
" Custon surround for creating a CMake variable from a text object.
" "ys{motion}v" makes a variable out of "text-obj" -> "${text-obj}"
let b:surround_{char2nr("v")} = "${\r}"
" Custom surround for createing a CMake generator expression from a test object.
" "ys{motion}g" makes a generator expression out of "text-obj" -> "$<text-obj>"
let b:surround_{char2nr("g")} = "$<\r>"