2014-07-11 04:05:51 +00:00
|
|
|
" Vim filetype plugin file
|
|
|
|
|
" Language: C++
|
2023-08-13 13:25:10 +01:00
|
|
|
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
2024-06-06 18:46:11 +02:00
|
|
|
" Last Change: 2024 Jun 06
|
2023-08-13 13:25:10 +01:00
|
|
|
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
2014-07-11 04:05:51 +00:00
|
|
|
|
|
|
|
|
" Only do this when not done yet for this buffer
|
|
|
|
|
if exists("b:did_ftplugin")
|
|
|
|
|
finish
|
|
|
|
|
endif
|
|
|
|
|
|
2021-04-29 08:54:38 -04:00
|
|
|
" Behaves mostly just like C
|
2024-05-28 06:39:07 +08:00
|
|
|
" XXX: "[.]" in the first pattern makes it a wildcard on Windows
|
|
|
|
|
runtime! ftplugin/c[.]{vim,lua} ftplugin/c_*.{vim,lua} ftplugin/c/*.{vim,lua}
|
2021-04-29 08:54:38 -04:00
|
|
|
|
2024-06-06 18:46:11 +02:00
|
|
|
" Change 'commentstring' to "C++ style"/"mono-line" comments
|
|
|
|
|
setlocal commentstring=//\ %s
|
|
|
|
|
let b:undo_ftplugin ..= ' | setl commentstring<'
|
|
|
|
|
|
2021-04-29 08:54:38 -04:00
|
|
|
" C++ uses templates with <things>
|
|
|
|
|
" Disabled, because it gives an error for typing an unmatched ">".
|
|
|
|
|
" set matchpairs+=<:>
|
|
|
|
|
" let b:undo_ftplugin ..= ' | setl matchpairs<'
|