blob: fac3edd2eeed726466e80a9857621b15b06344ab [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: C++
Christian Brabandte978b452023-08-13 10:33:05 +02003" Maintainer: The Vim Project <https://github.com/vim/vim>
Luc Hermittece47d322024-06-06 18:44:30 +02004" Last Change: 2024 Jun 06
Christian Brabandte978b452023-08-13 10:33:05 +02005" Former Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9 finish
10endif
11
Bram Moolenaar2547aa92020-07-26 17:00:44 +020012" Behaves mostly just like C
Bram Moolenaar071d4272004-06-13 20:20:40 +000013runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim
Bram Moolenaar2547aa92020-07-26 17:00:44 +020014
Luc Hermittece47d322024-06-06 18:44:30 +020015" Change 'commentstring' to "C++ style"/"mono-line" comments
16setlocal commentstring=//\ %s
17let b:undo_ftplugin ..= ' | setl commentstring<'
18
Bram Moolenaar2547aa92020-07-26 17:00:44 +020019" C++ uses templates with <things>
20" Disabled, because it gives an error for typing an unmatched ">".
21" set matchpairs+=<:>
22" let b:undo_ftplugin ..= ' | setl matchpairs<'