%%=====================================================================================
%%
%%       Filename:  c-hotkeys.tex
%%
%%    Description:  c-support.vim : Key mappings for Vim / gVim without GUI.
%%
%%        Version:  1.0
%%        Created:  10.11.2006
%%       Revision:  none
%%
%%         Author:  Dr. Fritz Mehner (fgm), mehner.fritz@fh-swf.de
%%   Organization:  FH Südwestfalen, Iserlohn, Germany
%%      Copyright:  Copyright (c) 2006-2014, Dr. Fritz Mehner
%%
%%          Notes:  
%%                
%%=====================================================================================
%
%%======================================================================
%%  LaTeX settings       [[[1
%%======================================================================
\documentclass[oneside,11pt,landscape,DIV16]{scrartcl}
%
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{lastpage}
\usepackage{multicol}
\usepackage{setspace}
%
\setlength\parindent{0pt}
%
\newcommand{\Pluginversion}{6.1.1}
\newcommand{\ReleaseDate}{\today}
\newcommand{\Rep}{{\tiny{[n]}}}
%
%%----------------------------------------------------------------------
%%  luximono : Type1-font
%%  Makes keyword stand out by using semibold letters.
%%----------------------------------------------------------------------
\usepackage[scaled]{luximono}
%
%%----------------------------------------------------------------------
%%  fancyhdr
%%----------------------------------------------------------------------
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyfoot[L]{\small \ReleaseDate}
\fancyfoot[C]{c-support.vim}
\fancyfoot[R]{\small \textbf{Page \thepage{} / \pageref{LastPage}}}
\renewcommand{\headrulewidth}{0.0pt}
%
%%----------------------------------------------------------------------
%%  hyperref
%%----------------------------------------------------------------------
\usepackage[ps2pdf]{hyperref}
\hypersetup{pdfauthor={Dr.-Ing. Fritz Mehner, FH Südwestfalen, Iserlohn, Germany}}
\hypersetup{pdfkeywords={Vim, C/C++}}
\hypersetup{pdfsubject={Vim-plugin,  c-support.vim, hot keys}}
\hypersetup{pdftitle={Vim-plugin,  c-support.vim, hot keys}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  START OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}%
%
\begin{multicols}{3}
%
%%======================================================================
%%  title       [[[1
%%======================================================================
\begin{center}
\textbf{\textsc{\small{Vim-Plugin}}}\\
\textbf{\LARGE{c-support.vim}}\\
\textbf{\textsc{\small{Version \Pluginversion}}}\\
\textbf{\textsc{\Huge{Hot keys}}}\\ 
Key mappings for Vim with and without GUI.\\
{\tiny{http://vim.sourceforge.net/scripts/script.php?script\_id=213}}\\
\vspace{1.0mm}
{\normalsize (i)} insert mode, {\normalsize (n)} normal mode, {\normalsize (v)} visual mode\\
\vspace{3.0mm}
%
%%======================================================================
%%  page 1, table, left   part        [[[1
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{10mm}|p{60mm}|}
%%
%%----------------------------------------------------------------------
%%  show plugin help
%%----------------------------------------------------------------------
\hline 
\multicolumn{2}{|r|}{\textsl{\textbf{H}elp}}\\
\hline \verb'\he'   & English dictionary \hfill (n,i)\\
\hline \verb'\hd'   & Doxygen command \hfill (n,i)\\
\hline \verb'\hm'   & manual for word under cursor  \hfill (n,i)\\
\hline \verb'\hp'   & help (c-support) \hfill (n,i)\\
\hline 
%
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{C}omments}} \\
\hline \Rep\verb'\cl'  & end-of-line comment                     \hfill (n,v,i)\\
\hline \Rep\verb'\cj'  & adjust end-of-line comment              \hfill (n,v,i)\\
\hline     \verb'\cs'  & set end-of-line comment column          \hfill (n)    \\
\hline \Rep\verb'\c*'  & code $\Rightarrow$ comment \verb'/* */' \hfill (n,v,i)  \\
\hline \Rep\verb'\cc'  & code $\Rightarrow$ comment \verb'//'    \hfill (n,v,i)\\
\hline \Rep\verb'\co'  & comment $\Rightarrow$ code              \hfill (n,v,i)\\
\hline \Rep\verb'\cn'  & toggle non-C comment                    \hfill (n,v,i)\\
%
\hline \verb'\cfr' & frame comment                               \hfill (n,i)\\
\hline \verb'\cfu' & function comment                            \hfill (n,i)\\
\hline \verb'\cme' & method description                          \hfill (n,i)\\
\hline \verb'\ccl' & class description                           \hfill (n,i)\\
\hline \verb'\cfdi'& file description (implementation)           \hfill (n,i)\\
\hline \verb'\cfdh'& file description (header)                   \hfill (n,i)\\
%
\hline \verb'\ccs'& C/C++--file sections\hspace{3mm}\footnotesize{(tab compl.)}\hfill \normalsize{(n,i)}\\
\hline \verb'\chs'& H--file sections\hspace{10mm}\footnotesize{(tab compl.)}   \hfill \normalsize{(n,i)}\\
\hline \verb'\ckc'& keyword comment\hspace{5mm}\footnotesize{(tab compl.)}     \hfill \normalsize{(n,i)}\\
\hline \verb'\csc'& special comment\hspace{7,5mm}\footnotesize{(tab compl.)}   \hfill \normalsize{(n,i)}\\
\hline \verb'\cma'& template macros\hspace{7,5mm}\footnotesize{(tab compl.)}   \hfill \normalsize{(n,i)}\\
%
\hline \verb'\cd' & date                                                       \hfill (n,v,i)\\
\hline \verb'\ct' & date \& time                                               \hfill (n,v,i)\\
\hline \Rep\verb'\cx' & exch. comment style: C $\leftrightarrow$ C++           \hfill (n,v,i)\\
\hline 
\end{tabular}\\
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
%%======================================================================
%%  page 1, table, middle part        [[[1
%%======================================================================
%
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{15mm}|p{55mm}|}
%%----------------------------------------------------------------------
%%  menu statements
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{S}tatements}} \\
\hline \verb'\sd'  & \verb'do { } while'        \hfill (n,v,i)\\
\hline \verb'\sf'  & \verb'for'                 \hfill (n,i)\\
\hline \verb'\sfo' & \verb'for { }'             \hfill (n,v,i)\\
\hline \verb'\si'  & \verb'if'                  \hfill (n,i)\\
\hline \verb'\sif' & \verb'if { }'              \hfill (n,v,i)\\
\hline \verb'\sie' & \verb'if else'             \hfill (n,v,i)\\
\hline \verb'\sife'& \verb'if { } else { }'     \hfill (n,v,i)\\
\hline \verb'\se'  & \verb'else { }'            \hfill (n,v,i)\\
\hline \verb'\sw'  & \verb'while'               \hfill (n,i)\\
\hline \verb'\swh' & \verb'while { }'           \hfill (n,v,i)\\
\hline \verb'\ss'  & \verb'switch'              \hfill (n,v,i)\\
\hline \verb'\sc'  & \verb'case'                \hfill (n,i)\\
\hline \verb'\sb'  & \verb'{ }'                 \hfill (n,v,i)\\
\hline
%%----------------------------------------------------------------------
%%  preprocessor menu
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{P}reprocessor}}   \\
\hline \verb'\pih'  & include Std. Lib. header     \hfill (n,i)\\
\hline \verb'\pg'   & \verb$#include<...>$ (global)\hfill (n,i)\\
\hline \verb'\pl'   & \verb$#include"..."$ (local) \hfill (n,i)\\
\hline \verb'\pd'   & \verb'#define'               \hfill (n,i)\\
\hline \verb'\pu'   & \verb'#undef'                \hfill (n,i)\\
\hline \verb'\pif'  & \verb'#if #endif'            \hfill (n,v,i)\\
\hline \verb'\pie'  & \verb'#if #else #endif'      \hfill (n,v,i)\\
\hline \verb'\pid'  & \verb'#ifdef #else #endif'   \hfill (n,v,i)\\
\hline \verb'\pin'  & \verb'#ifndef #else #endif'  \hfill (n,v,i)\\
\hline \verb'\pind' & \verb'#ifndef #def #endif'   \hfill (n,v,i)\\
\hline \verb'\pe'   & \verb'#error '               \hfill (n,i)\\
\hline \verb'\pli'  & \verb'#line  '               \hfill (n,i)\\
\hline \verb'\pp'   & \verb'#pragma'               \hfill (n,i)\\
\hline \verb'\pw'   & \verb'#warning'              \hfill (n,i)\\
\hline \verb'\pi0'  & \verb'#if 0 #endif'          \hfill (n,v,i)\\
\hline \verb'\pr0'  & remove \verb'#if 0 #endif'   \hfill (n,i)\\
\hline
\end{tabular} \\
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
%%======================================================================
%%  page 1, table, right  part        [[[1
%%======================================================================
%
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{60mm}|}%
%%----------------------------------------------------------------------
%%  snippet menu
%%----------------------------------------------------------------------
\hline 
\multicolumn{2}{|r|}{\textsl{S\textbf{n}ippet}} \\
\hline     \verb'\nr'  & read code snippet         \hfill (n,i)\\
\hline     \verb'\nv'  & view code snippet         \hfill (n,v,i)\\
\hline     \verb'\nw'  & write code snippet        \hfill (n,v,i)\\
\hline     \verb'\ne'  & edit code snippet         \hfill (n,i)\\
\hline \Rep\verb'\nf'  & pick up function prototype\hfill (n,v,i)\\
       \Rep\verb'\np'  &                           \hfill (n,v,i)\\
\hline \Rep\verb'\nm'  & pick up method prototype  \hfill (n,v,i)\\
\hline     \verb'\ni'  & insert prototype(s)       \hfill (n,i)\\
\hline     \verb'\nc'  & clear  prototype(s)       \hfill (n,i)\\
\hline     \verb'\ns'  & show   prototype(s)       \hfill (n,i)\\
%
\hline     \verb'\ntl' & edit local templates      \hfill (n,i)\\
\hline     \verb'\ntr' & reread the templates      \hfill (n,i)\\
\hline     \verb'\njt' & insert jump tag           \hfill (n,i)\\
\hline
%%----------------------------------------------------------------------
%%  idioms menu
%%----------------------------------------------------------------------
\hline 
\multicolumn{2}{|r|}{\textsl{\textbf{I}dioms}}   \\
\hline \verb'\if'  & function                           \hfill (n,v,i)\\
\hline \verb'\isf' & static function                    \hfill (n,v,i)\\
\hline \verb'\im'  & \verb'main()'                      \hfill (n,v,i)\\
\hline \verb'\ie'  & \verb'enum'   + \verb'typedef'     \hfill (n,v,i)\\
\hline \verb'\is'  & \verb'struct' + \verb'typedef'     \hfill (n,v,i)\\
\hline \verb'\iu'  & \verb'union'  + \verb'typedef'     \hfill (n,v,i)\\
\hline \verb'\ipr' & \verb'printf()'                    \hfill (n,i)\\
\hline \verb'\isc' & \verb'scanf()'                     \hfill (n,i)\\
\hline \verb'\ica' & \verb'p=calloc()'                  \hfill (n,i)\\
\hline \verb'\ima' & \verb'p=malloc()'                  \hfill (n,i)\\
\hline \verb'\ire' & \verb'p=realloc()'                 \hfill (n,i)\\
\hline \verb'\isi' & \verb'sizeof()'                    \hfill (n,v,i)\\
\hline \verb'\ias' & \verb'assert()'                    \hfill (n,v,i)\\
\hline \verb'\ii'  & open input file                    \hfill (n,v,i)\\
\hline \verb'\io'  & open output file                   \hfill (n,v,i)\\
\hline \verb'\ifsc'& fscanf                             \hfill (n,i)\\
\hline \verb'\ifpr'& fprintf                            \hfill (n,i)\\
\hline \Rep\verb'\i0'  & \verb'for( x=0; x<n; x+=1 )'   \hfill (n,v,i)\\
\hline \Rep\verb'\in'  & \verb'for( x=n-1; x>=0; x-=1 )'\hfill (n,v,i)\\
\hline
\end{tabular}
%
%%======================================================================
%%  page 2, table, left   part        [[[1
%%======================================================================
%
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{12mm}|p{60mm}|}
%%----------------------------------------------------------------------
%%  C++ menu
%%----------------------------------------------------------------------
\hline 
\multicolumn{2}{|r|}{\textsl{C\textbf{++}}} \\
\hline \verb'\+ih'  & \verb$#include$ C++ Std. Lib. header \hfill (n,i)\\
\hline \verb'\+ich' & \verb$#include$ C   Std. Lib. header \hfill (n,i)\\
\hline \verb'\+om'  & output manipulators                  \hfill (n,i)\\
\hline \verb'\+fb'  & ios flagbits                         \hfill (n,i)\\
\hline
\hline \verb'\+c'   & class                                \hfill (n,i)\\
\hline \verb'\+cn'  & class (using \verb'new')             \hfill (n,i)\\
\hline \verb'\+tc'  & template class                       \hfill (n,i)\\
\hline \verb'\+tcn' & template class (using \verb'new')    \hfill (n,i)\\
\hline \verb'\+ec'  & error class                          \hfill (n,i)\\
\hline \verb'\+tf'  & template function                    \hfill (n,i)\\
\hline
\hline \verb'\+tr'  & \verb'try' \dots \verb'catch'        \hfill (n,v,i)\\
\hline \verb'\+ca'  & \verb'catch'                         \hfill (n,v,i)\\
\hline \verb'\+caa' & \verb'catch(...)'                    \hfill (n,v,i)\\
\hline
\hline \verb'\+ex'  & \verb'extern "C" { }'                \hfill (n,v,i)\\
\hline \verb'\+oif' & open input file                      \hfill (n,v,i)\\
\hline \verb'\+oof' & open output file                     \hfill (n,v,i)\\
\hline \verb'\+uns' & \verb'using namespace std;'          \hfill (n,v,i)\\
\hline \verb'\+un'  & \verb'using namespace xxx;'          \hfill (n,v,i)\\
\hline \verb'\+unb' & \verb'namespace xxx { }'             \hfill (n,v,i)\\
\hline \verb'\+na'  & namespace alias                      \hfill (n,v,i)\\
\hline \verb'\+rt'  & RTTI                                 \hfill (n,v,i)\\
%
\hline
\hline \verb'\+ic'  & class  implementation                   \hfill (n,i)\\
\hline \verb'\+icn' & class (using \verb'new') implementation \hfill (n,i)\\
\hline \verb'\+im'  & method implementation                   \hfill (n,i)\\
\hline \verb'\+ia'  & accessor implementation                 \hfill (n,i)\\
\hline \verb'\+itc' & template class  implementation          \hfill (n,i)\\
\hline \verb'\+itcn'& template class (using \verb'new') impl. \hfill (n,i)\\
\hline \verb'\+itm' & template method implementation          \hfill (n,i)\\
\hline \verb'\+ita' & template accessor implementation        \hfill (n,i)\\
\hline \verb'\+ioi' & operator >>                             \hfill (n,i)\\
\hline \verb'\+ioo' & operator <<                             \hfill (n,i)\\
\hline 
\end{tabular}
%
%%======================================================================
%%  page 2, table, middle part        [[[1
%%======================================================================
\vspace{100mm}
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{12mm}|p{58mm}|}
%%----------------------------------------------------------------------
%%  run menu
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{R}un}} \\
\hline \verb'\rc'  & save and compile                        \hfill (n,i)\\
\hline \verb'\rl'  & link                                    \hfill (n,i)\\
\hline \verb'\rr'  & run                                     \hfill (n,i)\\
\hline \verb'\ra'  & set comand line arguments               \hfill (n,i)\\
\hline \verb'\rd'  & start debugger                          \hfill (n,i)\\
\hline \verb'\re'  & executable to run$^1$                   \hfill (n,i)\\
%
\hline \verb'\rp'  & run \texttt{splint}$^2$                 \hfill (n,i)\\
\hline \verb'\rpa' & cmd. line arg. for \texttt{splint}      \hfill (n,i)\\
%
\hline \verb'\rcc' & run \texttt{cppcheck}$^3$               \hfill (n,i)\\
\hline \verb'\rccs'& severity for \texttt{cppcheck}          \hfill (n,i)\\
%
\hline \verb'\rk'  & run \texttt{ CodeCheck}$^4$             \hfill (n,i)\\
\hline \verb'\rka' & cmd. line arg. for \texttt{CodeCheck}   \hfill (n,i)\\
%
\hline \verb'\ri'  & run \texttt{ indent}        \hfill (n,i)\\
\hline \Rep\verb'\rh'  & hardcopy buffer         \hfill (n,i,v)\\
\hline \verb'\rs'  & show plugin settings        \hfill (n,i)\\
\hline \verb'\rx'  & set xterm size              \hfill (n,i, only Unix \& GUI)\\
\hline \verb'\ro'  & change output destination   \hfill (n,i)\\
\hline 
\end{tabular}
%
%%======================================================================
%%  page 2, table, right  part        [[[1
%%======================================================================
%
\begin{tabular}[]{|p{12mm}|p{58mm}|}
%%----------------------------------------------------------------------
%%  Tool Box : Make
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{Tool Box : \textbf{M}ake}} \\
\hline \verb'\rm'  & run \texttt{ make}$^1$                  \hfill (n,i)\\
\hline \verb'\rmc' & run \texttt{ make clean}$^1$            \hfill (n,i)\\
\hline \verb'\rmd' & run \texttt{ make doc}$^1$              \hfill (n,i)\\
\hline \verb'\rcm' & choose a makefile $^1$                  \hfill (n,i)\\
\hline \verb'\rma' & cmd. line arg. for \texttt{make}$^1$    \hfill (n,i)\\
\hline
%%----------------------------------------------------------------------
%%  Additional mappings
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textbf{Additional Mappings}$^5$}\\
\hline
\hline \textbf{typing}& \textbf{expansion}\\
\hline \verb'/*'      & \verb'/*  */' \hfill (i)\\
\hline \verb'/*'      & \verb'/* '\fbox{\small{(multiline) marked text}}\verb' */' \hfill (v)\\
\hline \verb'/*<CR>'  & \verb'/*'\hfill (i)\newline\verb' * |'\newline\verb' */'\\
\hline \verb'{<CR>'   & \verb'{'\hfill (i)\newline\verb'  |'\newline\verb'}'    \\
\hline \verb'{<CR>'   & \verb'{'\hfill (v)\newline\verb'  '\fbox{\small{(multiline) marked text}}\newline\verb'}'\\
\hline 
\end{tabular}
%
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
\begin{flushleft}
\large{\textbf{Ex Commands}}\\[1.0ex]
%
Set command line arguments (same as \textbackslash\texttt{ra})\\[1.0ex]
\texttt{ :CCmdlineArgs}\\[1.0ex]
%
Set severity for \texttt{cppcheck} (same as \textbackslash\texttt{rccs})\\[1.0ex]
\texttt{ :CppcheckSeverity}\\[1.0ex]
%
\vfill
\begin{minipage}[b]{65mm}%
%
\scriptsize{%
\hrulefill\\
$^1$ also working for filetype \textbf{make}\\
$^2$ \textit{www.splint.org}\\
$^3$ \textit{cppcheck.sourceforge.net}\\
$^4$ \textbf{CodeCheck}$^{TM}$ is a product of Abraxas Software, Inc.\\
$^5$ defined in \verb'~/ftplugin/c.vim'
}%
%
\end{minipage}
%
\end{flushleft}
%
\end{center}
\end{multicols}
\end{document}
% vim: foldmethod=marker foldmarker=[[[,]]]
