From 77c08e656c86fa3e9da5de1c3abdcb45d67dc9a2 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 15 Oct 2012 21:44:44 +0200 Subject: tools/vim/plugin: change C++ specific options A new project is the right time to simplify indentation rules so that less capable editors still have a chance to do it right. --- tools/vim/plugin/apbteam.vim | 13 ++++++++++--- tools/vim/templates/apbteam.cpp | 1 - tools/vim/templates/apbteam.hpp | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'tools/vim') diff --git a/tools/vim/plugin/apbteam.vim b/tools/vim/plugin/apbteam.vim index a15c873e..23627368 100644 --- a/tools/vim/plugin/apbteam.vim +++ b/tools/vim/plugin/apbteam.vim @@ -41,7 +41,7 @@ function! APBTeam() syn on " Plugins. let g:template_variant = "apbteam" - let g:ghph_GrabComments = 1 + let g:ghph_GrabComments = 0 let g:ghph_Reformat = 1 let g:ghph_PutAfter = 1 let g:ghph_SplitReturn = 1 @@ -55,7 +55,14 @@ function! APBTeamProg() setlocal cindent setlocal fo-=o fo-=r setlocal com-=:// com+=:///,:// - " Call GHPH +endfunction + +function! APBTeamCpp() + call APBTeamProg() + " C++ specific options. + setlocal expandtab + setlocal cino=:0,g.5s,h.5s,t0,(s + " Call GHPH. nmap g :GHPH g nmap h :GHPH p endfunction @@ -80,7 +87,7 @@ if exists('g:no_apbteam') | finish | endif call APBTeam() au FileType c call APBTeamProg() -au FileType cpp call APBTeamProg() +au FileType cpp call APBTeamCpp() au FileType python call APBTeamPython() au BufNewFile README Template README au BufNewFile *.c,*.cc,*.tcc,*.icc,*.h,*.hh,*.hpp,*.C,*.cxx TemplateHeader diff --git a/tools/vim/templates/apbteam.cpp b/tools/vim/templates/apbteam.cpp index 63c91aab..9d7defe1 100644 --- a/tools/vim/templates/apbteam.cpp +++ b/tools/vim/templates/apbteam.cpp @@ -1,4 +1,3 @@ -// @FILE@ // @=GetReadme()@ {{{ // // Copyright (C) @YEAR@ @AUTHOR@ diff --git a/tools/vim/templates/apbteam.hpp b/tools/vim/templates/apbteam.hpp index 668e0df3..cd550972 100644 --- a/tools/vim/templates/apbteam.hpp +++ b/tools/vim/templates/apbteam.hpp @@ -1,6 +1,5 @@ #ifndef @FILEDEF@ #define @FILEDEF@ -// @FILE@ // @=GetReadme()@ {{{ // // Copyright (C) @YEAR@ @AUTHOR@ -- cgit v1.2.3