neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

cpp.vim (760B)


      1 " Vim filetype plugin file
      2 " Language:	C++
      3 " Maintainer:	The Vim Project <https://github.com/vim/vim>
      4 " Last Change:	2024 Jun 06
      5 " Former Maintainer:	Bram Moolenaar <Bram@vim.org>
      6 
      7 " Only do this when not done yet for this buffer
      8 if exists("b:did_ftplugin")
      9  finish
     10 endif
     11 
     12 " Behaves mostly just like C
     13 " XXX: "[.]" in the first pattern makes it a wildcard on Windows
     14 runtime! ftplugin/c[.]{vim,lua} ftplugin/c_*.{vim,lua} ftplugin/c/*.{vim,lua}
     15 
     16 " Change 'commentstring' to "C++ style"/"mono-line" comments
     17 setlocal commentstring=//\ %s
     18 let b:undo_ftplugin ..= ' | setl commentstring<'
     19 
     20 " C++ uses templates with <things>
     21 " Disabled, because it gives an error for typing an unmatched ">".
     22 " set matchpairs+=<:>
     23 " let b:undo_ftplugin ..= ' | setl matchpairs<'