Sei sulla pagina 1di 2

c-support.

vim

V IM -P LUGIN

H OT KEYS
Key mappings for Vim with and without GUI. Plugin: http://vim.sourceforge.net (i) insert mode, (n) normal mode, (v) visual mode

V ERSION 5.16

[n]\cl [n]\cj

\cs [n]\c* [n]\cc [n]\co \cfr \cfu \cme \ccl \cfdi \cfdh \ccs \chs \ckc \csc \cd \ct [n]\cx

Comments end-of-line comment (n,v,i) adjust end-of-line comment (n,v,i) set end-of-line comment column (n) code comment /* */ (n,v) code comment // (n,v,o) comment code (n,v,o) frame comment (n,i) function comment (n,i) method description (n,i) class description (n,i) le description (implementation) (n,i) le description (header) (n,i) C/C++le sections (tab compl.) (n,i) Hle sections (tab compl.) (n,i) keyword comment (tab compl.) (n,i) special comment (tab compl.) (n,i) date (n,v,i) date & time (n,v,i) toggle comments: C C++ (n,v,i)

\sd \sf \sfo \si \sif \sie \sife \se \sw \swh \ss \sc \s{ \sb \ps \pc \p< \p" \pd \pu \pif \pie \pid \pin \pind \pi0 \pr0 \pe \pl \pp

Statements (n,v,i) (n,i) (n,v,i) (n,i) (n,v,i) (n,v,i) (n,v,i) (n,v,i) (n,i) (n,v,i) (n,v,i) (n,i) (n,v,i) Preprocessor choose a Std. Lib. include (n,i) choose a C99 include (n,i) #include<...> (n,i) #include"..." (n,i) #define (n,i) #undef (n,i) #if #endif (n,v,i) #if #else #endif (n,v,i) #ifdef #else #endif (n,v,i) #ifndef #else #endif (n,v,i) #ifndef #def #endif (n,v,i) #if 0 #endif (n,v,i) remove #if 0 #endif (n,i) #error (n,i) #line (n,i) #pragma (n,i)
do { } while for for { } if if { } if else if { } else { } else { } while while { } switch case { }

\nr \nw \ne [n]\nf [n]\np [n]\nm \ni \nc \ns \ntl \ntg \ntr \nts \if \isf \im [n]\i0 [n]\in \ie \is \iu \ip \isc \ica \ima \ire \isi \ias \ii \io \ifs \ifp
1

read code snippet write code snippet edit code snippet pick up function prototype pick up method prototype insert prototype(s) clear prototype(s) show prototype(s) edit local templates edit global templates1 reread the templates change templates style

Snippet (n,i) (n,v,i) (n,i) (n,v,i)

(n,v,i) (n,i) (n,i) (n,i) (n,i) (n,i) (n,i) (n,i) Idioms function (n,v,i) static function (n,v,i) main() (n,v,i) for( x=0; x<n; x+=1 ) (n,v,i) for( x=n-1; x>=0; x-=1 ) (n,v,i) enum + typedef (n,v,i) struct + typedef (n,v,i) union + typedef (n,v,i) printf() (n,i) scanf() (n,i) p=calloc() (n,i) p=malloc() (n,i) p=realloc() (n,i) sizeof() (n,v,i) assert() (n,v,i) open input le (n,v,i) open output le (n,v,i) fscanf (n,i) fprintf (n,i)

system-wide installation only

December 2011

c-support.vim

Page 1 / 2

\+co \+" \+c \+ps \+pc \+cn \+ci \+cni \+mi \+ai \+tc \+tcn \+tci \+tcni \+tmi \+tai \+tf \+ec \+tr \+ca \+c. \hm \hp \lcs \ucs

C++ cout << << endl; (n,i) << "" (n,i) class (n,i) #include<...> STL (n,i) #include<c..> C (n,i) class (using new) (n,i) class implementation (n,i) class (using new) implementation (n,i) method implementation (n,i) accessor implementation (n,i) template class (n,i) template class (using new) (n,i) template class implementation (n,i) template class (using new) impl. (n,i) template method implementation (n,i) template accessor implementation (n,i) template function (n,i) error class (n,i) try . . . catch (n,v,i) catch (n,v,i) catch(...) (n,v,i) Help and Menus show manual (n,i) help (c-support) (n,i) load Menus (n & GUI only) unload Menus (n & GUI only)

\rc \rl \rr \ra \rm \rmc \rme \rma \rp \rpa \rk \rka \rd [n]\rh \rs \rx \ro

typing
/* /* /*<CR>

Run save and compile (n,i) link (n,i) run (n,i) set comand line arguments (n,i) run make1 (n,i) 1 run make clean (n,i) executable to run1 (n,i) 1 cmd. line arg. for make (n,i) run splint2 (n,i) cmd. line arg. for splint (n,i) run CodeCheck3 (n,i) cmd. line arg. for CodeCheck (n,i) run indent (n,i) hardcopy buffer (n,i,v) show plugin settings (n,i) set xterm size (n,i, only Unix & GUI) change output destination (n,i) Additional Mappings expansion /* */ (i) /* (multiline) marked text */ (v) /* (i)
* | */ { | } { (multiline) marked text }

Ex commands: CFileSection C/C++le sections (same as \ccs) HFileSection Hle sections (same as \chs) KeywordComment keyword comment (same as \ckc) SpecialComment special comment (same as \csc) IncludeStdLibrary standard library includes (same as \ps) IncludeC99Library C99 includes (same as \pc) IncludeCppLibrary STL includes (same as \+ps) IncludeCppCLibrary C includes (same as \+pc) CStyle C99 include (same as \nts)
Use tab expansion to show the items to choose from.

{<CR>

(i)

{<CR>

(v)

also working for letype make www.splint.org 3 CodeCheckT M is a product of Abraxas Software, Inc.
2

December 2011

c-support.vim

Page 2 / 2

Potrebbero piacerti anche