summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vim/README.csupport185
-rw-r--r--.vim/c-support/codesnippets/Makefile204
-rw-r--r--.vim/c-support/codesnippets/Makefile.multi-target.template70
-rw-r--r--.vim/c-support/codesnippets/calloc_double_matrix.c36
-rw-r--r--.vim/c-support/codesnippets/calloc_int_matrix.c35
-rw-r--r--.vim/c-support/codesnippets/main.c20
-rw-r--r--.vim/c-support/codesnippets/main.cc19
-rw-r--r--.vim/c-support/codesnippets/print_array.cc.noindent29
-rw-r--r--.vim/c-support/codesnippets/print_double_array.c.noindent34
-rw-r--r--.vim/c-support/codesnippets/print_int_array.c.noindent34
-rw-r--r--.vim/c-support/doc/ChangeLog398
-rw-r--r--.vim/c-support/doc/c-hotkeys.pdfbin40430 -> 0 bytes
-rw-r--r--.vim/c-support/doc/c-hotkeys.tex366
-rw-r--r--.vim/c-support/rc/customization.ctags8
-rw-r--r--.vim/c-support/rc/customization.gvimrc57
-rw-r--r--.vim/c-support/rc/customization.indent.pro8
-rw-r--r--.vim/c-support/rc/customization.vimrc222
-rwxr-xr-x.vim/c-support/scripts/wrapper.sh30
-rw-r--r--.vim/c-support/templates/Templates30
-rw-r--r--.vim/c-support/templates/c.comments.template160
-rw-r--r--.vim/c-support/templates/c.cpp.template487
-rw-r--r--.vim/c-support/templates/c.idioms.template133
-rw-r--r--.vim/c-support/templates/c.preprocessor.template49
-rw-r--r--.vim/c-support/templates/c.statements.template69
-rw-r--r--.vim/c-support/templates/cpp.comments.template168
-rw-r--r--.vim/c-support/templates/cpp.cpp.template450
-rw-r--r--.vim/c-support/templates/cpp.idioms.template109
-rw-r--r--.vim/c-support/templates/cpp.preprocessor.template50
-rw-r--r--.vim/c-support/templates/cpp.statements.template72
-rw-r--r--.vim/c-support/wordlists/c-c++-keywords.list209
-rw-r--r--.vim/c-support/wordlists/k+r.list108
-rw-r--r--.vim/c-support/wordlists/stl_index.list202
-rw-r--r--.vim/doc/csupport.txt2152
-rw-r--r--.vim/ftplugin/c.vim436
-rw-r--r--.vim/plugin/buftabs.vim309
-rw-r--r--.vim/plugin/c.vim3550
-rw-r--r--.vimrc54
37 files changed, 33 insertions, 10519 deletions
diff --git a/.vim/README.csupport b/.vim/README.csupport
deleted file mode 100644
index 34cc02c..0000000
--- a/.vim/README.csupport
+++ /dev/null
@@ -1,185 +0,0 @@
-README for c.vim (Version 5.10) / February 05 2010
-
- * DESCRIPTION
- * INSTALLATION
- * RELEASE NOTES
- * FILES
- * ADDITIONAL TIPS
- * CREDITS
-
-================================================================================
- DESCRIPTION
-================================================================================
-C/C++-IDE for Vim/gVim. It is written to considerably speed up writing code in
-a consistent style. This is done by inserting complete statements, idioms,
-code snippets, templates, and comments. Syntax checking, compiling, running a
-program, running indent or code checkers can be done with a keystroke. There
-are many additional hints and options which can improve speed and comfort when
-writing C/C++. See the help file csupport.txt for more information.
-
-================================================================================
- INSTALLATION
-================================================================================
-The subdirectories in the zip archive cvim.zip mirror the directory structure
-which is needed below the local installation directory $HOME/.vim/ for
-LINUX/UNIX ($VIM/vimfiles/ for Windows; find the value of $VIM with ":echo
-$VIM" from inside Vim).
-
-(0) Save the template files in '$HOME/.vim/c-support/templates/Templates' if
- you have changed any of them.
-
-(1) Copy the zip archive cvim.zip to $HOME/.vim and run
-
- unzip cvim.zip
-
- If you have already an older version of bash-support and you have modified
- the template files you may want to save your templates first and suppress
- overwriting them with
-
- unzip cvim.zip -x *Templates *.template
-
-(2) Loading of plugin files must be enabled. If not use
-
- :filetype plugin on
-
- This is the minimal content of the file '$HOME/.vimrc'. Create one if there
- is none.
-
-(3) Set at least some personal details in the file
- '$HOME/.vim/c-support/templates/Templates'
- (file '$VIM\c-support/templates/Templates' under Windows). Here is the
- minimal personalization (my settings as an example):
-
- |AUTHOR| = Dr. Fritz Mehner
- |AUTHORREF| = fgm
- |EMAIL| = mehner@fh-swf.de
- |COMPANY| = FH Südwestfalen, Iserlohn
- |COPYRIGHT| = Copyright (c) |YEAR|, |AUTHOR|
-
- (Read more about the template system in the plugin documentation)
-
-(4) Consider additional settings in the file '$HOME/.vimrc'.
- The files customization.vimrc and customization.gvimrc are replacements or
- extensions for your .vimrc and .gvimrc ( _vimrc and _gvimrc under Windows).
- You may want to use parts of them. The files are documented.
-
-There are a lot of features and options which can be used and influenced:
-
- * use of template files and tags
- * surround marked blocks with statements
- * using and managing personal code snippets
- * generate/remove multiline comments
- * picking up prototypes
- * C/C++ dictionaries for keyword completion
- * (re)moving the root menu
-
-Restart gVim/Vim generate the help tags
-
- :helptags ~/.vim/doc
-
-and look at csupport help with
-
- :help csupport
-
-or use the 'help' item in the root menu of this plug-in.
-
- +-----------------------------------------------+
- | +-------------------------------------------+ |
- | | ** PLEASE READ THE DOCUMENTATION ** | |
- | | Actions differ for different modes! | |
- | +-------------------------------------------+ |
- +-----------------------------------------------+
-
-Any problems ? See the TROUBLESHOOTING section at the end of the help file
-'doc/csupport.txt'.
-
-================================================================================
- RELEASE NOTES FOR VERSION 5.10
-================================================================================
-- The plugin now handles different template styles without editing and
- reloading the main template file.
-- The number of template styles is not limited.
-- New hotkey and ex-command to switch template styles.
-- Template styles can automatically be related to file extensions.
-- indent(1) errors will be presented in a quickfix error window.
-- Comment alignment improved.
-- Minor improvements.
-
- OLDER RELEASE NOTES : see file 'ChangeLog'
-
-================================================================================
- FILES
-================================================================================
-
-README.csupport This file.
-
-doc/csupport.txt The help file for the local on-line help.
-
-ftplugin/c.vim A file type plug-in. Define hotkeys, creates a
- local dictionary for each C/C++ file.
-
-plugin/c.vim The C/C++ plug-in for GVIM.
-
-c-support/scripts/wrapper.sh The wrapper script for the use of a xterm.
-c-support/templates/* C-style and C++-style template files
- (see csupport.txt on how to adapt the templates).
-
-
-c-support/wordlists/c-c++-keywords.list All C and C++ keywords (also in word.list).
-c-support/wordlists/k+r.list K&R-Book: Words from the table of content.
- They appear frequently in comments.
-c-support/wordlists/stl_index.list STL: method and type names.
-
-
--------------------------- ---------------------------------------------------
- The following files and extensions are for
- convenience only. c.vim will work without them.
- ---------------------------------------------------
-c-support/doc/c-hotkeys.pdf Hotkey reference card.
-c-support/doc/ChangeLog The change log.
-
-rc/customization.ctags Additional settings I use in .ctags to enable
- navigation through makefiles ans qmake files with
- the plug-in taglist.vim.
-
-rc/customization.gvimrc Additional settings I use in .gvimrc :
- hot keys, mouse settings, ... The file is
- commented. Append it to your .gvimrc if you like.
-
-rc/customization.indent.pro Additional settings I use in .indent.pro :
- See the indent manual.
-
-rc/customization.vimrc Additional settings I use in .vimrc : incremental
- search, tabstop, hot keys, font, use of
- dictionaries, ... The file is commented. Append
- it to your .vimrc if you like.
-
-================================================================================
- CREDITS
-================================================================================
-
- Some ideas are taken from the following documents:
-
- 1. Recommended C Style and Coding Standards (Indian Hill Style Guide)
- www.doc.ic.ac.uk/lab/secondyear/cstyle/cstyle.html
- 2. Programming in C++, Ellemtel Telecommunication Systems Laboratories
- www.it.bton.ac.uk/burks/burks/language/cpp/cppstyle/ellhome.htm
- 3. C++ Coding Standard, Todd Hoff
- www.possibility.com/Cpp/CppCodingStandard.html
-
- The splint error format is taken from the file splint.vim (Vim standard
- distribution).
-
-------------------
-
- ... finally
-
-Johann Wolfgang von Goethe (1749-1832), the greatest of the German poets,
-about LINUX, Vim/gVim and other great tools (Ok, almost.) :
-
- Ein Mann, der recht zu wirken denkt, Who on efficient work is bent,
- Muß auf das beste Werkzeug halten. Must choose the fittest instrument.
-
-Faust, Teil 1, Vorspiel auf dem Theater Faust, Part 1, Prologue for the Theatre
-
-================================================================================
diff --git a/.vim/c-support/codesnippets/Makefile b/.vim/c-support/codesnippets/Makefile
deleted file mode 100644
index 4b02b54..0000000
--- a/.vim/c-support/codesnippets/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-#===============================================================================
-#
-# Filename: Makefile
-# Description:
-#
-# Usage: make (generate executable )
-# make clean (remove objects, executable, prerequisits )
-# make tarball (generate compressed archive )
-# make zip (generate compressed archive )
-#
-# Version: 1.0
-# Created:
-# Revision: ---
-#
-# Author:
-# Company:
-# Email:
-#
-# Notes: This is a GNU make (gmake) makefile.
-# C extension : c
-# C++ extensions : cc cpp C
-# C and C++ sources can be mixed.
-# Prerequisites are generated automatically; makedepend is not
-# needed (see documentation for GNU make Version 3.80, July 2002,
-# section 4.13). The utility sed is used.
-#========================================== makefile template version 1.8 ======
-
-# DEBUG can be set to YES to include debugging info, or NO otherwise
-DEBUG := YES
-
-# PROFILE can be set to YES to include profiling info, or NO otherwise
-PROFILE := NO
-
-# ------------ name of the executable ----------------------------------------
-EXECUTABLE := main
-
-# ------------ list of all source files --------------------------------------
-SOURCES := main.c
-
-# ------------ compiler ------------------------------------------------------
-CC := gcc
-CXX := g++
-
-# ------------ compiler flags ------------------------------------------------
-DEBUG_CFLAGS := -Wall -ansi -pedantic -O0 -g
-RELEASE_CFLAGS := -Wall -ansi -pedantic -O3
-
-# ------------ linker flags --------------------------------------------------
-DEBUG_LDFLAGS := -g
-RELEASE_LDFLAGS :=
-
-ifeq (YES, ${DEBUG})
- CFLAGS := ${DEBUG_CFLAGS}
- CXXFLAGS := ${DEBUG_CXXFLAGS}
- LDFLAGS := ${DEBUG_LDFLAGS}
-else
- CFLAGS := ${RELEASE_CFLAGS}
- CXXFLAGS := ${RELEASE_CXXFLAGS}
- LDFLAGS := ${RELEASE_LDFLAGS}
-endif
-
-ifeq (YES, ${PROFILE})
- CFLAGS := ${CFLAGS} -pg -O3
- CXXFLAGS := ${CXXFLAGS} -pg -O3
- LDFLAGS := ${LDFLAGS} -pg
-endif
-
-# ------------ additional system include directories -------------------------
-GLOBAL_INC_DIR =
-
-# ------------ private include directories -----------------------------------
-LOCAL_INC_DIR = $(HOME)/include
-
-# ------------ system libraries (e.g. -lm ) ---------------------------------
-SYS_LIBS = -lm
-
-# ------------ additional system library directories -------------------------
-GLOBAL_LIB_DIR =
-
-# ------------ additional system libraries -----------------------------------
-GLOBAL_LIBS =
-
-# ------------ private library directories -----------------------------------
-LOCAL_LIB_DIR = $(HOME)/lib
-
-# ------------ private libraries (e.g. libxyz.a ) ---------------------------
-LOCAL_LIBS =
-
-# ------------ archive generation ---------------------------------------------
-TARBALL_EXCLUDE = *.{o,gz,zip}
-ZIP_EXCLUDE = *.{o,gz,zip}
-
-# ------------ run executable out of this Makefile (yes/no) -----------------
-# ------------ cmd line parameters for this executable -----------------------
-EXE_START = no
-EXE_CMDLINE =
-
-#===============================================================================
-# The following statements usually need not to be changed
-#===============================================================================
-
-C_SOURCES = $(filter %.c, $(SOURCES))
-CPP_SOURCES = $(filter-out %.c, $(SOURCES))
-ALL_INC_DIR = $(addprefix -I, $(LOCAL_INC_DIR) $(GLOBAL_INC_DIR))
-ALL_LIB_DIR = $(addprefix -L, $(LOCAL_LIB_DIR) $(GLOBAL_LIB_DIR))
-GLOBAL_LIBSS = $(addprefix $(GLOBAL_LIB_DIR)/, $(GLOBAL_LIBS))
-LOCAL_LIBSS = $(addprefix $(LOCAL_LIB_DIR)/, $(LOCAL_LIBS))
-ALL_CFLAGS = $(CFLAGS) $(ALL_INC_DIR)
-ALL_LFLAGS = $(LDFLAGS) $(ALL_LIB_DIR)
-BASENAMES = $(basename $(SOURCES))
-
-# ------------ generate the names of the object files ------------------------
-OBJECTS = $(addsuffix .o,$(BASENAMES))
-
-# ------------ generate the names of the hidden prerequisite files -----------
-PREREQUISITES = $(addprefix .,$(addsuffix .d,$(BASENAMES)))
-
-# ------------ make the executable (the default goal) ------------------------
-$(EXECUTABLE): $(OBJECTS)
-ifeq ($(strip $(CPP_SOURCES)),)
- $(CC) $(ALL_LFLAGS) -o $(EXECUTABLE) $(OBJECTS) $(LOCAL_LIBSS) $(GLOBAL_LIBSS) $(SYS_LIBS)
-else
- $(CXX) $(ALL_LFLAGS) -o $(EXECUTABLE) $(OBJECTS) $(LOCAL_LIBSS) $(GLOBAL_LIBSS) $(SYS_LIBS)
-endif
-ifeq ($(EXE_START),yes)
- ./$(EXECUTABLE) $(EXE_CMDLINE)
-endif
-
-# ------------ include the automatically generated prerequisites -------------
-# ------------ if target is not clean, tarball or zip -------------
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),tarball)
-ifneq ($(MAKECMDGOALS),zip)
-include $(PREREQUISITES)
-endif
-endif
-endif
-
-# ------------ make the objects ----------------------------------------------
-%.o: %.c
- $(CC) -c $(ALL_CFLAGS) $<
-
-%.o: %.cc
- $(CXX) -c $(ALL_CFLAGS) $<
-
-%.o: %.cpp
- $(CXX) -c $(ALL_CFLAGS) $<
-
-%.o: %.C
- $(CXX) -c $(ALL_CFLAGS) $<
-
-# ------------ make the prerequisites ----------------------------------------
-#
-.%.d: %.c
- @$(make-prerequisite-c)
-
-.%.d: %.cc
- @$(make-prerequisite-cplusplus)
-
-.%.d: %.cpp
- @$(make-prerequisite-cplusplus)
-
-.%.d: %.C
- @$(make-prerequisite-cplusplus)
-
-# canned command sequences
-# echoing of the sed command is suppressed by the leading @
-
-define make-prerequisite-c
- @$(CC) -MM $(ALL_CFLAGS) $< > $@.$$$$; \
- sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' < $@.$$$$ > $@; \
- rm -f $@.$$$$;
-endef
-
-define make-prerequisite-cplusplus
- @$(CXX) -MM $(ALL_CFLAGS) $< > $@.$$$$; \
- sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' < $@.$$$$ > $@; \
- rm -f $@.$$$$;
-endef
-
-# ------------ remove generated files ----------------------------------------
-# ------------ remove hidden backup files ------------------------------------
-clean:
- -rm --force $(EXECUTABLE) $(OBJECTS) $(PREREQUISITES) *~
-
-# ------------ tarball generation ----------------------------------------------
-tarball:
- @lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
- rm --force $$lokaldir.tar.gz; \
- tar --exclude=$(TARBALL_EXCLUDE) \
- --create \
- --gzip \
- --verbose \
- --file $$lokaldir.tar.gz *
-
-# ------------ zip -------------------------------------------------------------
-zip:
- @lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
- zip -r $$lokaldir.zip * -x $(ZIP_EXCLUDE)
-
-.PHONY: clean tarball zip
-
-# ==============================================================================
-# vim: set tabstop=2: set shiftwidth=2:
diff --git a/.vim/c-support/codesnippets/Makefile.multi-target.template b/.vim/c-support/codesnippets/Makefile.multi-target.template
deleted file mode 100644
index 75da8dd..0000000
--- a/.vim/c-support/codesnippets/Makefile.multi-target.template
+++ /dev/null
@@ -1,70 +0,0 @@
-#===============================================================================
-#
-# File: Makefile
-# Description:
-#
-# Usage: make (generate executable(s) )
-# make clean (remove objects, executables, prerequisits )
-# make tarball (generate compressed archive )
-# make zip (generate compressed archive )
-#
-# Author: Dr.-Ing. Fritz Mehner
-# Email: mehner@mfh-iserlohn.de
-# Created:
-#
-#===============================================================================
-
-
-CC = gcc
-CCP = g++
-CFLAGS = -c -g -Wall
-LFLAGS = -g
-SYS_LIBS = -lm
-TARBALL_EXCLUDE = "*.{o,gz,zip}"
-ZIP_EXCLUDE = *.o *.gz *.zip
-
-TARGETS = target_1 target_2
-
-#---------- targets --------------------------------------
-all: $(TARGETS)
-
-%.o: %.c
- $(CC) $(CFLAGS) $*.c
-
-%.o: %.cc
- $(CCP) $(CFLAGS) $*.cc
-
-#---------- target 1 -------------------------------------
-# C target
-target_1: target_1.o
- $(CC) $(LFLAGS) -o $@ $@.o $(SYS_LIBS)
-
-#---------- target 2 -------------------------------------
-# C++ target
-target_2: target_2.o
- $(CCP) $(LFLAGS) -o $@ $@.o $(SYS_LIBS)
-
-
-#---------- target 3 -------------------------------------
-
-
-
-#---------- tarball --------------------------------------
-tarball:
- lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
- rm --force $$lokaldir.tar.gz; \
- tar --exclude=$(TARBALL_EXCLUDE) \
- --create \
- --gzip \
- --verbose \
- --file $$lokaldir.tar.gz *
-
-#---------- zip ------------------------------------------
-zip:
- lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
- zip -r $$lokaldir.zip * -x $(ZIP_EXCLUDE)
-
-#---------- clear up -------------------------------------
-clean:
- rm --force $(EXECUTABLE) $(OBJECTS) $(PREREQUISITES)
-
diff --git a/.vim/c-support/codesnippets/calloc_double_matrix.c b/.vim/c-support/codesnippets/calloc_double_matrix.c
deleted file mode 100644
index ec71658..0000000
--- a/.vim/c-support/codesnippets/calloc_double_matrix.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/*
- * === FUNCTION ======================================================================
- * Name: calloc_double_matrix
- * Description: Allocate a dynamic double-matrix of size rows*columns;
- * return a pointer.
- * =====================================================================================
- */
- double**
-calloc_double_matrix ( int rows, int columns )
-{
- int i;
- double **m;
- m = calloc ( rows, sizeof(double*) ); /* allocate pointer array */
- assert( m != NULL); /* abort if allocation failed */
- *m = calloc ( rows*columns, sizeof(double) );/* allocate data array */
- assert(*m != NULL); /* abort if allocation failed */
- for ( i=1; i<rows; i+=1 ) /* set pointers */
- m[i] = m[i-1] + columns;
- return m;
-} /* ---------- end of function calloc_double_matrix ---------- */
-
-/*
- * === FUNCTION ======================================================================
- * Name: free_matrix_double
- * Description: Free a dynamic double-matrix.
- * =====================================================================================
- */
- void
-free_double_matrix ( double **m )
-{
- free(*m); /* free data array */
- free( m); /* free pointer array */
- return ;
-} /* ---------- end of function free_double_matrix ---------- */
-
diff --git a/.vim/c-support/codesnippets/calloc_int_matrix.c b/.vim/c-support/codesnippets/calloc_int_matrix.c
deleted file mode 100644
index e21215b..0000000
--- a/.vim/c-support/codesnippets/calloc_int_matrix.c
+++ /dev/null
@@ -1,35 +0,0 @@
-
-/*
- * === FUNCTION ======================================================================
- * Name: calloc_int_matrix
- * Description: Allocate a dynamic int-matrix of size rows*columns; return a pointer.
- * =====================================================================================
- */
-int**
-calloc_int_matrix ( int rows, int columns )
-{
- int i;
- int **m;
- m = calloc ( rows, sizeof(int*) ); /* allocate pointer array */
- assert( m != NULL ); /* abort if allocation failed */
- *m = calloc ( rows*columns, sizeof(int) ); /* allocate data array */
- assert(*m != NULL ); /* abort if allocation failed */
- for ( i=1; i<rows; i+=1 ) /* set pointers */
- m[i] = m[i-1] + columns;
- return m;
-} /* ---------- end of function calloc_int_matrix ---------- */
-
-/*
- * === FUNCTION ======================================================================
- * Name: free_int_matrix
- * Description: Free a dynamic int-matrix.
- * =====================================================================================
- */
-void
-free_int_matrix ( int **m )
-{
- free(*m); /* free data array */
- free( m); /* free pointer array */
- return ;
-} /* ---------- end of function free_int_matrix ---------- */
-
diff --git a/.vim/c-support/codesnippets/main.c b/.vim/c-support/codesnippets/main.c
deleted file mode 100644
index 770f5d5..0000000
--- a/.vim/c-support/codesnippets/main.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <errno.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * === FUNCTION ======================================================================
- * Name: main
- * Description: main function
- * =====================================================================================
- */
- int
-main ( int argc, char *argv[] )
-{
- printf ("\nProgram %s\n\n", argv[0] );
-
- return EXIT_SUCCESS;
-} /* ---------- end of function main ---------- */
-
diff --git a/.vim/c-support/codesnippets/main.cc b/.vim/c-support/codesnippets/main.cc
deleted file mode 100644
index f3060ef..0000000
--- a/.vim/c-support/codesnippets/main.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <cstdlib>
-#include <fstream>
-#include <iomanip>
-#include <iostream>
-
-using namespace std;
-
-// === FUNCTION ======================================================================
-// Name: main
-// Description: main function
-// =====================================================================================
- int
-main ( int argc, char *argv[] )
-{
- cout << "\nProgram " << argv[0] << endl << endl;
-
- return EXIT_SUCCESS;
-} // ---------- end of function main ----------
-
diff --git a/.vim/c-support/codesnippets/print_array.cc.noindent b/.vim/c-support/codesnippets/print_array.cc.noindent
deleted file mode 100644
index 52c43d3..0000000
--- a/.vim/c-support/codesnippets/print_array.cc.noindent
+++ /dev/null
@@ -1,29 +0,0 @@
-
-// === FUNCTION ======================================================================
-// Name: print_array
-// Description: Print an array with one dimension.
-// Use
-// print_array<T,w>( *matrix, n1*n2, n2, "matrix" );
-// for
-// T matrix[n1][n2];
-// =====================================================================================
- template <class T, int width>
-void print_array ( T *array, // array to print
- int n, // number of elements to print
- int nrow, // number of elements per row
- string arrayname // array name
- )
-{
- string line(" index | content\n ------+-");
-
- cout << "\n\n array \"" << arrayname << "\", length " << n << endl << endl;
- cout << line.append(width*nrow, '-');
- for ( int i=0; i<n; i+=1 ) {
- if( i%nrow == 0 )
- cout << endl << setw(6) << i << " | ";
- cout << "" << setw(width) << fixed << setprecision(2) << array[i];
- }
- cout << endl << endl;
- return ;
-} // ---------- end of function print_double_array ----------
-
diff --git a/.vim/c-support/codesnippets/print_double_array.c.noindent b/.vim/c-support/codesnippets/print_double_array.c.noindent
deleted file mode 100644
index c6bea02..0000000
--- a/.vim/c-support/codesnippets/print_double_array.c.noindent
+++ /dev/null
@@ -1,34 +0,0 @@
-
-/*
- * === FUNCTION ======================================================================
- * Name: print_double_array
- * Description: Print a double-array with one dimension.
- * Use
- * print_int_array( *matrix, n1*n2, n2, "matrix" );
- * for
- * double matrix[n1][n2];
- * =====================================================================================
- */
-static void
-print_double_array ( double array[], /* array to print */
- int n, /* number of elements to print */
- int nrow, /* number of elements per row */
- char *arrayname /* array name */
- )
-{
- int i;
- printf ("\n\n array \"%s\", length %d\n", arrayname, n );
- printf ("\n index | content\n" );
- printf ( " ------+-" );
- for ( i = 0; i < nrow; i += 1 )
- printf ( "---------" );
- for ( i=0; i<n; i+=1 )
- {
- if( i%nrow == 0 )
- printf ("\n%6d | ", i );
- printf (" %8.2f", array[i] );
- }
- printf ("\n\n");
- return ;
-} /* ---------- end of function print_double_array ---------- */
-
diff --git a/.vim/c-support/codesnippets/print_int_array.c.noindent b/.vim/c-support/codesnippets/print_int_array.c.noindent
deleted file mode 100644
index fc32043..0000000
--- a/.vim/c-support/codesnippets/print_int_array.c.noindent
+++ /dev/null
@@ -1,34 +0,0 @@
-
-/*
- * === FUNCTION ======================================================================
- * Name: print_int_array
- * Description: Print an int-array with one dimension.
- * Use
- * print_int_array( *matrix, n1*n2, n2, "matrix" );
- * for
- * int matrix[n1][n2];
- * =====================================================================================
- */
-static void
-print_int_array ( int array[], /* array to print */
- int n, /* number of elements to print */
- int nrow, /* number of elements per row */
- char *arrayname /* array name */
- )
-{
- int i;
- printf ("\n\n array \"%s\", length %d\n", arrayname, n );
- printf ("\n index | content\n" );
- printf ( " ------+-" );
- for ( i = 0; i < nrow; i += 1 )
- printf ( "-------" );
- for ( i=0; i<n; i+=1 )
- {
- if( i%nrow == 0 )
- printf ("\n%6d | ", i );
- printf (" %6d", array[i] );
- }
- printf ("\n\n");
- return ;
-} /* ---------- end of function print_int_array ---------- */
-
diff --git a/.vim/c-support/doc/ChangeLog b/.vim/c-support/doc/ChangeLog
deleted file mode 100644
index 25176da..0000000
--- a/.vim/c-support/doc/ChangeLog
+++ /dev/null
@@ -1,398 +0,0 @@
-================================================================================
- RELEASE NOTES FOR VERSION 5.9
-================================================================================
-+ Two additional hotkeys (+ ex commands) for preprocessor statements.
-+ Compile-link-run: improved error detection.
-+ Menu Run: hardcopy can print any buffer.
-+ Several minor improvements and bugfixes.
-
-================================================================================
- RELEASE NOTES FOR VERSION 5.8
-================================================================================
-+ Hotkeys are shown in the menus.
-+ File browser for code snippets and templates choosable (2 global variables).
-+ Two new hotkeys: include file description (implementation, header).
-+ New menu item: namespace alias
-+ Bugfix: wrapper script for use of a xterm could not handle parameters containing blanks.
-+ Several minor improvements.
-
-================================================================================
- RELEASE NOTES FOR VERSION 5.7
-================================================================================
-+ 4 new hotkeys : insert file section comments (C/C++/H), special comments,
- keyword comments.
-+ Adjusting end-of-line comment adjustment improved.
-
-================================================================================
- RELEASE NOTES FOR VERSION 5.6
-================================================================================
-+ Jump targets (templates) and mapping Ctrl-j can be switched off.
-+ Yet unused jump targets will be highlighted after a file is opened.
-+ Statements menu: else block (key mapping \se).
-+ Handling of <SPLIT> improved (templates).
-+ Minor improvements.
-
-================================================================================
- RELEASE NOTES FOR VERSION 5.5
-================================================================================
-+ Additional plugin-tags (jump targets in templates): <+text+>, <-text->.
-+ Additional mapping Ctrl-j : jump to these new targets.
-+ Template-file: additional macro |STYLE| and IF-ENDIF-construct to easily
- choose between sets of templates.
-+ Additional mapping: auto-complete classical C comment (also multi-line).
-+ Additional mapping: auto-complete open block starting with {<CR> .
-+ Visual mode for date and time insertion (menu 'Comments').
-+ Visual mode for tags (submenu 'Comments->tags (plugin)').
-+ Bugfix: hotkey \ica not working
-+ Bugfix: hotkey Shift-F2 for the alternate-plugin disappeared.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.4
-=======================================================================================
-+ New hotkey \+co inserts ' cout << << endl;'
-+ New menu item C++-menu: 'cout' replaces 'cout variable' and 'cout string'.
-+ Hotkey \c/ removed ( \cc does the same).
-+ Bugfix: after an unsuccessful compilation screen sometimes garbled.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.3
-=======================================================================================
-+ Insertions work properly when folding is used.
-+ Menu items Idioms->for(...) : type declaration for loop variable possible (tab completion).
-+ Specification of command line arguments (Run->cmd. line arg.): filename completion active.
-+ New main menu item 'show manual' (hotkey \hm): read manual for word under cursor.
-+ One hotkey renamed: \h -> \hp (help plugin)
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.2.1
-=======================================================================================
-+ Bugfix: stray characters whith three dialogs
-+ Bugfix: Missing parameter in 2 internal function calls
-+ Menu items 'Snippets->edit local/global templates' start an file browser (convenience).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.2
-=======================================================================================
-+ Superfluous control characters for mode switching (menus, hotkeys) removed. Caused beeps.
-+ Template files (local/global) can be opened from the snippet menu.
-+ Three new preprocessor statements.
-+ v-mode for RTTI-entries.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.1
-=======================================================================================
-+ Definition and implementation of classes have now different templates and menu entries.
-+ Accessor methods (get/set) can be generated.
-+ New templates: everything other than language keywords comes from a template
- (and is user changeable).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0.5
-=======================================================================================
-+ Bugfix: on a few systems doubling of path components in the run command (F9).
- Skip this upgrade if you do not have this problem.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0.4
-=======================================================================================
-+ Format for the macros |DATE|, |TIME|, and |YEAR| can be defined by the user.
-+ Help text improved.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0.3
-=======================================================================================
-+ Code snippets can now be used in the console mode (Vim without GUI).
-+ Bugfix: Possible conflict with 'indent' removed when inserting templates.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0.2
-=======================================================================================
-+ Bugfix: Prototype picker did not alway delete no longer used prototypes.
-+ Bugfix: Prototype picker removed template specializations from parameter lists.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0.1
-=======================================================================================
-+ Bugfix: autocmd setting can influence autocmd settings of OTHER plugins.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 5.0
-=======================================================================================
-+ Completely new template system. Now every menu item is user definable.
-+ Changes to allow a system-wide installation.
-+ A few hotkeys added and renamed.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.6.1
-=======================================================================================
-+ New global variable to control the filetype of *.h header files (default is now 'cpp').
-+ Bugfix: properly resetting 'compiler' after using make, splint, and CodeCheck.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.6
-=======================================================================================
-+ New insert mode mappings (comments, statements, preprocessing, idioms, C++).
-+ Some mappings renamed (easier to remember).
-+ New tag (basename of a file reduced to characters allowed in names).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.5
-=======================================================================================
-+ New menu item and hotkey for the (re)alignement of end-of-line comments.
-+ Hotkey \cn removed. Only one menu item for end-of-line comments left.
-+ Changed hotkeys: \ce -> \cl and \cl -> \cs .
-+ Three new tags (giving the basename of a file) for writing template files.
-+ Prototype picker handles template methods.
-+ Bugfix: splint works now under Windows.
-+ Minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.4
-=======================================================================================
-+ Plugin directories rearranged.
-+ main- and for-idiom have a visual mode now.
-+ Four new commands (command line) to control the comment style.
-+ Comment style (C/C++) can automatically follow the filetype.
-+ Bugfix: empty new file after removing the header template can't be closed.
-+ Bugfix : Tools entry missing when root menu not shown from the start.
-+ Minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.3
-=======================================================================================
-+ CodeCheck (TM) integrated (source code analysing tool).
-+ New key mappings for preprocessor statements.
-+ New preprocessor menu.
-+ Bugfix: indent under Windows.
-+ Minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.2.1
-=======================================================================================
-+ Bugfix: change needed for some menu names after patch 7.0.054 .
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.2
-=======================================================================================
-+ Setting the starting column for trailing comments improved.
-+ Small bug in block uncommenting fixed.
-+ Mac OS X : circumvent a Vim bug which caused a crash when loading plugin version 4.1.
-+ File syntax/c.vim removed (but see help in csupport.txt).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.1
-=======================================================================================
-+ A complete switch statement can be made from a list of labels.
-+ Additional cases can be made from a list of labels.
-+ Small bug in line end commenting fixed.
-+ Some minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 4.0
-=======================================================================================
-
-+ Kernighan & Ritchie style for block statements can be enabled.
-+ Changes to make it compatible with Vim 7.
-+ Set C/C++ file type for source files which should not be preprocessed (*.i, *.ii).
-+ Some minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.11
-=======================================================================================
-
-+ Hotkeys and an accompanying reference card added.
-+ Preparation for syntax based folding.
-+ Some minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.10
-=======================================================================================
-
-+ Remove "#if 0 ... #endif" from the inside.
-+ Change C comments to C++ comments and vice versa.
-+ try..catch / catch / catch(...) now can be set surround a marked area.
-+ Prototype picking improved (for C++).
-+ A hardcopy shows the localized date and time in the header line.
-+ New help menu entry in the main menu of this plugin (shows the plugin documentation).
-+ Switch between corresponding source and header files with <S-F2> if the plugin a.vim
- is present.
-+ Plugin can be used with autocompletion for (, [, and { .
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.9.1
-=======================================================================================
-
-+ Doubling of file header for new c- and h-files under Windows fixed (Thanks to
- Fabricio C A Oliveira).
-+ Tiny bug in the file open idioms fixed.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.9
-=======================================================================================
-
-+ Formatter 'indent' integrated.
-+ Bugfix in the automatic header insertion.
-+ Assert idiom added.
-+ #if 0 ... #endif statement for blocking out code added.
-+ Minor stylistic improvements in some idioms.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.8.2
-=======================================================================================
-
-+ Screen update problem solved: color inversion under FC4 (Thanks to Bernie Barton).
-+ RTTI menu : additional v-mode.
-+ Statement menu and C++ menu rearranged.
-+ Include guard : name generation improved.
-+ File header templates will be included for additional file extensions (cp, cxx, c++, ...).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.8.1
-=======================================================================================
-
-+ More C++ output manipulators, manipulator insertion more intuitive.
-+ Output into buffer: cursor goes to top of file.
-+ Makefile template improved (code snippet).
-+ Some internal improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.8
-=======================================================================================
-
-+ Windows support. Most features are now available under Windows.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.7.2
-=======================================================================================
-
-+ Run buffer through splint (A tool for statically checking C programs; see
- http://www.splint.org). An error window will be opened; quickfix commands can be used.
-+ Set buffer related command line arguments for splint.
-+ Line end comments start in a fixed column (can be set from the menu).
-+ Spaces in path names and file names are now possible.
-+ Template files and snippet files are no longer kept in the list of alternate files.
-+ Some minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.7.1
-=======================================================================================
-
-+ Bug fixed (command line arguments not passed to the executable).
-+ File extension for executables can be set.
-+ Minor improvements.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.7
-=======================================================================================
-
-+ Running a program:
- (1) Run program from the gVim command line.
- (2) Run program and direct the output into a window with name "C-Output".
- This buffer and its content will disappear when closing the window.
- The buffer is reused when still open.
- (3) Run program in an xterm (adjustable).
-+ Command line arguments are now buffer related (each buffer can have its own arguments).
-+ Code snippets can be protected from being indented during insertion.
-+ Picked up prototypes will be deleted after insertion.
-+ A code snippet with the file name extension "ni" or "noindent" will not be
- indented on insertion.
-+ for- and calloc-/malloc-idioms improved.
-+ Bug fixed (word list handling).
-
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.6
-=======================================================================================
-
-+ Installation simplified.
-+ for-loop-idiom asks for control variable, initial value, ...
-+ malloc-idiom asks for pointer variable and size.
-+ Toggling the comment style works correct again.
-+ Empty error windows will be closed.
-+ Prototype picker removes trailing parts of the function body if marked.
-+ The dialog windows (GUI) have been replaced by more flexible command line inputs.
-+ The undocumented and unnecessary hot key F12 has been removed.
-+ Extension to ctags + taglist shows makefile targets and qmake targets.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.5
-=======================================================================================
-
-+ Aligned line end comments for consecutive lines.
-+ Improved prototype picker removes comments.
-+ Picked up prototypes can be shown.
-+ Uncomment more than one block at once.
-+ 3 new idioms.
-+ Help file improved .
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.4
-=======================================================================================
-
-+ Two new global variables: C_Dictionary_File, C_MenuHeader .
-+ The preprocessor statements #if... and the function idiom include marked
- lines when invoked in visual mode.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.3
-=======================================================================================
-
-+ The C/C++ root menu can be disabled.
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.2
-=======================================================================================
-
-+ Only one C/C++ entry in the gVim root menu.
-+ All hotkeys are only defined for C/C++ files (file type plugin added).
-+ The following constructs are now read as templates from files:
- class, class using new,
- template class, template class using new,
- error class
-+ Install script added.
-+ Customization improved.
-+ Documentation improved (help file added).
-+ Bug fix (template file handling)
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.1
-=======================================================================================
-
-+ When the comment style "C" is active the menu entry "Comments.code->comment"
- turns a marked region in one multiline C-comment.
-+ The menu entry "Comments.comment->code" turns marked multiline C-comment
- back into code.
-+ A marked region can be surrounded by a for-, if, if-else, while-, do-while-statement
- (with indentation).
-+ The menu entry "Snippets.make prototype" makes a C- or C++-prototype from
- the current line or marked region and puts it in an internal buffer.
-+ The menu entry "Snippets.add prototype" also makes a C- or C++-prototype from
- the current line or a marked region and adds it to the internal buffer.
-+ The menu entry "Snippets.put prototype" inserts all gathered prototypes
- below the current line.
-+ Tag substitution rewritten (Some characters in a substitution text for a tag
- prevented the tag from being substituted).
-
-=======================================================================================
- RELEASE NOTES FOR VERSION 3.0
-=======================================================================================
-
-+ C-style comments AND C++-style comments are supported now.
-+ The menu entry 'Comments->Comment style ..' switches the styles (toggle).
-+ Block comments are now read as templates or skeletons from files:
- Frame Block, Function Description, Method Description,
- Class Description, H+file header, C/C++-file header
-+ These templates can contain tags like |FILENAME|, |AUTHOR| etc. which are replaced
- after reading (KDevelop templates can be used without any change).
-+ indentation: multiline inserts and code snippets will be indented after insertion.
-+ Most menu entries are now also active in normal mode.
-+ new menu items:
- includes for the C99 header,
- includes for the standard C++ header,
- includes for the C++ version of the Standard C Library header,
- multiline C comment
- vim modeline
-+ Reading the templates is done in one function which can be called in an autocmd.
-+ Code cleanup: register z no longer used. Most function calls are silent now.
-
-
diff --git a/.vim/c-support/doc/c-hotkeys.pdf b/.vim/c-support/doc/c-hotkeys.pdf
deleted file mode 100644
index 2ac88bc..0000000
--- a/.vim/c-support/doc/c-hotkeys.pdf
+++ /dev/null
Binary files differ
diff --git a/.vim/c-support/doc/c-hotkeys.tex b/.vim/c-support/doc/c-hotkeys.tex
deleted file mode 100644
index d8dc844..0000000
--- a/.vim/c-support/doc/c-hotkeys.tex
+++ /dev/null
@@ -1,366 +0,0 @@
-%%=====================================================================================
-%%
-%% File: c-hotkeys.tex
-%%
-%% Description: c-support.vim : Key mappings for Vim without GUI.
-%%
-%%
-%% Author: Dr.-Ing. Fritz Mehner
-%% Email: mehner@fh-swf.de
-%% Copyright: Copyright (C) 2006-2010 Dr.-Ing. Fritz Mehner (mehner@fh-swf.de)
-%% Version: 1.0
-%% Created: 10.11.2006
-%% Revision: $Id: c-hotkeys.tex,v 1.33 2010/02/05 13:21:43 mehner Exp $
-%%
-%% Notes:
-%%
-%%=====================================================================================
-
-\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}{5.10}
-\newcommand{\ReleaseDate}{ February 2010}
-
-%%----------------------------------------------------------------------
-%% 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
-%%======================================================================
-\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.\\
-Plugin: http://vim.sourceforge.net\\
-\vspace{3.0mm}
-{\normalsize (i)} insert mode, {\normalsize (n)} normal mode, {\normalsize (v)} visual mode\\
-\vspace{5.0mm}
-%
-%%======================================================================
-%% table, left part
-%%======================================================================
-%%~~~~~ TABULAR : begin ~~~~~~~~~~
-\begin{tabular}[]{|p{10mm}|p{60mm}|}
-%
-\hline
-\multicolumn{2}{|r|}{\textsl{\textbf{C}omments}} \\
-\hline \verb'\cl' & end-of-line comment \hfill (n,v,i)\\
-\hline \verb'\cj' & adjust end-of-line comment \hfill (n,v,i)\\
-\hline \verb'\cs' & set end-of-line comment column \hfill (n) \\
-\hline \verb'\c*' & code $\Rightarrow$ comment \verb'/* */' \hfill (n,v) \\
-\hline \verb'\cc' & code $\Rightarrow$ comment \verb'//' \hfill (n,v) \\
-\hline \verb'\co' & comment $\Rightarrow$ code \hfill (n,v) \\
-
-\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'\cd' & date \hfill (n,v,i)\\
-\hline \verb'\ct' & date \& time \hfill (n,v,i)\\
-\hline
-\end{tabular}\\
-%%~~~~~ TABULAR : end ~~~~~~~~~~
-%
-%%======================================================================
-%% table, middle part
-%%======================================================================
-%
-%%~~~~~ 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'\s{ \sb' & \verb'{ }' \hfill (n,v,i)\\
-\hline
-%%----------------------------------------------------------------------
-%% preprocessor menu
-%%----------------------------------------------------------------------
-\hline
-\multicolumn{2}{|r|}{\textsl{\textbf{P}reprocessor}} \\
-\hline \verb'\ps' & choose a Std. Lib. include \hfill (n,i)\\
-\hline \verb'\pc' & choose a C99 include \hfill (n,i)\\
-\hline \verb'\p<' & \verb$#include<...>$ \hfill (n,i)\\
-\hline \verb'\p"' & \verb$#include"..."$ \hfill (n,i)\\
-\hline \verb'\pd' & \verb'#define' \hfill (n,i)\\
-\hline \verb'\pu' & \verb'#undef' \hfill (n,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'\pi0' & \verb'#if 0 #endif' \hfill (n,v,i)\\
-\hline \verb'\pr0' & remove \verb'#if 0 #endif' \hfill (n,i)\\
-\hline \verb'\pe' & \verb'#error ' \hfill (n,i)\\
-\hline \verb'\pl' & \verb'#line ' \hfill (n,i)\\
-\hline \verb'\pp' & \verb'#pragma' \hfill (n,i)\\
-\hline
-\end{tabular} \\
-%%~~~~~ TABULAR : end ~~~~~~~~~~
-
-%%======================================================================
-%% table, right part
-%%======================================================================
-%
-%%~~~~~ 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'\nw' & write code snippet \hfill (n,v,i)\\
-\hline \verb'\ne' & edit code snippet \hfill (n,i)\\
-\hline \verb'\np' & pick up 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'\ntg' & edit global templates \hfill (n,i)\\
-\hline \verb'\ntr' & reread the templates \hfill (n,i)\\
-\hline \verb'\nts' & change templates style \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'\i0' & \verb'for( x=0; x<n; x+=1 )' \hfill (n,v,i)\\
-\hline \verb'\in' & \verb'for( x=n-1; x>=0; x-=1 )' \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'\ip' & \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'\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
-\end{tabular}\\
-%
-%%======================================================================
-%% table, right part
-%%======================================================================
-%
-%%~~~~~ TABULAR : begin ~~~~~~~~~~
-\begin{tabular}[]{|p{12mm}|p{62mm}|}
-%%----------------------------------------------------------------------
-%% C++ menu
-%%----------------------------------------------------------------------
-\hline
-\multicolumn{2}{|r|}{\textsl{C\textbf{+}+}} \\
-\hline \verb'\+co' & \verb'cout << << endl; ' \hfill (n,i)\\
-\hline \verb'\+c' & class \hfill (n,i)\\
-\hline \verb'\+ps' & \verb$#include<...> STL$ \hfill (n,i)\\
-\hline \verb'\+pc' & \verb$#include<c..> C$ \hfill (n,i)\\
-\hline \verb'\+cn' & class (using \verb'new') \hfill (n,i)\\
-\hline \verb'\+ci' & class implementation \hfill (n,i)\\
-\hline \verb'\+cni' & class (using \verb'new') implementation \hfill (n,i)\\
-\hline \verb'\+mi' & method implementation \hfill (n,i)\\
-\hline \verb'\+ai' & accessor implementation \hfill (n,i)\\
-\hline \verb'\+tc' & template class \hfill (n,i)\\
-\hline \verb'\+tcn' & template class (using \verb'new') \hfill (n,i)\\
-\hline \verb'\+tci' & template class implementation \hfill (n,i)\\
-\hline \verb'\+tcni'& template class (using \verb'new') impl. \hfill (n,i)\\
-\hline \verb'\+tmi' & template method implementation \hfill (n,i)\\
-\hline \verb'\+tai' & template accessor implementation \hfill (n,i)\\
-\hline \verb'\+tf' & template function \hfill (n,i)\\
-\hline \verb'\+ec' & error class \hfill (n,i)\\
-\hline \verb'\+tr' & \verb'try' \dots \verb'catch' \hfill (n,v,i)\\
-\hline \verb'\+ca' & \verb'catch' \hfill (n,v,i)\\
-\hline \verb'\+c.' & \verb'catch(...)' \hfill (n,v,i)\\
-\hline
-%%----------------------------------------------------------------------
-%% 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'\rm' & run \texttt{make} \hfill (n,i)\\
-\hline \verb'\rg' & cmd.\ line arg.\ for \texttt{make} \hfill (n,i)\\
-%
-\hline \verb'\rp' & run \texttt{splint}$^1$ \hfill (n,i)\\
-\hline \verb'\ri' & cmd.\ line arg.\ for \texttt{splint} \hfill (n,i)\\
-%
-\hline \verb'\rk' & run \texttt{CodeCheck}$^2$ \hfill (n,i)\\
-\hline \verb'\re' & cmd.\ line arg.\ for \texttt{CodeCheck} \hfill (n,i)\\
-%
-\hline \verb'\rd' & run \texttt{indent} \hfill (n,i)\\
-\hline \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}
-%
-%%----------------------------------------------------------------------
-%% load / unload menu entry
-%%----------------------------------------------------------------------
-\begin{tabular}[]{|p{12mm}|p{52mm}|}
-\hline
-%\multicolumn{2}{|r|}{\textsl{Menu(s)}}\\
-%%----------------------------------------------------------------------
-%% show plugin help
-%%----------------------------------------------------------------------
-%\hline
-\multicolumn{2}{|r|}{\textsl{\textbf{H}elp and Menus}}\\
-\hline \verb'\hm' & show manual \hfill (n,i)\\
-\hline \verb'\hp' & help (c-support) \hfill (n,i)\\
-\hline \verb'\lcs' & load Menus\hfill \scriptsize{(n \& GUI only)}\\
-\hline \verb'\ucs' & unload Menus\hfill \scriptsize{(n \& GUI only)}\\
-\hline
-\end{tabular}
-%%~~~~~ TABULAR : end ~~~~~~~~~~
-%
-%
-\begin{minipage}[b]{66mm}%
-\vspace{10mm}
-%
-\begin{flushleft}
-%
-\textit{Ex commands:}
-\begin{description}
-%
-\item [CFileSection]
-C/C++--file sections (same as \verb'\ccs')
-%
-\item [HFileSection]
-H--file sections (same as \verb'\chs')
-%
-\item [KeywordComment]
-keyword comment (same as \verb'\ckc')
-%
-\item [SpecialComment]
-special comment (same as \verb'\csc')
-%
-\item [IncludeStdLibrary]
-standard library includes (same as \verb'\ps')
-%
-\item [IncludeC99Library]
-C99 includes (same as \verb'\pc')
-%
-\item [IncludeCppLibrary]
-STL includes (same as \verb'\+ps')
-%
-\item [IncludeCppCLibrary]
-C includes (same as \verb'\+pc')
-%
-\item [CStyle]
-C99 include (same as \verb'\nts')
-%
-\end{description}
-%
-Use tab expansion to show the items to choose from.
-%
-\end{flushleft}
-%
-\end{minipage}\\
-%
-\begin{minipage}[b]{64mm}%
-\scriptsize{%
-\vspace{10mm}
-\hrulefill\\
-$^1$ {www.splint.org}\\
-$^2$ \textbf{CodeCheck}$^{TM}$ is a product of Abraxas Software, Inc.
-}%
-\end{minipage}\\
-%
-\begin{minipage}[b]{64mm}%
-
-\setlength{\fboxsep}{.25mm}
-%%----------------------------------------------------------------------
-%% Additional Mappings
-%%----------------------------------------------------------------------
-\begin{spacing}{1.2}
-\begin{tabular}[]{|p{12mm}|p{56mm}|}
-\hline
-\multicolumn{2}{|r|}{\textsl{Additional Mappings}}\\
-\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}
-\end{spacing}
-%%~~~~~ TABULAR : end ~~~~~~~~~~
-%
-\end{minipage}%
-%
-\end{center}
-\end{multicols}
-\end{document}
diff --git a/.vim/c-support/rc/customization.ctags b/.vim/c-support/rc/customization.ctags
deleted file mode 100644
index 323cbbc..0000000
--- a/.vim/c-support/rc/customization.ctags
+++ /dev/null
@@ -1,8 +0,0 @@
-
---regex-make=/^([^:# \t]+)[ \t]*:($|[^=]+)/\1/t,targets/
---regex-make=/^include[ \t]+(.+)/\1/i,includes/
-
---langdef=qmake
---langmap=qmake:+.pro
---regex-qmake=/^([[:upper:]_]+)/\1/t,SystemVariables/
-
diff --git a/.vim/c-support/rc/customization.gvimrc b/.vim/c-support/rc/customization.gvimrc
deleted file mode 100644
index 31befe7..0000000
--- a/.vim/c-support/rc/customization.gvimrc
+++ /dev/null
@@ -1,57 +0,0 @@
-"===================================================================================
-" FILE: .gvimrc
-" DESCRIPTION: suggestion for a personal configuration file ~/.gvimrc
-" AUTHOR: Dr.-Ing. Fritz Mehner
-" VERSION: 1.0
-" CREATED: 04.04.2009
-" REVISION: $Id: customization.gvimrc,v 1.3 2009/04/04 08:26:21 mehner Exp $
-"===================================================================================
-"
-"===================================================================================
-" GENERAL SETTINGS
-"===================================================================================
-set cmdheight=2 " Make command line two lines high
-set mousehide " Hide the mouse when typing text
-
-highlight Normal guibg=grey90
-highlight Cursor guibg=Blue guifg=NONE
-highlight lCursor guibg=Cyan guifg=NONE
-highlight NonText guibg=grey80
-highlight Constant gui=NONE guibg=grey95
-highlight Special gui=NONE guibg=grey95
-"
-let c_comment_strings=1 " highlight strings inside C comments
-"
-"-------------------------------------------------------------------------------
-" Moving cursor to other windows
-"
-" shift down : change window focus to lower one (cyclic)
-" shift up : change window focus to upper one (cyclic)
-" shift left : change window focus to one on left
-" shift right : change window focus to one on right
-"-------------------------------------------------------------------------------
-nmap <s-down> <c-w>w
-nmap <s-up> <c-w>W
-nmap <s-left> <c-w>h
-nmap <s-right> <c-w>l
-"
-"-------------------------------------------------------------------------------
-" some additional hot keys
-"-------------------------------------------------------------------------------
-" S-F3 - call gvim file browser
-"-------------------------------------------------------------------------------
- map <silent> <s-F3> :silent browse confirm e<CR>
-imap <silent> <s-F3> <Esc>:silent browse confirm e<CR>
-"
-"-------------------------------------------------------------------------------
-" toggle insert mode <--> 'normal mode with the <RightMouse>-key
-"-------------------------------------------------------------------------------
-"
-nmap <RightMouse> <Insert>
-imap <RightMouse> <ESC>
-"
-"-------------------------------------------------------------------------------
-" use font with clearly distinguishable brackets : ()[]{}
-"-------------------------------------------------------------------------------
-"set guifont=Luxi\ Mono\ 14
-"
diff --git a/.vim/c-support/rc/customization.indent.pro b/.vim/c-support/rc/customization.indent.pro
deleted file mode 100644
index 95f6081..0000000
--- a/.vim/c-support/rc/customization.indent.pro
+++ /dev/null
@@ -1,8 +0,0 @@
---blank-lines-after-procedures
---brace-indent0
---comment-indentation49
---declaration-comment-column49
---declaration-indentation10
---space-after-parentheses
---swallow-optional-blank-lines
---tab-size2
diff --git a/.vim/c-support/rc/customization.vimrc b/.vim/c-support/rc/customization.vimrc
deleted file mode 100644
index 917018a..0000000
--- a/.vim/c-support/rc/customization.vimrc
+++ /dev/null
@@ -1,222 +0,0 @@
-"===================================================================================
-" FILE: .vimrc
-" DESCRIPTION: suggestion for a personal configuration file ~/.vimrc
-" AUTHOR: Dr.-Ing. Fritz Mehner
-" CREATED: 04.04.2009
-" REVISION: $Id: customization.vimrc,v 1.6 2009/10/03 12:24:30 mehner Exp $
-"===================================================================================
-"
-"===================================================================================
-" GENERAL SETTINGS
-"===================================================================================
-
-"-------------------------------------------------------------------------------
-" Use Vim settings, rather then Vi settings.
-" This must be first, because it changes other options as a side effect.
-"-------------------------------------------------------------------------------
-set nocompatible
-"
-"-------------------------------------------------------------------------------
-" Enable file type detection. Use the default filetype settings.
-" Also load indent files, to automatically do language-dependent indenting.
-"-------------------------------------------------------------------------------
-filetype plugin on
-filetype indent on
-"
-"-------------------------------------------------------------------------------
-" Switch syntax highlighting on.
-"-------------------------------------------------------------------------------
-syntax on
-"
-" Platform specific items:
-" - central backup directory (has to be created)
-" - default dictionary
-" Uncomment your choice.
-if has("win16") || has("win32") || has("win64") ||
- \ has("win95") || has("win32unix")
- "
-" runtime mswin.vim
-" set backupdir =$VIM\vimfiles\backupdir
-" set dictionary=$VIM\vimfiles\wordlists/german.list
-else
-" set backupdir =$HOME/.vim.backupdir
-" set dictionary=$HOME/.vim/wordlists/german.list
-endif
-"
-" Using a backupdir under UNIX/Linux: you may want to include a line similar to
-" find $HOME/.vim.backupdir -name "*" -type f -mtime +60 -exec rm -f {} \;
-" in one of your shell startup files (e.g. $HOME/.profile)
-"
-"-------------------------------------------------------------------------------
-" Various settings
-"-------------------------------------------------------------------------------
-set autoindent " copy indent from current line
-set autoread " read open files again when changed outside Vim
-set autowrite " write a modified buffer on each :next , ...
-set backspace=indent,eol,start " backspacing over everything in insert mode
-set backup " keep a backup file
-set browsedir=current " which directory to use for the file browser
-set complete+=k " scan the files given with the 'dictionary' option
-set history=50 " keep 50 lines of command line history
-set hlsearch " highlight the last used search pattern
-set incsearch " do incremental searching
-set listchars=tab:>.,eol:\$ " strings to use in 'list' mode
-set mouse=a " enable the use of the mouse
-set nowrap " do not wrap lines
-set popt=left:8pc,right:3pc " print options
-set ruler " show the cursor position all the time
-set shiftwidth=2 " number of spaces to use for each step of indent
-set showcmd " display incomplete commands
-set smartindent " smart autoindenting when starting a new line
-set tabstop=2 " number of spaces that a <Tab> counts for
-set visualbell " visual bell instead of beeping
-set wildignore=*.bak,*.o,*.e,*~ " wildmenu: ignore these extensions
-set wildmenu " command-line completion in an enhanced mode
-"
-"===================================================================================
-" BUFFERS, WINDOWS
-"===================================================================================
-"
-"-------------------------------------------------------------------------------
-" The current directory is the directory of the file in the current window.
-"-------------------------------------------------------------------------------
-if has("autocmd")
- autocmd BufEnter * :lchdir %:p:h
-endif
-"
-"-------------------------------------------------------------------------------
-" close window (conflicts with the KDE setting for calling the process manager)
-"-------------------------------------------------------------------------------
- noremap <C-Esc> :close<CR>
-inoremap <C-Esc> <C-C>:close<CR>
-"
-"-------------------------------------------------------------------------------
-" Fast switching between buffers
-" The current buffer will be saved before switching to the next one.
-" Choose :bprevious or :bnext
-"-------------------------------------------------------------------------------
- noremap <silent> <s-tab> :if &modifiable && !&readonly &&
- \ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
-inoremap <silent> <s-tab> <C-C>:if &modifiable && !&readonly &&
- \ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
-"
-"-------------------------------------------------------------------------------
-" Leave the editor with Ctrl-q (KDE): Write all changed buffers and exit Vim
-"-------------------------------------------------------------------------------
-nnoremap <C-q> :wqall<CR>
-"
-"-------------------------------------------------------------------------------
-" When editing a file, always jump to the last known cursor position.
-" Don't do it when the position is invalid or when inside an event handler
-" (happens when dropping a file on gvim).
-"-------------------------------------------------------------------------------
-if has("autocmd")
- autocmd BufReadPost *
- \ if line("'\"") > 0 && line("'\"") <= line("$") |
- \ exe "normal! g`\"" |
- \ endif
-endif " has("autocmd")
-"
-"-------------------------------------------------------------------------------
-" some additional hot keys
-"-------------------------------------------------------------------------------
-" F2 - write file without confirmation
-" F3 - call file explorer Ex
-" F4 - show tag under curser in the preview window (tagfile must exist!)
-" F5 - open quickfix error window
-" F6 - close quickfix error window
-" F7 - display previous error
-" F8 - display next error
-"-------------------------------------------------------------------------------
-"
-map <silent> <F2> :write<CR>
-map <silent> <F3> :Explore<CR>
-nmap <silent> <F4> :exe ":ptag ".expand("<cword>")<CR>
-map <silent> <F5> :copen<CR>
-map <silent> <F6> :cclose<CR>
-map <silent> <F7> :cp<CR>
-map <silent> <F8> :cn<CR>
-"
-imap <silent> <F2> <Esc>:write<CR>
-imap <silent> <F3> <Esc>:Explore<CR>
-imap <silent> <F4> <Esc>:exe ":ptag ".expand("<cword>")<CR>
-imap <silent> <F5> <Esc>:copen<CR>
-imap <silent> <F6> <Esc>:cclose<CR>
-imap <silent> <F7> <Esc>:cp<CR>
-imap <silent> <F8> <Esc>:cn<CR>
-"
-"-------------------------------------------------------------------------------
-" Fast switching between buffers
-" The current buffer will be saved before switching to the next one.
-" Choose :bprevious or :bnext
-"-------------------------------------------------------------------------------
-"
- map <silent> <s-tab> <Esc>:if &modifiable && !&readonly &&
- \ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
-imap <silent> <s-tab> <Esc>:if &modifiable && !&readonly &&
- \ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
-"
-"-------------------------------------------------------------------------------
-" Leave the editor with Ctrl-q : Write all changed buffers and exit Vim
-"-------------------------------------------------------------------------------
-nmap <C-q> :wqa<CR>
-"
-"-------------------------------------------------------------------------------
-" comma always followed by a space
-"-------------------------------------------------------------------------------
-inoremap , ,<Space>
-"
-"-------------------------------------------------------------------------------
-" autocomplete parenthesis, brackets and braces
-"-------------------------------------------------------------------------------
-inoremap ( ()<Left>
-inoremap [ []<Left>
-inoremap { {}<Left>
-"
-vnoremap ( s()<Esc>P<Right>%
-vnoremap [ s[]<Esc>P<Right>%
-vnoremap { s{}<Esc>P<Right>%
-"
-"-------------------------------------------------------------------------------
-" autocomplete quotes (visual and select mode)
-"-------------------------------------------------------------------------------
-xnoremap ' s''<Esc>P<Right>
-xnoremap " s""<Esc>P<Right>
-xnoremap ` s``<Esc>P<Right>
-"
-"-------------------------------------------------------------------------------
-" Change the working directory to the directory containing the current file
-"-------------------------------------------------------------------------------
-if has("autocmd")
- autocmd BufEnter * :lchdir %:p:h
-endif " has("autocmd")
-"
-"===================================================================================
-" VARIOUS PLUGIN CONFIGURATIONS
-"===================================================================================
-"
-"-------------------------------------------------------------------------------
-" c.vim
-"-------------------------------------------------------------------------------
-"
-" --empty --
-"
-"-------------------------------------------------------------------------------
-" taglist.vim : toggle the taglist window
-" taglist.vim : define the title texts for make
-" taglist.vim : define the title texts for qmake
-"-------------------------------------------------------------------------------
- noremap <silent> <F11> <Esc><Esc>:Tlist<CR>
-inoremap <silent> <F11> <Esc><Esc>:Tlist<CR>
-
-let Tlist_GainFocus_On_ToggleOpen = 1
-let Tlist_Close_On_Select = 1
-
-let tlist_make_settings = 'make;m:makros;t:targets'
-let tlist_qmake_settings = 'qmake;t:SystemVariables'
-
-if has("autocmd")
- " ---------- qmake : set filetype for *.pro ----------
- autocmd BufNewFile,BufRead *.pro set filetype=qmake
-endif " has("autocmd")
-
diff --git a/.vim/c-support/scripts/wrapper.sh b/.vim/c-support/scripts/wrapper.sh
deleted file mode 100755
index f78861c..0000000
--- a/.vim/c-support/scripts/wrapper.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#===============================================================================
-# FILE: wrapper.sh
-# USAGE: ./wrapper.sh executable [cmd-line-args]
-# DESCRIPTION: Wraps the execution of a programm or script.
-# Use with xterm: xterm -e wrapper.sh executable cmd-line-args
-# This script is used by the plugins c.vim
-# OPTIONS: ---
-# REQUIREMENTS: ---
-# BUGS: ---
-# NOTES: ---
-# AUTHOR: Dr.-Ing. Fritz Mehner (Mn), mehner@fh-swf.de
-# COMPANY: Fachhochschule Südwestfalen, Iserlohn
-# CREATED: 23.11.2004 18:04:01 CET
-# REVISION: $Id: wrapper.sh,v 1.5 2009/06/03 17:47:06 mehner Exp $
-#===============================================================================
-
-executable="${1}" # name of the executable
-
-if [ ${#} -ge 1 ] && [ -x "$executable" ]
-then
- "${@}"
- returncode=$?
- [ $returncode -ne 0 ] && printf "'${@}' returned ${returncode}\n"
-else
- printf "\n !! file \"${executable}\" does not exist or is not executable !!\n"
- returncode=126 # command invoked cannot execute
-fi
-read -p " ... press return key ... " dummy
-exit $returncode
diff --git a/.vim/c-support/templates/Templates b/.vim/c-support/templates/Templates
deleted file mode 100644
index 5841481..0000000
--- a/.vim/c-support/templates/Templates
+++ /dev/null
@@ -1,30 +0,0 @@
-$
-$ =============================================================
-$ ========== USER MACROS ======================================
-$ =============================================================
-$
-|AUTHOR| = bryan newbold
-|AUTHORREF| = bnewbold
-|EMAIL| = bnewbold@robocracy.org
-|COMPANY| =
-|COPYRIGHT| = Copyright (c) |YEAR|, |AUTHOR|
-|STYLE| = default
-$
-$ =============================================================
-$ ========== FILE INCLUDES ====================================
-$ =============================================================
-$
-|includefile| = c.comments.template
-|includefile| = c.cpp.template
-|includefile| = c.idioms.template
-|includefile| = c.preprocessor.template
-|includefile| = c.statements.template
-$
-== IF |STYLE| IS CPP ==
-|includefile| = cpp.comments.template
-|includefile| = cpp.cpp.template
-|includefile| = cpp.idioms.template
-|includefile| = cpp.preprocessor.template
-|includefile| = cpp.statements.template
-== ENDIF ==
-$
diff --git a/.vim/c-support/templates/c.comments.template b/.vim/c-support/templates/c.comments.template
deleted file mode 100644
index a500103..0000000
--- a/.vim/c-support/templates/c.comments.template
+++ /dev/null
@@ -1,160 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.end-of-line-comment == append ==
-/* <CURSOR> */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.frame ==
-/*---------------------------------------------------------------------------
- * <CURSOR>
- *---------------------------------------------------------------------------*/
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.function ==
-/*
- * === FUNCTION =============================================================
- * Name: |?FUNCTION_NAME|
- * Description: <CURSOR>
- * ============================================================================
- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.method ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME|
- * Method: |?CLASSNAME| :: |?METHODNAME|
- * Description: <CURSOR>
- *-----------------------------------------------------------------------------
- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.class ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME|
- * Description: <CURSOR>
- * ============================================================================
- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-description == start ==
-/*-----------------------------------------------------------------------------
- *
- * Filename: |FILENAME|
- * Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
- * Created: |DATE| |TIME|
- * Description: <CURSOR>
- *
- *---------------------------------------------------------------------------*/
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-description-header == start ==
-/*-----------------------------------------------------------------------------
- *
- * Filename: |FILENAME|
- * Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
- * Created: |DATE| |TIME|
- * Description: <CURSOR>
- *
- *---------------------------------------------------------------------------*/
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-header-includes ==
-/* ##### HEADER FILE INCLUDES ########################################## */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-macros ==
-/* ##### MACROS - LOCAL TO THIS SOURCE FILE ########################## */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-typedefs ==
-/* ##### TYPE DEFINITIONS - LOCAL TO THIS SOURCE FILE ################ */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-data-types ==
-/* ##### DATA TYPES - LOCAL TO THIS SOURCE FILE ###################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-defs ==
-/* ##### CLASS DEFINITIONS - LOCAL TO THIS SOURCE FILE ############### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-local-variables ==
-/* ##### VARIABLES - LOCAL TO THIS SOURCE FILE ####################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-prototypes ==
-/* ##### PROTOTYPES - LOCAL TO THIS SOURCE FILE ###################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-function-defs-exported ==
-/* ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-function-defs-local ==
-/* ##### FUNCTION DEFINITIONS - LOCAL TO THIS SOURCE FILE ############ */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-implementations-exported ==
-/* ##### CLASS IMPLEMENTATIONS - EXPORTED CLASSES #################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-implementations-local ==
-/* ##### CLASS IMPLEMENTATIONS - LOCAL CLASSES ####################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-header-includes ==
-/* ##### HEADER FILE INCLUDES ########################################## */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-macros ==
-/* ##### EXPORTED MACROS ############################################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-typedefs ==
-/* ##### EXPORTED TYPE DEFINITIONS ##################################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-data-types ==
-/* ##### EXPORTED DATA TYPES ########################################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-class-defs ==
-/* ##### EXPORTED CLASS DEFINITIONS #################################### */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-variables ==
-/* ##### EXPORTED VARIABLES ############################################ */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-function-declarations ==
-/* ##### EXPORTED FUNCTION DECLARATIONS ################################ */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.keyword-bug == append ==
- /* :BUG:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-compiler == append ==
- /* :COMPILER:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-todo == append ==
- /* :TODO:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-tricky == append ==
- /* :TRICKY:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-warning == append ==
- /* :WARNING:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-workaround == append ==
- /* :WORKAROUND:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-== comment.keyword-keyword == append ==
- /* :|?KEYWORD:u|:|DATE| |TIME|:|AUTHORREF|: <CURSOR> */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.special-empty == append ==
- /* EMPTY */<CURSOR>
-== comment.special-fall-through == append ==
- /* FALL THROUGH */<CURSOR>
-== comment.special-implicit-type-conversion == append ==
- /* IMPLICIT TYPE CONVERSION */<CURSOR>
-== comment.special-no-return == append ==
- /* NO RETURN */<CURSOR>
-== comment.special-not-reached == append ==
- /* NOT REACHED */<CURSOR>
-== comment.special-remains-to-be-implemented == append ==
- /* REMAINS TO BE IMPLEMENTED */<CURSOR>
-== comment.special-constant-type-is-long == append ==
- /* constant type is long */<CURSOR>
-== comment.special-constant-type-is-unsigned == append ==
- /* constant type is unsigned */<CURSOR>
-== comment.special-constant-type-is-unsigned-long == append ==
- /* constant type is unsigned long */<CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/c.cpp.template b/.vim/c-support/templates/c.cpp.template
deleted file mode 100644
index 97b9082..0000000
--- a/.vim/c-support/templates/c.cpp.template
+++ /dev/null
@@ -1,487 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-$
-== cpp.cin ==
-cin >> <CURSOR>;
-$
-== cpp.cout ==
-cout << <CURSOR> << endl;
-$
-== cpp.cout-operator == insert ==
-<< "<CURSOR>"
-$
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.output-manipulator-boolalpha == insert ==
-<< boolalpha <CURSOR>
-== cpp.output-manipulator-dec == insert ==
-<< dec <CURSOR>
-== cpp.output-manipulator-endl == insert ==
-<< endl <CURSOR>
-== cpp.output-manipulator-fixed == insert ==
-<< fixed <CURSOR>
-== cpp.output-manipulator-flush == insert ==
-<< flush <CURSOR>
-== cpp.output-manipulator-hex == insert ==
-<< hex <CURSOR>
-== cpp.output-manipulator-internal == insert ==
-<< internal <CURSOR>
-== cpp.output-manipulator-left == insert ==
-<< left <CURSOR>
-== cpp.output-manipulator-oct == insert ==
-<< oct <CURSOR>
-== cpp.output-manipulator-right == insert ==
-<< right <CURSOR>
-== cpp.output-manipulator-scientific == insert ==
-<< scientific <CURSOR>
-== cpp.output-manipulator-setbase == insert ==
-<< setbase(10<CURSOR>)
-== cpp.output-manipulator-setfill == insert ==
-<< setfill(<CURSOR>)
-== cpp.output-manipulator-setiosflag == insert ==
-<< setiosflags(<CURSOR>)
-== cpp.output-manipulator-setprecision == insert ==
-<< setprecision(6<CURSOR>)
-== cpp.output-manipulator-setw == insert ==
-<< setw(0<CURSOR>)
-== cpp.output-manipulator-showbase == insert ==
-<< showbase <CURSOR>
-== cpp.output-manipulator-showpoint == insert ==
-<< showpoint <CURSOR>
-== cpp.output-manipulator-showpos == insert ==
-<< showpos <CURSOR>
-== cpp.output-manipulator-uppercase == insert ==
-<< uppercase <CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.method-implementation ==
-void<CURSOR>
-|?CLASSNAME|::|?METHODNAME| ( <+argument list+> )
-{
- return ;
-} /* ----- end of method |CLASSNAME|::|?METHODNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.accessor-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME|
- * Method: get_|?ATTRIBUTE|
- *-----------------------------------------------------------------------------
- */
-inline int<CURSOR>
-|CLASSNAME|::get_|ATTRIBUTE| ( )
-{
- return |ATTRIBUTE|;
-} /* ----- end of method |CLASSNAME|::get_|ATTRIBUTE| ----- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: set_|ATTRIBUTE|
- *-----------------------------------------------------------------------------
- */
-inline void
-|CLASSNAME|::set_|ATTRIBUTE| ( <+argument list+> )
-{
- |ATTRIBUTE| = value;
- return ;
-} /* ----- end of method |CLASSNAME|::set_|ATTRIBUTE| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-definition ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME:c|
- * Description: <CURSOR>
- * ============================================================================
- */
-class |CLASSNAME|
-{
- public:
- /* ==================== LIFECYCLE ============================== */
- |CLASSNAME| (); /* constructor */
-
- /* ==================== ACCESSORS ============================== */
-
- /* ==================== MUTATORS ============================== */
-
- /* ==================== OPERATORS ============================== */
-
- protected:
- /* ==================== DATA MEMBERS ============================== */
-
- private:
- /* ==================== DATA MEMBERS ============================== */
-
-}; /* ----- end of class |CLASSNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME:c|
- * Method: |CLASSNAME|
- * Description: constructor
- *-----------------------------------------------------------------------------
- */
-|CLASSNAME|::|CLASSNAME| ()
-{<CURSOR>
-} /* ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-using-new-definition ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME:c|
- * Description: <CURSOR>
- * ============================================================================
- */
-class |CLASSNAME|
-{
- public:
-
- /* ==================== LIFECYCLE ============================== */
- |CLASSNAME| (); /* constructor */
- |CLASSNAME| ( const |CLASSNAME| &other ); /* copy constructor */
- ~|CLASSNAME| (); /* destructor */
-
- /* ==================== ACCESSORS ============================== */
-
- /* ==================== MUTATORS ============================== */
-
- /* ==================== OPERATORS ============================== */
-
- |CLASSNAME|& operator = ( const |CLASSNAME| &other ); /* assignment operator */
-
- protected:
- /* ==================== DATA MEMBERS ============================== */
-
- private:
- /* ==================== DATA MEMBERS ============================== */
-
-}; /* ----- end of class |CLASSNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-using-new-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME:c|
- * Method: |CLASSNAME|
- * Description: constructor
- *-----------------------------------------------------------------------------
- */
-|CLASSNAME|::|CLASSNAME| ()
-{<CURSOR>
-} /* ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) ----- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: |CLASSNAME|
- * Description: copy constructor
- *-----------------------------------------------------------------------------
- */
-|CLASSNAME|::|CLASSNAME| ( const |CLASSNAME| &other )
-{
-} /* ----- end of method |CLASSNAME|::|CLASSNAME| (copy constructor) ----- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: ~|CLASSNAME|
- * Description: destructor
- *-----------------------------------------------------------------------------
- */
-|CLASSNAME|::~|CLASSNAME| ()
-{
-} /* ----- end of method |CLASSNAME|::~|CLASSNAME| (destructor) ----- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: operator =
- * Description: assignment operator
- *-----------------------------------------------------------------------------
- */
-|CLASSNAME|&
-|CLASSNAME|::operator = ( const |CLASSNAME| &other )
-{
- if ( this != &other ) {
- }
- return *this;
-} /* ----- end of method |CLASSNAME|::operator = (assignment operator) ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.error-class ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME:c|
- * Description: <CURSOR>
- * ============================================================================
- */
-class |CLASSNAME|
-{
- public: |CLASSNAME| ( string msg = "|CLASSNAME|" ):message(msg) { }
- virtual ~|CLASSNAME| ( ) { }
- virtual string what ( ) const throw ( ) { return message; }
- protected: string message;
-}; /* ----- end of class |CLASSNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-method-implementation ==
-template < class T >
-void<CURSOR> |?CLASSNAME|<T>::|?METHODNAME| ( <+argument list+> )
-{
- return ;
-} /* ----- end of method |CLASSNAME|<T>::|METHODNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-accessor-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME|
- * Method: get_|?ATTRIBUTE|
- *-----------------------------------------------------------------------------
- */
-template < class T >
-inline int<CURSOR> |CLASSNAME|<T>::get_|ATTRIBUTE| ( )
-{
- return |ATTRIBUTE|;
-} /* ----- end of method |CLASSNAME|<T>::get_|ATTRIBUTE| ----- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: set_|ATTRIBUTE|
- *-----------------------------------------------------------------------------
- */
-template < class T >
-inline void |CLASSNAME|<T>::set_|ATTRIBUTE| ( <+argument list+> )
-{
- |ATTRIBUTE| = value;
- return ;
-} /* ----- end of method |CLASSNAME|<T>::set_|ATTRIBUTE| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-definition ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME:c|
- * Description: <CURSOR>
- * ============================================================================
- */
-template < class T >
-class |CLASSNAME|
-{
- public:
-
- /* ==================== LIFECYCLE ============================== */
- |CLASSNAME| (); /* constructor */
-
- /* ==================== ACCESSORS ============================== */
-
- /* ==================== MUTATORS ============================== */
-
- /* ==================== OPERATORS ============================== */
-
- protected:
- /* ==================== DATA MEMBERS ============================== */
-
- private:
- /* ==================== DATA MEMBERS ============================== */
-
-}; /* ---------- end of template class |CLASSNAME| ---------- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME:c|
- * Method: |CLASSNAME|
- * Description:
- *-----------------------------------------------------------------------------
- */
-template < class T >
-|CLASSNAME| < T >::|CLASSNAME| ()
-{<CURSOR>
-} /* ---------- end of constructor of template class |CLASSNAME| ---------- */
-
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-using-new-definition ==
-/*
- * ============================================================================
- * Class: |?CLASSNAME:c|
- * Description: <CURSOR>
- * ============================================================================
- */
-
-template < class T >
-class |CLASSNAME|
-{
- public:
-
- // ==================== LIFECYCLE ==============================
- |CLASSNAME| (); /* constructor */
- |CLASSNAME| ( const |CLASSNAME| &other ); /* copy constructor */
- ~|CLASSNAME| (); /* destructor */
-
- /* ==================== ACCESSORS ============================== */
-
- /* ==================== MUTATORS ============================== */
-
- /* ==================== OPERATORS ============================== */
-
- |CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
-
- protected:
- /* ==================== DATA MEMBERS ============================== */
-
- private:
- /* ==================== DATA MEMBERS ============================== */
-
-}; /* ----- end of template class |CLASSNAME| ----- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-using-new-implementation ==
-/*
- *-----------------------------------------------------------------------------
- * Class: |?CLASSNAME:c|
- * Method: |CLASSNAME|
- * Description: constructor
- *-----------------------------------------------------------------------------
- */
-template < class T >
-|CLASSNAME|< T >::|CLASSNAME| ()
-{<CURSOR>
-} /* ---------- end of constructor of template class |CLASSNAME| ---------- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: |CLASSNAME|
- * Description: copy constructor
- *-----------------------------------------------------------------------------
- */
-template < class T >
-|CLASSNAME|< T >::|CLASSNAME| ( const |CLASSNAME| &other )
-{
-} /* ---------- end of copy constructor of template class |CLASSNAME| ---------- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: ~|CLASSNAME|
- * Description: destructor
- *-----------------------------------------------------------------------------
- */
-template < class T >
-|CLASSNAME|< T >::~|CLASSNAME| ()
-{
-} /* ---------- end of destructor of template class |CLASSNAME| ---------- */
-
-/*
- *-----------------------------------------------------------------------------
- * Class: |CLASSNAME|
- * Method: operator =
- * Description: assignment operator
- *-----------------------------------------------------------------------------
- */
-template < class T >
-|CLASSNAME|< T >& |CLASSNAME|< T >::operator = ( const |CLASSNAME| &other )
-{
- return *this;
-} /* ---------- end of assignment operator of template class |CLASSNAME| ---------- */
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-function ==
-template <class T>
-void<CURSOR> |?TEMPALTE_FUNCTION_NAME| ( <+argument list+> )
-{
- return ;
-} /* ----- end of template function |?TEMPALTE_FUNCTION_NAME| ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.operator-in ==
-ostream &
-operator << ( ostream & os, const |?CLASSNAME| & obj )
-{
- os << obj.<CURSOR> ;
- return os;
-} /* ----- end of function operator << ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.operator-out ==
-istream &
-operator >> ( istream & is, |?CLASSNAME| & obj )
-{
- is >> obj.<CURSOR> ;
- return is;
-} /* ----- end of function operator >> ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.try-catch ==
-try {
-<SPLIT>}
-catch ( const <CURSOR> &ExceptObj ) { /* handle exception: */
-}
-catch (...) { /* handle exception: unspecified */
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.catch ==
-catch ( <CURSOR>const &ExceptObj ) { /* handle exception: */
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.catch-points ==
-catch (...) { /* handle exception: */
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.extern ==
-extern "C" {<CURSOR>
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.open-input-file ==
-char *ifs_file_name = "<CURSOR>"; /* input file name */
-ifstream ifs; /* create ifstream object */
-
-ifs.open (ifs_file_name); /* open ifstream */
-if (!ifs) {
- cerr << "\nERROR : failed to open input file " << ifs_file_name << endl;
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-ifs.close (); /* close ifstream */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.open-output-file ==
-char *ofs_file_name = "<CURSOR>"; /* output file name */
-ofstream ofs; /* create ofstream object */
-
-ofs.open (ofs_file_name); /* open ofstream */
-if (!ofs) {
- cerr << "\nERROR : failed to open output file " << ofs_file_name << endl;
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-ofs.close (); /* close ofstream */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.namespace-std ==
-using namespace std;
-== cpp.namespace ==
-using namespace |?NAMESPACE|;
-== cpp.namespace-block ==
-namespace |?NAMESPACE| {<CURSOR>
-<SPLIT>} /* ----- end of namespace |NAMESPACE| ----- */
-== cpp.namespace-alias ==
-namespace |?NAMESPACE_ALIAS| = {-original namespace name-};
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.rtti-typeid == insert ==
-typeid(<CURSOR><SPLIT>)
-$
-== cpp.rtti-static-cast == insert ==
-static_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-const-cast == insert ==
-const_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-reinterpret-cast == insert ==
-reinterpret_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-dynamic-cast == insert ==
-dynamic_cast<>(<CURSOR><SPLIT>)
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/c.idioms.template b/.vim/c-support/templates/c.idioms.template
deleted file mode 100644
index 4565fab..0000000
--- a/.vim/c-support/templates/c.idioms.template
+++ /dev/null
@@ -1,133 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.function ==
-/*
- * === FUNCTION ======================================================================
- * Name: |?FUNCTION_NAME|
- * Description:
- * =====================================================================================
- */
-void<CURSOR>
-|FUNCTION_NAME| ( <+argument list+> )
-{
-<SPLIT> return <+return value+>;
-} /* ----- end of function |FUNCTION_NAME| ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.function-static ==
-/*
- * === FUNCTION ======================================================================
- * Name: |?FUNCTION_NAME|
- * Description:
- * =====================================================================================
- */
-static void<CURSOR>
-|FUNCTION_NAME| ( <+argument list+> )
-{
-<SPLIT> return <+return value+>;
-} /* ----- end of static function |FUNCTION_NAME| ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.main ==
-#include <stdlib.h>
-
-/*
- * === FUNCTION ======================================================================
- * Name: main
- * Description:
- * =====================================================================================
- */
-int
-main ( int argc, char *argv[] )
-{<CURSOR>
-<SPLIT> return EXIT_SUCCESS;
-} /* ---------- end of function main ---------- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.enum ==
-enum |?ENUM_NAME| {<CURSOR>
-<SPLIT>}; /* ---------- end of enum |ENUM_NAME| ---------- */
-
-typedef enum |ENUM_NAME| |ENUM_NAME:c|;
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.struct ==
-struct |?STRUCT_NAME| {<CURSOR>
-<SPLIT>}; /* ---------- end of struct |STRUCT_NAME| ---------- */
-
-typedef struct |STRUCT_NAME| |STRUCT_NAME:c|;
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.union ==
-union |?UNION_NAME| {<CURSOR>
-<SPLIT>}; /* ---------- end of union |UNION_NAME| ---------- */
-
-typedef union |UNION_NAME| |UNION_NAME:c|;
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.printf == insert ==
-printf ( "<CURSOR>\n" );
-== idioms.scanf == insert ==
-scanf ( "<CURSOR>", & );
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.calloc ==
-|?POINTER| = calloc ( (size_t)(<CURSOR><+COUNT+>), sizeof(<+TYPE+>) );
-if ( |POINTER|==NULL ) {
- fprintf ( stderr, "\ndynamic memory allocation failed\n" );
- exit (EXIT_FAILURE);
-}
-
-free (|POINTER|);
-|POINTER| = NULL;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.malloc ==
-|?POINTER| = malloc ( sizeof(<CURSOR><+TYPE+>) );
-if ( |POINTER|==NULL ) {
- fprintf ( stderr, "\ndynamic memory allocation failed\n" );
- exit (EXIT_FAILURE);
-}
-
-free (|POINTER|);
-|POINTER| = NULL;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.sizeof == insert ==
-sizeof(<CURSOR><SPLIT>)
-== idioms.assert == insert ==
-assert(<CURSOR><SPLIT>);
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.open-input-file ==
-FILE *|?FILEPOINTER|; /* input-file pointer */
-char *|FILEPOINTER|_file_name = "<CURSOR>"; /* input-file name */
-
-|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "r" );
-if ( |FILEPOINTER| == NULL ) {
- fprintf ( stderr, "couldn't open file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-if( fclose(|FILEPOINTER|) == EOF ) { /* close input file */
- fprintf ( stderr, "couldn't close file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.open-output-file ==
-FILE *|?FILEPOINTER|; /* output-file pointer */
-char *|FILEPOINTER|_file_name = "<CURSOR>"; /* output-file name */
-
-|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "w" );
-if ( |FILEPOINTER| == NULL ) {
- fprintf ( stderr, "couldn't open file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-if( fclose(|FILEPOINTER|) == EOF ) { /* close output file */
- fprintf ( stderr, "couldn't close file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.fprintf == insert ==
-fprintf ( |?FILEPOINTER|, "<CURSOR>\n", );
-== idioms.fscanf == insert ==
-fscanf ( |?FILEPOINTER|, "<CURSOR>", & );
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/c.preprocessor.template b/.vim/c-support/templates/c.preprocessor.template
deleted file mode 100644
index f3aa127..0000000
--- a/.vim/c-support/templates/c.preprocessor.template
+++ /dev/null
@@ -1,49 +0,0 @@
-$-------------------------------------------------------------------------
-== preprocessor.include-global ==
-#include <<CURSOR>>
-$-------------------------------------------------------------------------
-== preprocessor.include-local ==
-#include "<CURSOR>"
-$-------------------------------------------------------------------------
-== preprocessor.define ==
-#define <CURSOR> /* */
-$-------------------------------------------------------------------------
-== preprocessor.undefine ==
-#undef <CURSOR> /* */
-$-------------------------------------------------------------------------
-== preprocessor.if-else-endif ==
-#if |?CONDITION:u|
-<CURSOR><SPLIT>
-#else /* ----- not |CONDITION| ----- */
-<+ELSE PART+>
-#endif /* ----- not |CONDITION| ----- */
-$-------------------------------------------------------------------------
-== preprocessor.ifdef-else-endif ==
-#ifdef |?CONDITION:u|
-<CURSOR><SPLIT>
-#else /* ----- not |CONDITION| ----- */
-<+ELSE PART+>
-#endif /* ----- not |CONDITION| ----- */
-$-------------------------------------------------------------------------
-== preprocessor.ifndef-else-endif ==
-#ifndef |?CONDITION:u|
-<CURSOR><SPLIT>
-#else /* ----- not |CONDITION| ----- */
-<+ELSE PART+>
-#endif /* ----- not |CONDITION| ----- */
-$-------------------------------------------------------------------------
-== preprocessor.ifndef-def-endif ==
-#ifndef |?BASENAME:L|_INC
-#define |BASENAME|_INC
-<CURSOR><SPLIT>
-#endif /* ----- #ifndef |BASENAME|_INC ----- */
-$-------------------------------------------------------------------------
-== preprocessor.error ==
-#error "<CURSOR>" /* */
-$-------------------------------------------------------------------------
-== preprocessor.line ==
-#line <CURSOR> /* */
-$-------------------------------------------------------------------------
-== preprocessor.pragma ==
-#pragma <CURSOR> /* */
-$-------------------------------------------------------------------------
diff --git a/.vim/c-support/templates/c.statements.template b/.vim/c-support/templates/c.statements.template
deleted file mode 100644
index 574366d..0000000
--- a/.vim/c-support/templates/c.statements.template
+++ /dev/null
@@ -1,69 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.do-while ==
-do {
-<SPLIT>} while ( <CURSOR> ); /* ----- end do-while ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.for ==
-for ( <CURSOR>; ; )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.for-block ==
-for ( <CURSOR>; ; ) {
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if ==
-if ( <CURSOR> )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-block ==
-if ( <CURSOR> ) {
-<SPLIT><-IF PART->
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-else ==
-if ( <CURSOR> )
-<SPLIT>else
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-block-else ==
-if ( <CURSOR> ) {
-<SPLIT><-IF PART->
-}
-else {
-<-ELSE PART->
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.else-block ==
-else {
-<CURSOR><SPLIT>
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.while ==
-while ( <CURSOR> )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.while-block ==
-while ( <CURSOR> ) {
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.switch ==
-switch ( <CURSOR> ) {
- case <-LABEL->:
- <SPLIT>break;
-
- case <-LABEL->:
- break;
-
- case <-LABEL->:
- break;
-
- default:
- break;
-} /* ----- end switch ----- */
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.case ==
-case <CURSOR>:
-break;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.block ==
-{
-<CURSOR><SPLIT>
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/cpp.comments.template b/.vim/c-support/templates/cpp.comments.template
deleted file mode 100644
index b91ed44..0000000
--- a/.vim/c-support/templates/cpp.comments.template
+++ /dev/null
@@ -1,168 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.end-of-line-comment == append ==
-// <CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.frame ==
-//----------------------------------------------------------------------
-// <CURSOR>
-//----------------------------------------------------------------------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.function ==
-// === FUNCTION ======================================================================
-// Name: |?FUNCTION_NAME|
-// Description: <CURSOR>
-// =====================================================================================
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.method ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: |?METHODNAME|
-// Description: <CURSOR>
-//--------------------------------------------------------------------------------------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.class ==
-// =====================================================================================
-// Class: |?CLASSNAME|
-// Description: <CURSOR>
-// =====================================================================================
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-description == start ==
-// =====================================================================================
-//
-// Filename: |FILENAME|
-//
-// Description: <CURSOR>
-//
-// Version: 1.0
-// Created: |DATE| |TIME|
-// Revision: none
-// Compiler: g++
-//
-// Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
-// Company: |COMPANY|
-//
-// =====================================================================================
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-description-header == start ==
-// =====================================================================================
-//
-// Filename: |FILENAME|
-//
-// Description: <CURSOR>
-//
-// Version: 1.0
-// Created: |DATE| |TIME|
-// Revision: none
-// Compiler: g++
-//
-// Author: |AUTHOR| (|AUTHORREF|), |EMAIL|
-// Company: |COMPANY|
-//
-// =====================================================================================
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-header-includes ==
-// ##### HEADER FILE INCLUDES ###################################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-macros ==
-// ##### MACROS - LOCAL TO THIS SOURCE FILE ###################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-typedefs ==
-// ##### TYPE DEFINITIONS - LOCAL TO THIS SOURCE FILE #########################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-data-types ==
-// ##### DATA TYPES - LOCAL TO THIS SOURCE FILE ###############################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-defs ==
-// ##### CLASS DEFINITIONS - LOCAL TO THIS SOURCE FILE ########################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-local-variables ==
-// ##### VARIABLES - LOCAL TO THIS SOURCE FILE ################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-prototypes ==
-// ##### PROTOTYPES - LOCAL TO THIS SOURCE FILE ###############################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-function-defs-exported ==
-// ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ############################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-function-defs-local ==
-// ##### FUNCTION DEFINITIONS - LOCAL TO THIS SOURCE FILE #####################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-implementations-exported ==
-// ##### CLASS IMPLEMENTATIONS - EXPORTED CLASSES #############################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-cpp-class-implementations-local ==
-// ##### CLASS IMPLEMENTATIONS - LOCAL CLASSES ################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-header-includes ==
-// ##### HEADER FILE INCLUDES ###################################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-macros ==
-// ##### EXPORTED MACROS ########################################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-typedefs ==
-// ##### EXPORTED TYPE DEFINITIONS ##############################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-data-types ==
-// ##### EXPORTED DATA TYPES ####################################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-class-defs ==
-// ##### EXPORTED CLASS DEFINITIONS #############################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-variables ==
-// ##### EXPORTED VARIABLES #####################################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.file-section-hpp-exported-function-declarations ==
-// ##### EXPORTED FUNCTION DECLARATIONS #########################################
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.keyword-bug == append ==
- // :BUG:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-compiler == append ==
- // :COMPILER:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-todo == append ==
- // :TODO:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-tricky == append ==
- // :TRICKY:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-warning == append ==
- // :WARNING:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-workaround == append ==
- // :WORKAROUND:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-== comment.keyword-keyword == append ==
- // :|?KEYWORD:u|:|DATE| |TIME|:|AUTHORREF|: <CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== comment.special-empty == append ==
- // EMPTY<CURSOR>
-== comment.special-fall-through == append ==
- // FALL THROUGH<CURSOR>
-== comment.special-implicit-type-conversion == append ==
- // IMPLICIT TYPE CONVERSION<CURSOR>
-== comment.special-no-return == append ==
- // NO RETURN<CURSOR>
-== comment.special-not-reached == append ==
- // NOT REACHED<CURSOR>
-== comment.special-remains-to-be-implemented == append ==
- // REMAINS TO BE IMPLEMENTED<CURSOR>
-== comment.special-constant-type-is-long == append ==
- // constant type is long<CURSOR>
-== comment.special-constant-type-is-unsigned == append ==
- // constant type is unsigned<CURSOR>
-== comment.special-constant-type-is-unsigned-long == append ==
- // constant type is unsigned long<CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/cpp.cpp.template b/.vim/c-support/templates/cpp.cpp.template
deleted file mode 100644
index 6bdbe8b..0000000
--- a/.vim/c-support/templates/cpp.cpp.template
+++ /dev/null
@@ -1,450 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-$
-== cpp.cin ==
-cin >> <CURSOR>;
-$
-== cpp.cout ==
-cout << <CURSOR> << endl;
-$
-== cpp.cout-operator == insert ==
-<< "<CURSOR>"
-$
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.output-manipulator-boolalpha == insert ==
-<< boolalpha <CURSOR>
-== cpp.output-manipulator-dec == insert ==
-<< dec <CURSOR>
-== cpp.output-manipulator-endl == insert ==
-<< endl <CURSOR>
-== cpp.output-manipulator-fixed == insert ==
-<< fixed <CURSOR>
-== cpp.output-manipulator-flush == insert ==
-<< flush <CURSOR>
-== cpp.output-manipulator-hex == insert ==
-<< hex <CURSOR>
-== cpp.output-manipulator-internal == insert ==
-<< internal <CURSOR>
-== cpp.output-manipulator-left == insert ==
-<< left <CURSOR>
-== cpp.output-manipulator-oct == insert ==
-<< oct <CURSOR>
-== cpp.output-manipulator-right == insert ==
-<< right <CURSOR>
-== cpp.output-manipulator-scientific == insert ==
-<< scientific <CURSOR>
-== cpp.output-manipulator-setbase == insert ==
-<< setbase(10<CURSOR>)
-== cpp.output-manipulator-setfill == insert ==
-<< setfill(<CURSOR>)
-== cpp.output-manipulator-setiosflag == insert ==
-<< setiosflags(<CURSOR>)
-== cpp.output-manipulator-setprecision == insert ==
-<< setprecision(6<CURSOR>)
-== cpp.output-manipulator-setw == insert ==
-<< setw(0<CURSOR>)
-== cpp.output-manipulator-showbase == insert ==
-<< showbase <CURSOR>
-== cpp.output-manipulator-showpoint == insert ==
-<< showpoint <CURSOR>
-== cpp.output-manipulator-showpos == insert ==
-<< showpos <CURSOR>
-== cpp.output-manipulator-uppercase == insert ==
-<< uppercase <CURSOR>
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.method-implementation ==
-void<CURSOR>
-|?CLASSNAME|::|?METHODNAME| ( <+argument list+> )
-{
- return ;
-} // ----- end of method |CLASSNAME|::|METHODNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.accessor-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: get_|?ATTRIBUTE|
-//--------------------------------------------------------------------------------------
-inline int<CURSOR>
-|CLASSNAME|::get_|ATTRIBUTE| ( )
-{
- return |ATTRIBUTE|;
-} // ----- end of method |CLASSNAME|::get_|ATTRIBUTE| -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: set_|ATTRIBUTE|
-//--------------------------------------------------------------------------------------
-inline void
-|CLASSNAME|::set_|ATTRIBUTE| ( <+argument list+> )
-{
- |ATTRIBUTE| = value;
- return ;
-} // ----- end of method |CLASSNAME|::set_|ATTRIBUTE| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-definition ==
-// =====================================================================================
-// Class: |?CLASSNAME:c|
-// Description: <CURSOR>
-// =====================================================================================
-class |CLASSNAME|
-{
- public:
-
- // ==================== LIFECYCLE =======================================
- |CLASSNAME| (); // constructor
-
- // ==================== ACCESSORS =======================================
-
- // ==================== MUTATORS =======================================
-
- // ==================== OPERATORS =======================================
-
- protected:
- // ==================== DATA MEMBERS =======================================
-
- private:
- // ==================== DATA MEMBERS =======================================
-
-}; // ----- end of class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: |CLASSNAME|
-// Description: constructor
-//--------------------------------------------------------------------------------------
-|CLASSNAME|::|CLASSNAME| ()
-{<CURSOR>
-} // ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-using-new-definition ==
-// =====================================================================================
-// Class: |?CLASSNAME:c|
-// Description: <CURSOR>
-// =====================================================================================
-class |CLASSNAME|
-{
- public:
-
- // ==================== LIFECYCLE =======================================
- |CLASSNAME| (); // constructor
- |CLASSNAME| ( const |CLASSNAME| &other ); // copy constructor
- ~|CLASSNAME| (); // destructor
-
- // ==================== ACCESSORS =======================================
-
- // ==================== MUTATORS =======================================
-
- // ==================== OPERATORS =======================================
-
- |CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
-
- protected:
- // ==================== DATA MEMBERS =======================================
-
- private:
- // ==================== DATA MEMBERS =======================================
-
-}; // ----- end of class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.class-using-new-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: |CLASSNAME|
-// Description: constructor
-//--------------------------------------------------------------------------------------
-|CLASSNAME|::|CLASSNAME| ()
-{<CURSOR>
-} // ----- end of method |CLASSNAME|::|CLASSNAME| (constructor) -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: |CLASSNAME|
-// Description: copy constructor
-//--------------------------------------------------------------------------------------
-|CLASSNAME|::|CLASSNAME| ( const |CLASSNAME| &other )
-{
-} // ----- end of method |CLASSNAME|::|CLASSNAME| (copy constructor) -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: ~|CLASSNAME|
-// Description: destructor
-//--------------------------------------------------------------------------------------
-|CLASSNAME|::~|CLASSNAME| ()
-{
-} // ----- end of method |CLASSNAME|::~|CLASSNAME| (destructor) -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: operator =
-// Description: assignment operator
-//--------------------------------------------------------------------------------------
-|CLASSNAME|&
-|CLASSNAME|::operator = ( const |CLASSNAME| &other )
-{
- if ( this != &other ) {
- }
- return *this;
-} // ----- end of method |CLASSNAME|::operator = (assignment operator) -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.error-class ==
-// =====================================================================================
-// Class: |?CLASSNAME:c|
-// Description: <CURSOR>
-// =====================================================================================
-class |CLASSNAME|
-{
- public: |CLASSNAME| ( string msg = "|CLASSNAME|" ):message(msg) { }
- virtual ~|CLASSNAME| ( ) { }
- virtual string what ( ) const throw ( ) { return message; }
- protected: string message;
-}; // ---------- end of class |CLASSNAME| ----------
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-method-implementation ==
-template < class T >
-void<CURSOR> |?CLASSNAME|<T>::|?METHODNAME| ( <+argument list+> )
-{
- return ;
-} // ----- end of method |CLASSNAME|<T>::|METHODNAME| -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-accessor-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: get_|?ATTRIBUTE|
-//--------------------------------------------------------------------------------------
-template < class T >
-inline int<CURSOR> |CLASSNAME|<T>::get_|ATTRIBUTE| ( )
-{
- return |ATTRIBUTE|;
-} // ----- end of method |CLASSNAME|<T>::get_|ATTRIBUTE| -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: set_|ATTRIBUTE|
-//--------------------------------------------------------------------------------------
-template < class T >
-inline void |CLASSNAME|<T>::set_|ATTRIBUTE| ( <+argument list+> )
-{
- |ATTRIBUTE| = value;
- return ;
-} // ----- end of method |CLASSNAME|<T>::set_|ATTRIBUTE| -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-definition ==
-// =====================================================================================
-// Class: |?CLASSNAME:c|
-// Description: <CURSOR>
-// =====================================================================================
-
-template < class T >
-class |CLASSNAME|
-{
- public:
-
- // ==================== LIFECYCLE =======================================
- |CLASSNAME| (); // constructor
-
- // ==================== ACCESSORS =======================================
-
- // ==================== MUTATORS =======================================
-
- // ==================== OPERATORS =======================================
-
- protected:
- // ==================== DATA MEMBERS =======================================
-
- private:
- // ==================== DATA MEMBERS =======================================
-
-}; // ----- end of template class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: |CLASSNAME|
-// Description: constructor
-//--------------------------------------------------------------------------------------
-template < class T >
-|CLASSNAME| <T>:: |CLASSNAME| ()
-{<CURSOR>
-} // ----- end of constructor of template class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-using-new-definition ==
-// =====================================================================================
-// Class: |?CLASSNAME:c|
-// Description: <CURSOR>
-// =====================================================================================
-
-template < class T >
-class |CLASSNAME|
-{
- public:
-
- // ==================== LIFECYCLE =======================================
- |CLASSNAME| (); // constructor
- |CLASSNAME| ( const |CLASSNAME| &other ); // copy constructor
- ~|CLASSNAME| (); // destructor
-
- // ==================== ACCESSORS =======================================
-
- // ==================== MUTATORS =======================================
-
- // ==================== OPERATORS =======================================
-
- |CLASSNAME|& operator = ( const |CLASSNAME| &other ); // assignment operator
-
- protected:
- // ==================== DATA MEMBERS =======================================
-
- private:
- // ==================== DATA MEMBERS =======================================
-
-}; // ----- end of template class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-class-using-new-implementation ==
-//--------------------------------------------------------------------------------------
-// Class: |?CLASSNAME|
-// Method: |CLASSNAME|
-// Description: constructor
-//--------------------------------------------------------------------------------------
-template < class T >
-|CLASSNAME|<T>::|CLASSNAME| ()
-{
-} // ----- end of constructor of template class |CLASSNAME| -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: |CLASSNAME|
-// Description: copy constructor
-//--------------------------------------------------------------------------------------
-template < class T >
-|CLASSNAME|<T>::|CLASSNAME| ( const |CLASSNAME| &other )
-{<CURSOR>
-} // ----- end of copy constructor of template class |CLASSNAME| -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: ~|CLASSNAME|
-// Description: destructor
-//--------------------------------------------------------------------------------------
-template < class T >
-|CLASSNAME|<T>::~|CLASSNAME| ()
-{
-} // ----- end of destructor of template class |CLASSNAME| -----
-
-//--------------------------------------------------------------------------------------
-// Class: |CLASSNAME|
-// Method: operator =
-// Description: assignment operator
-//--------------------------------------------------------------------------------------
-template < class T >
-|CLASSNAME|<T>& |CLASSNAME|<T>::operator = ( const |CLASSNAME| &other )
-{
- if ( this != &other ) {
- }
- return *this;
-} // ----- end of assignment operator of template class |CLASSNAME| -----
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.template-function ==
-template <class T>
-void<CURSOR> |?TEMPALTE_FUNCTION_NAME| ( <+argument list+> )
-{
- return ;
-} // ----- end of template function |?TEMPALTE_FUNCTION_NAME| -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.operator-in ==
-ostream &
-operator << ( ostream & os, const |?CLASSNAME| & obj )
-{
- os << obj.<CURSOR> ;
- return os;
-} // ----- end of function operator << -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.operator-out ==
-istream &
-operator >> ( istream & is, |?CLASSNAME| & obj )
-{
- is >> obj.<CURSOR> ;
- return is;
-} // ----- end of function operator >> -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.try-catch ==
-try {
-<SPLIT>}
-catch ( const <CURSOR> &ExceptObj ) { // handle exception:
-}
-catch (...) { // handle exception: unspecified
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.catch ==
-catch ( <CURSOR>const &ExceptObj ) { // handle exception:
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.catch-points ==
-catch (...) { // handle exception:
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.extern ==
-extern "C" {<CURSOR>
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.open-input-file ==
-string ifs_file_name = "<CURSOR>"; // input file name
-ifstream ifs; // create ifstream object
-
-ifs.open ( ifs_file_name.c_str() ); // open ifstream
-if (!ifs) {
- cerr << "\nERROR : failed to open input file " << ifs_file_name << endl;
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-ifs.close (); // close ifstream
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.open-output-file ==
-string ofs_file_name = "<CURSOR>"; // input file name
-ofstream ofs; // create ofstream object
-
-ofs.open ( ofs_file_name.c_str() ); // open ofstream
-if (!ofs) {
- cerr << "\nERROR : failed to open output file " << ofs_file_name << endl;
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-ofs.close (); // close ofstream
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.namespace-std ==
-using namespace std;
-== cpp.namespace ==
-using namespace |?NAMESPACE|;
-== cpp.namespace-block ==
-namespace |?NAMESPACE| {<CURSOR>
-<SPLIT>} // ----- end of namespace |NAMESPACE| -----
-== cpp.namespace-alias ==
-namespace |?NAMESPACE_ALIAS| = {-original namespace name-};
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== cpp.rtti-typeid == insert ==
-typeid(<CURSOR><SPLIT>)
-$
-== cpp.rtti-static-cast == insert ==
-static_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-const-cast == insert ==
-const_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-reinterpret-cast == insert ==
-reinterpret_cast<>(<CURSOR><SPLIT>)
-$
-== cpp.rtti-dynamic-cast == insert ==
-dynamic_cast<>(<CURSOR><SPLIT>)
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/cpp.idioms.template b/.vim/c-support/templates/cpp.idioms.template
deleted file mode 100644
index fa09ba8..0000000
--- a/.vim/c-support/templates/cpp.idioms.template
+++ /dev/null
@@ -1,109 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.function ==
-void<CURSOR>
-|?FUNCTION_NAME| ( <+argument list+> )
-{
-<SPLIT> return <+return value+>;
-} // ----- end of function |FUNCTION_NAME| -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.function-static ==
-static void<CURSOR>
-|?FUNCTION_NAME| ( <+argument list+> )
-{
-<SPLIT> return <+return value+>;
-} // ----- end of static function |FUNCTION_NAME| -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.main ==
-#include <cstdlib>
-
-int
-main ( int argc, char *argv[] )
-{<CURSOR>
-<SPLIT> return EXIT_SUCCESS;
-} // ---------- end of function main ----------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.enum ==
-enum |?ENUM_NAME| {<CURSOR>
-<SPLIT>}; // ---------- end of enum |ENUM_NAME| ----------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.struct ==
-struct |?STRUCT_NAME| {<CURSOR>
-<SPLIT>}; // ---------- end of struct |STRUCT_NAME| ----------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.union ==
-union |?UNION_NAME| {<CURSOR>
-<SPLIT>}; // ---------- end of union |UNION_NAME| ----------
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.printf == insert ==
-printf ( "<CURSOR>\n" );
-== idioms.scanf == insert ==
-scanf ( "<CURSOR>", & );
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.calloc ==
-|?POINTER| = calloc ( (size_t)(<CURSOR><+COUNT+>), sizeof(<+TYPE+>) );
-if ( |POINTER|==NULL ) {
- fprintf ( stderr, "\ndynamic memory allocation failed\n" );
- exit (EXIT_FAILURE);
-}
-
-free (|POINTER|);
-|POINTER| = NULL;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.malloc ==
-|?POINTER| = malloc ( sizeof(<CURSOR><+TYPE+>) );
-if ( |POINTER|==NULL ) {
- fprintf ( stderr, "\ndynamic memory allocation failed\n" );
- exit (EXIT_FAILURE);
-}
-
-free (|POINTER|);
-|POINTER| = NULL;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.sizeof == insert ==
-sizeof(<CURSOR><SPLIT>)
-== idioms.assert == insert ==
-assert(<CURSOR><SPLIT>);
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.open-input-file ==
-FILE *|?FILEPOINTER|; // input-file pointer
-char *|FILEPOINTER|_file_name = "<CURSOR>"; // input-file name
-
-|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "r" );
-if ( |FILEPOINTER| == NULL ) {
- fprintf ( stderr, "couldn't open file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-if( fclose(|FILEPOINTER|) == EOF ) { // close input file
- fprintf ( stderr, "couldn't close file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.open-output-file ==
-FILE *|?FILEPOINTER|; // output-file pointer
-char *|FILEPOINTER|_file_name = "<CURSOR>"; // output-file name
-
-|FILEPOINTER| = fopen( |FILEPOINTER|_file_name, "w" );
-if ( |FILEPOINTER| == NULL ) {
- fprintf ( stderr, "couldn't open file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-<SPLIT>{-continue here-}
-if( fclose(|FILEPOINTER|) == EOF ) { // close output file
- fprintf ( stderr, "couldn't close file '%s'; %s\n",
- |FILEPOINTER|_file_name, strerror(errno) );
- exit (EXIT_FAILURE);
-}
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== idioms.fprintf == insert ==
-fprintf ( |?FILEPOINTER|, "<CURSOR>\n", );
-== idioms.fscanf == insert ==
-fscanf ( |?FILEPOINTER|, "<CURSOR>", & );
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/templates/cpp.preprocessor.template b/.vim/c-support/templates/cpp.preprocessor.template
deleted file mode 100644
index 68de87f..0000000
--- a/.vim/c-support/templates/cpp.preprocessor.template
+++ /dev/null
@@ -1,50 +0,0 @@
-$-------------------------------------------------------------------------
-== preprocessor.include-global ==
-#include <<CURSOR>>
-$-------------------------------------------------------------------------
-== preprocessor.include-local ==
-#include "<CURSOR>"
-$-------------------------------------------------------------------------
-== preprocessor.define ==
-#define <CURSOR> //
-$-------------------------------------------------------------------------
-== preprocessor.undefine ==
-#undef <CURSOR> //
-$-------------------------------------------------------------------------
-== preprocessor.if-else-endif ==
-#if |?CONDITION:u|
-<CURSOR><SPLIT>
-#else // ----- not |CONDITION| -----
-<+ELSE PART+>
-
-#endif // ----- not |CONDITION| -----
-$-------------------------------------------------------------------------
-== preprocessor.ifdef-else-endif ==
-#ifdef |?CONDITION:u|
-<CURSOR><SPLIT>
-#else // ----- not |CONDITION| -----
-<+ELSE PART+>
-#endif // ----- not |CONDITION| -----
-$-------------------------------------------------------------------------
-== preprocessor.ifndef-else-endif ==
-#ifndef |?CONDITION:u|
-<CURSOR><SPLIT>
-#else // ----- not |CONDITION| -----
-<+ELSE PART+>
-#endif // ----- not |CONDITION| -----
-$-------------------------------------------------------------------------
-== preprocessor.ifndef-def-endif ==
-#ifndef |?BASENAME:L|_INC
-#define |BASENAME|_INC
-<CURSOR><SPLIT>
-#endif // ----- #ifndef |BASENAME|_INC -----
-$-------------------------------------------------------------------------
-== preprocessor.error ==
-#error "<CURSOR>" //
-$-------------------------------------------------------------------------
-== preprocessor.line ==
-#line <CURSOR> //
-$-------------------------------------------------------------------------
-== preprocessor.pragma ==
-#pragma <CURSOR> //
-$-------------------------------------------------------------------------
diff --git a/.vim/c-support/templates/cpp.statements.template b/.vim/c-support/templates/cpp.statements.template
deleted file mode 100644
index c2fdecb..0000000
--- a/.vim/c-support/templates/cpp.statements.template
+++ /dev/null
@@ -1,72 +0,0 @@
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.do-while ==
-do {
-<SPLIT>} while ( <CURSOR> ); // ----- end do-while -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.for ==
-for ( <CURSOR>; ; )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.for-block ==
-for ( <CURSOR>; ; ) {
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if ==
-if ( <CURSOR> )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-block ==
-if ( <CURSOR> ) {
-<SPLIT><-IF PART->
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-else ==
-if ( <CURSOR> )
-<SPLIT>else
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.if-block-else ==
-if ( <CURSOR> ) {
-<SPLIT><-IF PART->
-}
-else {
-<+ELSE PART+>
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.else-block ==
-else {
-<CURSOR><SPLIT>
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.while ==
-while ( <CURSOR> )
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.while-block ==
-while ( <CURSOR> ) {
-<SPLIT>}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.switch ==
-switch ( <CURSOR> ) {
- case 1:
- <SPLIT>break;
-
- case 2:
- break;
-
- case 3:
- break;
-
- case 4:
- break;
-
- default:
- break;
-} // ----- end switch -----
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.case ==
-case <CURSOR>:
-break;
-
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-== statements.block ==
-{
-<CURSOR><SPLIT>
-}
-$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/.vim/c-support/wordlists/c-c++-keywords.list b/.vim/c-support/wordlists/c-c++-keywords.list
deleted file mode 100644
index 5a97dd6..0000000
--- a/.vim/c-support/wordlists/c-c++-keywords.list
+++ /dev/null
@@ -1,209 +0,0 @@
-adjustfield
-basefield
-boolalpha
-floatfield
-internal
-scientific
-setbase
-setiosflags
-setprecision
-showbase
-showpoint
-showpos
-uppercase
-
-auto
-break
-case
-char
-const
-continue
-default
-double
-else
-enum
-extern
-float
-goto
-inline
-long
-register
-restrict
-return
-short
-signed
-sizeof
-static
-struct
-switch
-typedef
-union
-unsigned
-void
-volatile
-while
-_Bool
-_Complex
-_Imaginary
-EXIT_FAILURE
-EXIT_SUCCESS
-
-bool
-catch
-class
-const_cast
-delete
-dynamic_cast
-explicit
-export
-false
-friend
-mutable
-namespace
-operator
-private
-protected
-public
-reinterpret_cast
-static_cast
-template
-this
-throw
-true
-typeid
-typename
-using
-virtual
-wchar_t
-
-and_eq
-bitand
-bitor
-compl
-not_eq
-or_eq
-xor_eq
-
-define
-defined
-elif
-endif
-error
-ifdef
-ifndef
-include
-pragma
-undef
-
-exception
-bad_alloc
-bad_exception
-bad_cast
-bad_typeid
-ios_base::failure
-logic_error
-domain_error
-invalid_argument
-length_error
-out_of_range
-runtime_error
-range_error
-overflow_error
-underflow_error
-uncaught_exception
-
-__DATE__
-__FILE__
-__LINE__
-__STDC__
-__STDC_HOSTED__
-__STDC_IEC_559__
-__STDC_IEC_559_COMPLEX__
-__STDC_ISO_10646__
-__STDC_VERSION__
-__TIME__
-__func__
-__cplusplus
-
-__BORLANDC__
-__CYGWIN__
-__CYGWIN32__
-__GNUC__
-__WIN32__
-__WINDOWS__
-
-assert
-ctype
-errno
-float
-limits
-locale
-math
-setjmp
-signal
-stdarg
-stddef
-stdio
-stdlib
-string
-time
-
-complex
-fenv
-inttypes
-iso646
-stdbool
-stdint
-tgmath
-wchar
-wctype
-
-algorithm
-bitset
-complex
-deque
-exception
-fstream
-functional
-iomanip
-ios
-iosfwd
-iostream
-istream
-iterator
-limits
-list
-locale
-
-map
-memory
-new
-numeric
-ostream
-queue
-set
-sstream
-stack
-stdexcept
-streambuf
-string
-typeinfo
-utility
-valarray
-vector
-
-cassert
-cctype
-cerrno
-cfloat
-climits
-clocale
-cmath
-csetjmp
-csignal
-cstdarg
-cstddef
-cstdio
-cstdlib
-cstring
-ctime
diff --git a/.vim/c-support/wordlists/k+r.list b/.vim/c-support/wordlists/k+r.list
deleted file mode 100644
index 805756a..0000000
--- a/.vim/c-support/wordlists/k+r.list
+++ /dev/null
@@ -1,108 +0,0 @@
-address
-allocator
-allocation
-argument
-arithmetic
-array
-assignement
-bitwise
-block
-character
-command
-condition
-conditional
-constant
-conversion
-declaration
-decrement
-defined
-definition
-descriptor
-description
-dimension
-evaluation
-expression
-external
-format
-formatted
-function
-global
-handling
-identifier
-implementation
-increment
-initialization
-input
-interface
-label
-lexical
-local
-logical
-lookup
-loop
-lvalue
-miscellaneous
-notation
-numerical
-operator
-operation
-output
-pointer
-precedence
-preprocessor
-preprocessing
-program
-random
-recursion
-recursive
-reference
-referential
-relational
-scope
-standard
-statement
-string
-structure
-system
-undefined
-variable
-
-abstract
-algorithm
-alignment
-application
-assignment
-asynchronous
-binary
-buffer
-component
-constructor
-container
-destructor
-difference
-enumeration
-exception
-floating-point
-horizontal
-inheritance
-instantiation
-integer
-internal
-invariant
-iterator
-localization
-overflow
-overload
-override
-overwrite
-polymorphic
-portability
-position
-postcondition
-precision
-precondition
-prototype
-subscript
-underflow
-vertical
-whitespace
diff --git a/.vim/c-support/wordlists/stl_index.list b/.vim/c-support/wordlists/stl_index.list
deleted file mode 100644
index b5d98a3..0000000
--- a/.vim/c-support/wordlists/stl_index.list
+++ /dev/null
@@ -1,202 +0,0 @@
-accumulate
-adjacent_difference
-adjacent_find
-advance
-append
-assign
-auto_ptr
-back
-back_inserter
-basic_string
-bidirectional_iterator
-bidirectional_iterator_tag
-binary_compose
-binary_function
-binary_negate
-binary_search
-bind1st
-bind2nd
-bit_vector
-bitset
-capacity
-char_producer
-char_traits
-char_type
-compare
-construct
-copy
-copy_backward
-copy_n
-count
-count_if
-deque
-destroy
-distance
-distance_type
-divides
-equal
-equal_range
-equal_to
-erase
-fill
-fill_n
-find
-find_end
-find_first_not_of
-find_first_of
-find_if
-find_last_not_of
-find_last_of
-for_each
-forward_iterator
-forward_iterator_tag
-front
-front_inserter
-generate
-generate_n
-get_temporary_buffer
-greater
-greater_equal
-hash
-hash_map
-hash_multimap
-hash_multiset
-hash_set
-identity
-includes
-inner_product
-inplace_merge
-input_iterator
-input_iterator_tag
-insert
-insert_iterator
-inserter
-int_type
-iota
-is_heap
-is_sorted
-istream_iterator
-istream_type
-istreambuf_iterator
-iter_swap
-iterator_category
-iterator_traits
-less
-less_equal
-lexicographical_compare
-lexicographical_compare_3way
-list
-logical_and
-logical_not
-logical_or
-lower_bound
-make_heap
-make_pair
-map
-max
-max_element
-mem_fun1_ref_t
-mem_fun1_t
-mem_fun_ref_t
-mem_fun_t
-merge
-min
-min_element
-minus
-mismatch
-modulus
-multimap
-multiplies
-multiset
-negate
-next_permutation
-not_equal_to
-nth_element
-operator
-ostream_iterator
-ostreambuf_iterator
-output_iterator
-output_iterator_tag
-pair
-partial_sort
-partial_sort_copy
-partial_sum
-partition
-plus
-pointer_to_binary_function
-pointer_to_unary_function
-pop_back
-pop_front
-pop_heap
-power
-prev_permutation
-priority_queue
-project1st
-project2nd
-ptr_fun
-push_back
-push_front
-push_heap
-queue
-random_access_iterator
-random_access_iterator_tag
-random_sample
-random_sample_n
-random_shuffle
-raw_storage_iterator
-release
-remove
-remove_copy
-remove_copy_if
-remove_if
-replace
-replace_copy
-replace_copy_if
-replace_if
-reset
-resize
-return_temporary_buffer
-reverse
-reverse_bidirectional_iterator
-reverse_copy
-reverse_iterator
-rfind
-rope
-rotate
-rotate_copy
-search
-search_n
-select1st
-select2nd
-sequence_buffer
-set
-set_difference
-set_intersection
-set_symmetric_difference
-set_union
-slist
-sort
-sort_heap
-stable_partition
-stable_sort
-stack
-streambuf_type
-substr
-subtractive_rng
-swap
-swap_ranges
-temporary_buffer
-transform
-unary_compose
-unary_function
-unary_negate
-uninitialized_copy
-uninitialized_copy_n
-uninitialized_fill
-uninitialized_fill_n
-unique
-unique_copy
-upper_bound
-value_comp
-value_type
-vector
diff --git a/.vim/doc/csupport.txt b/.vim/doc/csupport.txt
deleted file mode 100644
index 615279e..0000000
--- a/.vim/doc/csupport.txt
+++ /dev/null
@@ -1,2152 +0,0 @@
-*csupport.txt* C/C++ Support February 05 2010
-
-C/C++ Support *c-support* *csupport*
- Plugin version 5.10
- for Vim version 7.0 and above
- Fritz Mehner <mehner@fh-swf.de>
-
-C/C++-IDE for Vim/gVim. It is written to considerably speed up writing code in
-a consistent style. This is done by inserting complete statements,idioms,
-code snippets, templates, and comments. Syntax checking, compiling, running
-a program, running a code checker or a reformatter can be done with a
-keystroke.
-
- 1. Usage |csupport-usage-gvim|
- 1.1 Menu 'Comments' |csupport-comm|
- 1.1.1 Append aligned comments |csupport-comm-aligned|
- 1.1.2 Adjust end-of-line comments |csupport-comm-realign|
- 1.1.3 Code to comment |csupport-code-to-comm|
- 1.1.4 Comment to code |csupport-comm-to-code|
- 1.1.5 Frame comments, file header, ... |csupport-comm-frame|
- 1.1.6 File section comments .. |csupport-comm-sections|
- 1.1.7 Keyword comment, special comment |csupport-comm-keyword|
- 1.1.8 Tags (plugin) |csupport-comm-tags|
- 1.1.9 Date and date+time |csupport-comm-date|
- 1.1.10 C to C++ comments and vice versa |csupport-comm-c-cpp|
- 1.2 Menu 'Statements' |csupport-stat|
- 1.2.1 Normal mode, insert mode. |csupport-stat-normal-mode|
- 1.2.2 Visual mode. |csupport-stat-visual-mode|
- 1.3 Menu 'Preprocessor' |csupport-prep|
- 1.3.1 Normal mode, insert mode. |csupport-prep-normal-mode|
- 1.3.2 Visual mode. |csupport-prep-visual-mode|
- 1.3.3 Block out code with #if 0 .. #endif |csupport-prep-if0|
- 1.3.4 Ex-commands |csupport-prep-ex|
- 1.4 Menu 'Idioms' |csupport-idioms|
- 1.4.1 Item 'function' |csupport-idioms-function|
- 1.4.2 for-loop control |csupport-idioms-for-loop|
- 1.4.3 Item 'open input file' |csupport-idioms-input|
- 1.4.4 Item 'open output file' |csupport-idioms-output|
- 1.5 Menu 'Snippets' |csupport-snippets|
- 1.5.1 Code snippets |csupport-snippets|
- 1.5.2 Picking up prototypes |csupport-proto|
- 1.5.3 Code templates |csupport-templates-menu|
- 1.6 Menu 'C++' |csupport-c++|
- 1.6.1 Normal mode, insert mode. |csupport-c++-normal-mode|
- 1.6.2 Visual mode. |csupport-c++-visual-mode|
- 1.6.3 Method implementation |csupport-c++-method-impl|
- 1.6.4 Ex commands |csupport-c++-ex|
- 1.7 Menu 'Run' |csupport-run|
- 1.7.1 Minimal make functionality |csupport-run-buffer|
- 1.7.2 Command line arguments |csupport-run-cmdline-args|
- 1.7.3 Run make |csupport-run-make|
- 1.7.4 Command line arguments for make |csupport-run-make-args|
- 1.7.5 Splint |csupport-run-splint|
- 1.7.6 CodeCheck |csupport-run-codecheck|
- 1.7.7 Indent |csupport-run-indent|
- 1.7.8 Hardcopy |csupport-run-hardcopy|
- 1.7.9 Rebuild templates |csupport-run-templates|
- 1.7.10 Xterm size |csupport-run-xterm|
- 1.7.11 Output redirection |csupport-run-output|
- 1.8 Help |csupport-help|
-
- 2. Usage without GUI |csupport-usage-vim|
- 3. Hotkeys |csupport-hotkeys|
- 4. Customization and configuration |csupport-custom|
- 4.1 Global variables |csupport-custom-glob-vars|
- 4.2 The root menu |csupport-custom-root-menu|
- 4.3 System-wide installation |csupport-system-wide|
- 5. Template files and tags |csupport-templates|
- 5.1 Template files |csupport-templates-files|
- 5.2 Macros |csupport-templates-macros|
- 5.2.1 User defined formats for date and time |csupport-templates-date|
- 5.3 Templates |csupport-templates-names|
- 5.3.1 Template names |csupport-templates-names|
- 5.3.2 Template definition |csupport-templates-definition|
- 5.3.3 Template expansion |csupport-templates-expansion|
- 5.3.4 The macros <+text+> etc. |csupport-templates-jump|
- 5.3.5 Command Ctrl-j |csupport-Ctrl-j|
- 5.4 Switching between template sets |csupport-templates-sets|
- 5.5 Binding a style to a file extension |csupport-templates-bind|
- 6. C/C++ Dictionaries |csupport-dictionary|
- 7. Extend ctags |csupport-ctags|
- 7.1 Make and qmake |csupport-ctags-make|
- 7.2 Templates |csupport-ctags-templates|
- 8. Folding |csupport-folding|
- 9 Additional Mappings |csupport-ad-mappings|
- 10. Windows particularities |csupport-windows|
- 11. Additional tips |csupport-tips|
- 12. Troubleshooting |csupport-troubleshooting|
- 13. Release Notes /Change Log |csupport-release-notes|
-
- How to add this help file to Vim's help |add-local-help|
-
-
-==============================================================================
-1. USAGE WITH GUI (gVim) *csupport-usage-gvim*
-==============================================================================
-
-If the root menu 'C/C++' is not visible call it with the item "Load C Support"
-from the standard Tools-menu.
-The item "Load C Support" can also be used to unload the C/C++-root menu.
-
-Nearly all menu entries insert code snippets or comments. All these stuff is
-taken from template files and can be changed by the user to meet his
-requirements (see|csupport-templates|).
-
-------------------------------------------------------------------------------
-1.1 MENU 'Comments' *csupport-comm*
-------------------------------------------------------------------------------
-
-1.1.1 APPEND ALIGNED COMMENTS TO CONSECUTIVE LINES *csupport-comm-aligned*
-
-In NORMAL MODE the menu items 'end-of-line comment' will append an comment to
-the current line.
-In VISUAL MODE these item will append aligned comments to all marked lines.
-Marking the first 4 lines
-
- print_double_array ( double array[],
- int n,
- int columns,
- char* arrayname
- )
-
-and choosing 'end-of-line com. /**/' will yield.
-
- print_double_array ( double array[], /* */
- int n, /* */
- int columns, /* */
- char* arrayname /* */
- ) /* */
-
-If one ore more lines go beyond the starting column (s.below) the comments
-will start at the 2. column after the longest line. The cursor will be
-positioned inside the first comment.
-
-The default starting column is 49 ( = (multiple of 2,4, or 8) + 1 ). This can
-be changed by setting a global variable in the file ~/.vimrc , e.g. :
-
- let g:C_LineEndCommColDefault = 45
-
-The starting column can also be set by the menu item
-'Comments->set end-of-line com. col' . Just position the cursor in an
-arbitrary column (column number is shown in the Vim status line) and choose
-this menu item. This setting is buffer related.
-
-If the cursor was at the end of a line you will be asked for a column number
-because this position is most likely not the desired starting column.
-Your choice will be confirmed.
-
-------------------------------------------------------------------------------
-
-1.1.2 ADJUST END-OF-LINE COMMENTS *csupport-comm-realign*
-
-After some changes end-of-line comments may be no longer aligned:
-
- print_double_array ( double array[], /* */
- long int n, /* */
- unsigned int columns, /* */
- char* a_name /* */
- ) /* */
-
-Realignment can be achieved with the menu item 'adjust end-of-line com.' In
-normal mode the comment (if any) in the current line will be aligned to the
-end-of-line comment column (see above) if possible. In visual mode the
-comments in the marked block will be aligned:
-
- print_double_array ( double array[], /* */
- long int n, /* */
- unsigned int columns, /* */
- char* a_name /* */
- ) /* */
-
-The realignment will not be done for comments with nothing else than leading
-whitespaces. These comments are usually captions:
-
- max = other.max; /* the maximum value */
- len = other.len; /* the length */
- /* ===== the next section ===== */
- pos = (x+y+z)/3.0; /* the next position */
-
-After the alignment we have:
-
- max = other.max; /* the maximum value */
- len = other.len; /* the length */
- /* ===== the next section ===== */
- pos = (x+y+z)/3.0; /* the next position */
-
-------------------------------------------------------------------------------
-
-1.1.3 CODE TO COMMENT *csupport-code-to-comm*
-
-The marked block
-
-xxxxxxxx
-xxxxxxxx
-xxxxxxxx
-
-will be changed by the menu item 'code->comment /**/' into the multiline
-comment (all (partially) marked lines):
-
-/* xxxxxxxx
- * xxxxxxxx
- * xxxxxxxx
- */
-
-The marked block will be changed by the menu item 'code->comment //' into the
-multiline comment
-
-//xxxxxxxx
-//xxxxxxxx
-//xxxxxxxx
-
-The menu items works also for a single line. A single line needs not to be
-marked.
-
-------------------------------------------------------------------------------
-
-1.1.4 COMMENT TO CODE *csupport-comm-to-code*
-
-If one (or more) complete comment (i.e. all lines belonging to the comment) is
-marked the item 'comment->code' will uncomment it. If the following lines
-are marked
-
- * printf ("\n");
- */
-
- printf ("\n");
-
- // printf ("\n");
- //
-
- /*
- * printf ("\n");
- */
-
-uncommenting will yield
-
- * printf ("\n");
- */
-
- printf ("\n");
-
- printf ("\n");
-
-
-
- printf ("\n");
-
-The first 2 lines are only a part of a C-comment and remain unchanged.
-A C-comment can start with /* , /** or /*! .
-
-The menu item works also for a single line with a leading // . A single line
-needs not to be marked.
-
-------------------------------------------------------------------------------
-
-1.1.5 FRAME COMMENTS, FILE HEADER, ... *csupport-comm-frame*
-
-Frame comments, file header comments and function, methods, class descriptions
-are read as templates from the appropriate files (see |csupport-templates|).
-
-There are to file description templates (menu items 'file description (impl.)'
-and 'file description (header)', see also |csupport-templates|):
-
- comment.file-description : files *.c *.cc *.cp *.cxx *.cpp *.CPP *.c++
- *.C *.i *.ii
-
- comment.file-description-header : everything else with filetype 'c' or 'cpp'
-
-The appropriate template will also be included into a new file. The plugin
-decides on the basis of the file extension. The default is shown above. You
-can change the list by setting a global variable in '~/.vimrc':
-
- au BufRead,BufNewFile *.XYZ set filetype=c
-
- let g:C_SourceCodeExtensions = 'XYZ c cc cp cxx cpp CPP c++ C i ii'
-
-A new file named 'test.XYZ' will now be considered a C implementation file.
-
-------------------------------------------------------------------------------
-
-1.1.6 FILE SECTION COMMENTS *csupport-comm-sections*
-
-File section comments can be uses to separate typical C- and H-file sections
-with comments of similar appearance, e.g.
-
-/* ##### HEADER FILE INCLUDES ################################################### */
-
-/* ##### MACROS - LOCAL TO THIS SOURCE FILE ################################### */
-
-/* ##### TYPE DEFINITIONS - LOCAL TO THIS SOURCE FILE ######################### */
-
-These section comments can also be inserted using the hotkey \ccs for C/C++
-files, or \chs for H-files. These hotkeys will start the command
-'CFileSection' or 'HFileSection' on the command line:
-
- :CFileSection
- :HFileSection
-
-Now type a <Tab> to start the selection menu to choose from.
-
-------------------------------------------------------------------------------
-
-1.1.7 KEYWORD COMMENT, SPECIAL COMMENT *csupport-comm-keyword*
-
-Keword comments are end-of-line comments:
-
- /* :<keyword>:<date+time>:<author reference>: <arbitrary comment text> */
-
-Keywords are
-
- BUG COMPILER TODO TRICKY WARNING WORKAROUND user-defined-keyword
-
-These are preliminary comments to document places where works will be resumed
-shortly. They are usually not meant for the final documentation. These
-comments are easily found by searching for the keyword.
-The keyword comments can also be inserted using the hotkey \ckc . This hotkey
-starts the command 'KeywordComment' on the command line:
-
- :KeywordComment
-
-Now type a <Tab> to start the selection menu to choose from.
-
-Special comments are occasionally used to mark special features of a code
-construct (e.g. a fall through cases in a switch statement, an empty loop):
-
- /* EMPTY */
- /* NOT REACHED */
- /* REMAINS TO BE IMPLEMENTED */
- ....
-
-The special comments can also be inserted using the hotkey \csc . This hotkey
-starts the command 'SpecialComment' on the command line:
-
- :SpecialComment
-
-Now type a <Tab> to start the selection menu to choose from.
-
-------------------------------------------------------------------------------
-
-1.1.8 TAGS (PLUGIN) *csupport-comm-tags*
-
-The submenu 'tags (plugin)' let you insert the predefined macros from the
-template system (see|csupport-templates-macros|). In visual mode the marked
-string will be replaced by the macro.
-
-------------------------------------------------------------------------------
-
-1.1.9 DATE AND DATE+TIME *csupport-comm-date*
-
-The format for 'date' and 'date time' can be defined by the user (see
-|csupport-templates-date|). In visual mode the marked string will be replaced
-by the macro (e.g. to update date and time).
-
-------------------------------------------------------------------------------
-
-1.1.10 C TO C++ COMMENTS AND VICE VERSA *csupport-comm-c-cpp*
-
-The menu item '// xxx -> /* xxx */' changes a C++ comment into an C comment.
-This is done for the current line in normal or insert mode and for a marked
-area of lines in visual mode.
-If there are multiple C comments only the first one will be changed:
- printf ("\n"); /* one */ /* two */ /* three */
-will be changed into
- printf ("\n"); // one /* two */ /* three */
-
-The menu item '/* xxx */ -> // xxx' changes a C comment into an C++ comment.
-
-------------------------------------------------------------------------------
-1.2 MENU 'Statements' *csupport-stat*
-------------------------------------------------------------------------------
-
-1.2.1 NORMAL MODE, INSERT MODE. *csupport-stat-normal-mode*
-
-An empty statement will be inserted and properly indented. The item 'if{}'
-will insert an if-statement:
-
-if ( )
-{
-}
-
-
-1.2.2 VISUAL MODE. *csupport-stat-visual-mode*
-
-STATEMENTS WITH BLOCKS AND CASE LABEL.
---------------------------------------
-The highlighted area
-
-xxxxx
-xxxxx
-
-can be surrounded by one of the following statements:
-
- +----------------------------+-----------------------------+
- | if ( ) | if ( ) |
- | { | { |
- | xxxxx | xxxxx |
- | xxxxx | xxxxx |
- | } | } |
- | | else |
- | | { |
- | | } |
- +----------------------------+-----------------------------+
- | for ( ; ; ) | while ( ) |
- | { | { |
- | xxxxx | xxxxx |
- | xxxxx | xxxxx |
- | } | } |
- +----------------------------+-----------------------------+
- | do | |
- | { | { |
- | xxxxx | xxxxx |
- | xxxxx | xxxxx |
- | } | } |
- | while ( ); | |
- +----------------------------+-----------------------------+
- | switch ( ) { |
- | case : |
- | break; |
- | |
- | case : |
- | break; |
- | |
- | case : |
- | break; |
- | |
- | case : |
- | break; |
- | |
- | default: |
- | break; |
- | } |
- +----------------------------+-----------------------------+
-
-The whole statement will be indented after insertion.
-
-
-STATEMENTS WITHOUT BLOCKS.
---------------------------
-One of the following statements can be inserted:
-
- +-------------------------------+--------------------------+
- | if ( ) | for ( ; ; ) |
- +-------------------------------+--------------------------+
- | if ( ) | while ( ) |
- | else | |
- +-------------------------------+--------------------------+
- | case : | |
- | break; | |
- +-------------------------------+--------------------------+
-
-
-------------------------------------------------------------------------------
-1.3 MENU 'Preprocessor' *csupport-prep*
-------------------------------------------------------------------------------
-
-1.3.1 NORMAL MODE, INSERT MODE. *csupport-prep-normal-mode*
-
-The preprocessor statements will be inserted and properly indented.
-
-1.3.2 VISUAL MODE. *csupport-prep-visual-mode*
-
-STATEMENTS WITH BLOCKS
-----------------------
-The highlighted area
-
-xxxxx
-xxxxx
-
-can be surrounded by one of the following statements:
-
- +----------------------------+-----------------------------+
- | #if CONDITION |
- | xxxxx |
- | xxxxx |
- | #else /* ----- #if CONDITION ----- */ |
- | |
- | #endif /* ----- #if CONDITION ----- */ |
- +----------------------------------------------------------+
- | #ifdef CONDITION |
- | xxxxx |
- | xxxxx |
- | #else /* ----- #ifdef CONDITION ----- */ |
- | |
- | #endif /* ----- #ifdef CONDITION ----- */ |
- +----------------------------------------------------------+
- | #ifndef CONDITION |
- | xxxxx |
- | xxxxx |
- | #else /* ----- #ifndef CONDITION ----- */ |
- | |
- | #endif /* ----- #ifndef CONDITION ----- */ |
- +----------------------------------------------------------+
- | #ifndef INC_TEST |
- | #define INC_TEST |
- | xxxxx |
- | xxxxx |
- | #endif /* ----- #ifndef INC_TEST ----- */ |
- +----------------------------------------------------------+
- | #if 0 /* ----- #if 0 : If0Label_1 ----- */ |
- | |
- | #endif /* ----- #if 0 : If0Label_1 ----- */ |
- +----------------------------------------------------------+
-
-The macro name for an include guard (e.g. INC_TEST above) will be derived as a
-suggestion from the file name.
-
-1.3.3 BLOCK OUT CODE WITH #if 0 ... #endif *csupport-prep-if0*
-
-The menu item #if 0 #endif inserts the lines
-
- #if 0 /* ----- #if 0 : If0Label_1 ----- */
-
- #endif /* ----- #if 0 : If0Label_1 ----- */
-
-In visual mode the marked block of lines will be surrounded by these lines.
-
-This is usually done to temporarily block out some code. The label names like
-If0Label_1 are automatically inserted into the comments. The trailing numbers
-are automatically incremented. These numbers can be changed by the user. The
-next number will be one above the highest number found in the current buffer.
-
-A corresponding label can be found by searching with the vim star command (*).
-All labels can be found with a global search like :g/If0Label_/ or
-:g/If0Label_\d\+/. All corresponding lines can be deleted with :g/If0Label_/d .
-
-
-REMOVE THE ENCLOSING #if 0 ... #endif -CONSTRUCT.
-
-The menu item 'remove #if #endif' removes such a construct if the cursor is
-in the middle of such a section or on one of the two enclosing lines. Nested
-constructs will be untouched.
-
-1.3.4 EX-COMMANDS *csupport-prep-ex*
-
-There are 4 additional Ex command which can be used to insert include
-statements:
-
- Ex command hotkey includes
- -------------------------------------------------------------------------
- :IncludeStdLibrary \ps C standard library
- :IncludeC99Library \pc C99 library
- :IncludeCppLibrary \+ps C++ standard library
- :IncludeCppCLibrary \+pc C standard library ( #include <c...> )
-
-Type :Inc<Tab> and choose one of the commands. Now type an additional space
-and a <Tab> to show the whole list list or type a space and a few leading
-characters to reduce this list.
-
-------------------------------------------------------------------------------
-1.4 MENU 'Idioms' *csupport-idioms*
-------------------------------------------------------------------------------
-
-1.4.1 Item 'function' *csupport-idioms-function*
-
-NORMAL MODE, INSERT MODE:
-The name of the function is asked for and the following lines (for function
-name "f") will be inserted:
-
- void
- f ( )
- {
- return ;
- } /* ---------- end of function f ---------- */
-
-VISUAL MODE:
-Main or [static] function: the highlighted lines will go inside the new
-function or main.
-for-loops: the highlighted lines will be set in braces.
-
-1.4.2 for-loop control *csupport-idioms-for-loop*
-
-The menu items 'for( x=0; ... )' and 'for( x=n-1; ... )' can be used to write
-the control statement for a for-loop counting upward or downward. These items
-start an input dialog
-
- [TYPE (expand)] VARIABLE [START [END [INCR.]]] :
-
-asking for at least the name of the loop variable. The other parameters are
-optional. The type is restricted to the following integral data types:
-
- char
- int
- long int
- long
- short int
- short
- size_t
- unsigned char
- unsigned int
- unsigned long int
- unsigned long
- unsigned short int
- unsigned short
- unsigned
-
-One of these types can be specified by typing it completely or by typing zero
-or more characters of its name and completing them to the full name by using
-the tab key (tab completion). If the start of the type name is ambiguous (e.g.
-'uns') a list of completion candidates is provided to choose from.
-
-1.4.3 Item 'open input file' *csupport-idioms-input*
-
-The item 'open input file' will create the statements to open and close an
-input file (e.g. with the file pointer 'infile').
-
-1.4.4 Item 'open output file' *csupport-idioms-output*
-
-The item 'open output file' will create the statements to open and close an
-output file (e.g. with the file pointer 'outfile').
-
-------------------------------------------------------------------------------
-1.5 MENU 'Snippets' *csupport-snippets*
-------------------------------------------------------------------------------
-
-1.5.1 CODE SNIPPETS
-
-Code snippets are pieces of code which are kept in separate files in a special
-directory (e.g. a few lines of code or a complete template for a Makefile).
-File names are used to identify the snippets. The snippet directory will be
-created during the installation ( $HOME/.vim/codesnippets-c is the default).
-Snippets are managed with the 3 items
-
- C/C++ -> Snippets -> read code snippet
- C/C++ -> Snippets -> write code snippet
- C/C++ -> Snippets -> edit code snippet
-
-from the Snippets submenu.
-
-CREATING A NEW SNIPPET
-When nothing is marked, "write code snippet" will write the whole buffer
-to a snippet file, otherwise the marked area will be written to a file.
-
-INSERT A SNIPPET
-Select the appropriate file from the snippet directory ("read code snippet").
-The inserted lines will be indented.
-
-EDIT A SNIPPET
-This is a normal edit.
-
-INDENTATION / NO INDENTATION
-Code snippets are normally indented after insertion. To suppress indentation
-add the file extension "ni" or "noindent" to the snippet file name, e.g.
-
- parameter_handling.c.noindent
-
-Snippet browser
----------------
-Under a GUI a file requester will be put up. Without GUI the filename will be
-read from the command line. You can change this behavior by setting a global
-variable in your ~/.vimrc :
-
- let g:C_GuiSnippetBrowser = 'commandline'
-
-The default value is 'gui'.
-
-
-1.5.2 PICKING UP PROTOTYPES *csupport-proto*
-
-PICK UP PROTOTYPES.
-To make a prototype from a function head mark the function head and choose
-'Snippets -> pick up prototype'. From the first six lines of
-
- void
- print_double_array ( double array[], /* array to print */
- int n, /* number of elements to print */
- int columns, /* number of elements per column */
- char* arrayname /* array name */
- )
- {
- ...
- } /* ---------- end of function print_double_array ---------- */
-
-the prototype
-
- void print_double_array ( double array[], int n, int columns, char* arrayname );
-
-is produced and put in an internal buffer.
-- Leading and trailing whitespaces are removed.
-- All inner whitespaces are squeezed.
-- All comments will be discarded.
-- Trailing parts of the function body (e.g a '{' ) will also be removed.
-- The class name and the scope resolution operator will be removed (C++ method
- implementations).
-Further prototypes can be picked up and gathered in the buffer.
-
-For C++ methods namespace names and class names will be removed
-(exception: 'std::' ). The first two lines of
-
- std::string
- ROBOT::Robot::get_name ( void )
- {
- return type_name;
- } /* ----- end of method Robot::get_name ----- */
-
-result in the prototype
-
- std::string get_name ( void );
-
-Folding may help picking up prototypes (see |csupport-folding|).
-
-
-INSERT PROTOTYPES
-With 'Snippets -> insert prototype(s)' all picked up prototypes currently in
-the buffer will be inserted below the cursor.
-The prototype buffer will be cleared after insertion.
-
-
-DISCARD PROTOTYPES
-The prototype buffer can be cleared with 'Snippets -> clear prototype(s)' .
-
-
-SHOW PROTOTYPES
-The list of gathered prototypes can be shown with
-'Snippets -> show prototype(s)'. The number and the filename are shown, e.g.
-
- (1) matrix.c # double** calloc_double_matrix ( int rows, int columns );
- (2) matrix.c # void free_double_matrix ( double **m );
- (3) foomain.c # void foo ( );
-
-
-REMARK. Generating prototypes this way is nice in a small project. You may
-want to use an extractor like cextract or something else.
-
-
-1.5.3 Code Templates *csupport-templates-menu*
----------------------
-Nearly all menu entries insert code snippets or comments. All these stuff is
-taken from template files and can be changed by the user to meet his
-requirements (see|csupport-templates|on how to use the template system).
-
-The menu item 'edit local templates' opens the main template file in a local
-plugin installation. This is usually the file
-'~/.vim/c-support/templates/Templates'. There may be dependent files
-loaded from the main file. Now change whatever file you want, save it, and
-click on the menu item 'reread templates' to read in the file(s) and to
-rebuild the internal representation of the templates.
-
-The menu item 'edit global templates' opens the main template file in a
-system-wide plugin installation (see |csupport-system-wide|). This is
-usually the file '$VIM./vimfiles/c-support/templates/Templates'.
-
-Template browser
-----------------
-Under a GUI a file requester will be put up. Without GUI the filename will be
-read from the command line. You can change this behavior by setting a global
-variable in your ~/.vimrc :
-
- let g:C_GuiTemplateBrowser = 'explorer'
-
-The default value is 'gui'. 'explorer' will start the file explorer
-(see help|:Explore|). To use the commandline asign 'commandline'.
-
-------------------------------------------------------------------------------
-1.6 MENU 'C++' *csupport-c++*
-------------------------------------------------------------------------------
-
-1.6.1 NORMAL MODE, INSERT MODE. *csupport-c++-normal-mode*
-
-An empty statement will be inserted and in some cases properly indented. The
-item 'try .. catch' will insert the following lines:
-
- try {
- }
- catch ( const &ExceptObj ) { // handle exception:
- }
- catch (...) { // handle exception: unspecified
- }
-
-The cursor will go into the try block.
-
-1.6.2 VISUAL MODE. *csupport-c++-visual-mode*
-
-The highlighted area can be surrounded by one of the following statements:
-
- try - catch
- catch
- catch(...)
- namespace { }
- extern "C" { }
-
-The whole statement will be indented after insertion.
-
-1.6.3 METHOD IMPLEMENTATION *csupport-c++-method-impl*
-
-The menu item 'method implement.' asks for a method name. If this item is
-called the first time you will see just an scope resolution operator. If you
-specify the scope this is used the next time you call this item. If you use
-one of the menu items to generate a class (see |csupport-templates|) the
-scope will be extracted and used for the next method.
-
-1.6.4 EX COMMANDS *csupport-c++-ex*
-
-There are 4 additional Ex command which can be used to insert include
-statements. Please see |csupport-prep-ex|.
-
-------------------------------------------------------------------------------
-1.7 MENU 'Run' *csupport-run*
-------------------------------------------------------------------------------
-
-1.7.1 MINIMAL MAKE FUNCTIONALITY *csupport-run-buffer*
-
-The 'Run' menu provides a minimal make functionality for single file projects
-(e.g. in education) :
-
-SAVE AND COMPILE
-'save and compile' saves the buffer and run the compiler with the given
-options (see |csupport-custom-glob-vars|).
-
-An error window will be opened if the compiler reports errors and/or warnings.
-Quickfix commands can now be used to jump to an error location.
-
-Consider using maps like
- map <silent> <F7> <Esc>:cprevious<CR>
- map <silent> <F8> <Esc>:cnext<CR>
-in your ~/.vimrc file to jump over the error locations and make navigation
-easier. The error list and the error locations in your source buffer will be
-synchronized.
-
-
-LINK
-'link' makes an executable from the current buffer. If the buffer is not
-saved, or no object is available or the object is older then the source step
-'save and compile' is executed first.
-
-The behavior of the compiler / linker is determined by the options assigned to
-the variables described in |csupport-custom-glob-vars| (4.group).
-
-RUN
-'run' runs the executable with the same name (extension .e) as the current
-buffer. If the buffer is not saved, or no executable is available or the
-executable is older then the source steps 'save and compile' and 'link' are
-executed first.
-
-
-1.7.2 COMMAND LINE ARGUMENTS *csupport-run-cmdline-args*
-
-The item 'command line arguments' calls an input dialog which asks for command
-line arguments. These arguments are forwarded to the program which is run by
-the 'run' item. The arguments are kept until you change them.
-For the first and only the first argument file name expansion will work (use
-the Tab-key). Only the first string of the input can be expanded due to a
-restriction of the Vim input function. To expand two or more filenames
-specify them in reverse order: type the first characters of the last filename
-and expand them. Go to the start of the input and type the beginning of the
-last but one filename and expand it.
-
-The arguments belong to the current buffer (that is, each buffer can have its
-own arguments).
-If the buffer gets a new name with "save as" the arguments will now belong to
-the buffer with the new name.
-
-The command line arguments can be followed by pipes and redirections:
-
- 11 22 | sort -rn | head -10 > out
-
-Caveat: If you look for the current arguments by calling this menu item again
-be sure to leave it with a CR (not Esc !). Due to a limitation of an internal
-Vim function CR will keep the arguments, Esc will discard them.
-
-
-1.7.3 RUN make *csupport-run-make*
-
-The item 'make' runs the external make program.
-
-
-1.7.4 COMMAND LINE ARGUMENTS FOR make *csupport-run-make-args*
-
-The item 'command line arguments for make' calls an input dialog which asks
-for command line arguments for make. These arguments are forwarded to make
-when called by the item 'make'.
-
-
-1.7.5 SPLINT *csupport-run-splint*
-
-Splint is a tool for statically checking C programs (see http://www.splint.org).
-Of course it has to be installed in order to be used within Vim. The menu
-item 'Run->splint' will run the current buffer through splint.
-
-An error window will be opened if splint has something to complain about.
-Quickfix commands can now be used to jump to an error location. For easier
-navigation see tip under 'SAVE AND COMPILE' |csupport-run-buffer|.
-
-Splint has many options. Presumably the best way is to keep the options in an
-option file (~/.splintrc). For a quick try you can use the menu item
-'Run->cmd. line arg. for splint' to specify some buffer related options.
-
-When vim is started this plugin will check whether splint is executable. If
-not, the menu item will *NOT' be visible.
-
-
-1.7.6 CODECHECK *csupport-run-codecheck*
-
-CodeCheck (TM) is a commercial code analyzing tool produced by Abraxas
-Software, Inc. (www.abraxas-software.com).
-Of course it has to be installed in order to be used within Vim. The menu
-item 'Run->CodeCheck' will run the current buffer through CodeCheck.
-
-An error window will be opened if CodeCheck has something to complain about.
-Quickfix commands can now be used to jump to an error location. For easier
-navigation see tip under 'SAVE AND COMPILE' |csupport-run-buffer|.
-
-CodeCheck has many options. For a quick try you can use the menu item
-'Run->cmd. line arg. for CodeCheck' to specify some buffer related options.
-
-CodeCheck will be run with default options (see |csupport-custom-glob-vars|).
-The default options can be overwritten by placing a global variable in
-~/.vimrc , e.g.
-
- let g:C_CodeCheckOptions = "-K13 -Rmeyers"
-
-The default name for the executable is 'check'. There are other names in use
-on different platforms. The name can be changed by placing a global variable
-in ~/.vimrc , e.g.
-
- let g:C_CodeCheckExeName = "chknt.exe"
-
-When vim is started this plugin will check whether CodeCheck is executable. If
-not, the menu item will *NOT' be visible.
-
-
-1.7.7 INDENT *csupport-run-indent*
-
-The formatter 'indent' can be run over the whole buffer. Before formatting a
-buffer this buffer will be saved to disk and you will be asked for a
-confirmation.
-
-Indent has many options. These are kept in the file '.indent.pro' in your home
-directory. See the indent manual for more information.
-
-
-1.7.8 HARDCOPY *csupport-run-hardcopy*
-
-Generates a PostScript file from the whole buffer or from a marked region.
-On a Windows system a printer dialog is displayed.
-The hardcopy goes to the current working directory. If the buffer contains
-documentation or other material from non-writable directories the hardcopy
-goes to the HOME directory. The output destination will be shown in a message.
-
-The print header contains date and time for the current locale. The definition
-used is
-
- let s:C_Printheader = "%<%f%h%m%< %=%{strftime('%x %X')} Page %N"
-
-The current locale can be overwritten by changing the language, e.g.
-
- :language C
-
-or by setting a global variable in the file ~/.vimrc , e.g. :
-
- let g:C_Printheader = "%<%f%h%m%< %=%{strftime('%x %X')} SEITE %N"
-
-See :h printheader and :h strftime() for more details.
-
-
-1.7.9 REBUILD TEMPLATES *csupport-run-templates*
-
-After editing one or more template files a click on this item rereads the
-template files and rebuilds all templates.
-
-
-1.7.10 XTERM SIZE *csupport-run-xterm*
-
-The size of the xterm used for running a program (below) can be set by this
-menu item. The default is 80 columns with 24 lines.
-This feature is not available under Windows.
-
-
-1.7.11 OUTPUT REDIRECTION *csupport-run-output*
-
-Running a program can be done in one of three ways:
-(1) Run the program from the gVim command line.
- This is for interactive programs with little input and output.
-(2) Run the program and direct the output into a window with name "C-Output".
- The buffer and its content will disappear when the window is closed and
- reused otherwise.
- This is for non-interactive programs with little to very much output.
- You have unlimited line length, regex search, navigation, ...
- The tabstop value will be set to 8 for "C-Output".
-(3) Run the program in an xterm.
-
-The output method can be chosen from the menu item 'Run->output: ...'.
-This menu has three states:
-
- output: VIM->buffer->xterm
- output: BUFFER->xterm->vim
- output: XTERM->vim->buffer
-
-The first (uppercase) item shows the current method. The default is 'vim'.
-This can be changed by setting the variable g:C_OutputGvim to another value.
-Possible values are 'vim', 'buffer' and 'xterm' .
-
-The xterm defaults can be set in ~/.vimrc by the variable g:C_XtermDefaults .
-The default is "-fa courier -fs 12 -geometry 80x24" :
- font name : -fa courier
- font size : -fs 12
- terminal size : -geometry 80x24
-See 'xterm -help' for more options. Xterms are not available under Windows.
-
-------------------------------------------------------------------------------
-1.8 'help' *csupport-help*
-------------------------------------------------------------------------------
-Plugin help
------------
-The root menu item 'help (plugin)' shows this plugin help in a help window.
-The help tags must have been generated with
- :helptags ~/.vim/doc
-The hotkey is \hp (for "help plugin").
-
-Displaying a manual
--------------------
-The root menu item 'show manual' shows the manual for the word under the
-cursor. If there is more than one manual a selection list will be presented.
-If there is no word under the cursor you can type in a name. An interface to
-the on-line reference manuals must be installed (usually man(1) for
-Linux/Unix, see|csupport-custom-glob-vars|).
-The hotkey is \hm (for "help manual").
-
-==============================================================================
-2. USAGE WITHOUT GUI (Vim) *csupport-usage-vim*
-==============================================================================
-
-The frequently used constructs can be inserted with key mappings. The
-mappings are also described in the document c-hot-keys.pdf (reference card,
-part of this package).
-Hint: Typing speed matters. The combination of a leader ('\') and the
-following character(s) will only be recognized for a short time.
-The insert mode mappings start with ` (backtick).
-
-Legend: (i) insert mode, (n) normal mode, (v) visual mode
-
- -- Help ---------------------------------------------------------------
-
- \hm show manual for word under the cursor (n,i)
- \hp show plugin help (n,i)
-
- -- Comments -----------------------------------------------------------
-
- \cl end-of-line comment (n,v,i)
- \cj adjust end-of-line comment(s) (n,v,i)
- \cs set end-of-line comment column (n)
- \c* code -> comment /* */ (n,v)
- \cc code -> comment // (n,v)
- \co comment -> code (n,v)
- \cfr frame comment (n,i)
- \cfu function comment (n,i)
- \cme method description (n,i)
- \ccl class description (n,i)
- \cfdi file description (implementation) (n,i)
- \cfdh file description (header) (n,i)
- \ccs C/C++-file section (tab. compl.) (n,i)
- \chs H-file section (tab. compl.) (n,i)
- \ckc keyword comment (tab. compl.) (n,i)
- \csc special comment (tab. compl.) (n,i)
- \cd date (n,v,i)
- \ct date \& time (n,v,i)
-
- -- Statements ---------------------------------------------------------
-
- \sd do { } while (n,v,i)
- \sf for (n,i)
- \sfo for { } (n,v,i)
- \si if (n,i)
- \sif if { } (n,v,i)
- \sie if else (n,v,i)
- \sife if { } else { } (n,v,i)
- \se else { } (n,v,i)
- \sw while (n,i)
- \swh while { } (n,v,i)
- \ss switch (n,v,i)
- \sc case (n,i)
- \s{ \sb { } (n,v,i)
-
- -- Preprocessor -------------------------------------------------------
-
- \ps choose a standard library include (n,i)
- \pc choose a C99 include (n,i)
- \p< #include <> (n,i)
- \p" #include "" (n,i)
- \pd #define (n,i)
- \pu #undef (n,i)
- \pie #if #else #endif (n,v,i)
- \pid #ifdef #else #endif (n,v,i)
- \pin #ifndef #else #endif (n,v,i)
- \pind #ifndef #def #endif (n,v,i)
- \pi0 #if 0 #endif (n,v,i)
- \pr0 remove #if 0 #endif (n,i)
- \pe #error (n,i)
- \pl #line (n,i)
- \pp #pragma (n,i)
-
- -- Idioms -------------------------------------------------------------
-
- \if function (n,v,i)
- \isf static function (n,v,i)
- \im main() (n,v,i)
- \i0 for( x=0; x<n; x+=1 ) (n,v,i)
- \in for( x=n-1; x>=0; x-=1 ) (n,v,i)
- \ie enum + typedef (n,i)
- \is struct + typedef (n,i)
- \iu union + typedef (n,i)
- \ip printf() (n,i)
- \isc scanf() (n,i)
- \ica p=calloc() (n,i)
- \ima p=malloc() (n,i)
- \isi sizeof() (n,v,i)
- \ias assert() (n,v)
- \ii open input file (n,i)
- \io open output file (n,i)
-
- -- Snippets -----------------------------------------------------------
-
- \nr read code snippet (n,i)
- \nw write code snippet (n,v,i)
- \ne edit code snippet (n,i)
- \np pick up prototype (n,v,i)
- \ni insert prototype(s) (n,i)
- \nc clear prototype(s) (n,i)
- \ns show prototype(s) (n,i)
- \ntl edit local templates (n,i)
- \ntg edit global templates (n,i)
- \ntr rebuild templates (n,i)
-
- -- C++ ----------------------------------------------------------------
-
- \+co cout << << endl; (n,i)
- \+c class (n,i)
- \+ps #include <...> STL (n,i)
- \+pc #include <c..> C (n,i)
- \+cn class (using new) (n,i)
- \+ci class implementation (n,i)
- \+cni class (using new) implementation (n,i)
- \+mi method implementation (n,i)
- \+ai accessor implementation (n,i)
-
- \+tc template class (n,i)
- \+tcn template class (using new) (n,i)
- \+tci template class implementation (n,i)
- \+tcni template class (using new) impl. (n,i)
- \+tmi template method implementation (n,i)
- \+tai template accessor implementation (n,i)
-
- \+tf template function (n,i)
- \+ec error class (n,i)
- \+tr try ... catch (n,v,i)
- \+ca catch (n,v,i)
- \+c. catch(...) (n,v,i)
-
- -- Run ----------------------------------------------------------------
-
- \rc save and compile (n,i)
- \rl link (n,i)
- \rr run (n,i)
- \ra set comand line arguments (n,i)
- \rm run make (n,i)
- \rg cmd. line arg. for make (n,i)
- \rp run splint (n,i)
- \ri cmd. line arg. for splint (n,i)
- \rk run CodeCheck (TM) (n,i)
- \re cmd. line arg. for CodeCheck (TM) (n,i)
- \rd run indent (n,v,i)
- \rh hardcopy buffer (n,v,i)
- \rs show plugin settings (n,i)
- \rx set xterm size (n, only Linux/UNIX & GUI)
- \ro change output destination (n,i)
-
- -- Load / Unload C/C++ Support ----------------------------------------
-
- \lcs Load C/C++ Support Menus (n, GUI only)
- \ucs Unload C/C++ Support Menus (n, GUI only)
-
-The hotkeys are defined in the file type plugin c.vim (part of this csupport
-plugin package) and described in the document c-hot-keys.pdf
-
-Changing the default map leader '\'
------------------------------------
-The map leader can be changed by the user by setting a global variable in the
-file .vimrc
-
- let g:C_MapLeader = ','
-
-The map leader is now a comma. The 'line end comment' command is now defined
-as ',cl'. This setting will be used as a so called local leader and influences
-only files with filetype 'c' and 'cpp'.
-
-==============================================================================
-3. HOTKEYS *csupport-hotkeys*
-==============================================================================
-
-The following hotkeys are defined in normal, visual and insert mode:
-
- F9 compile and link
- Alt-F9 write buffer and compile
- Ctrl-F9 run executable
- Shift-F9 set command line arguments
-
- Shift-F2 switch between source files and header files
-
-The hotkeys are defined in the file type plugin c.vim. All hotkeys from the
-non-GUI mode also work for gVim (see |csupport-usage-vim|).
-
-Shift-F2 can be used to switch between source files and header files if the
-plugin a.vim (http://vim.sourceforge.net/scripts/script.php?script_id=31) is
-present. To suppress the creation of a new header file when switching from a
-source file the file ~/.vimrc should contain a line
-
- let g:alternateNoDefaultAlternate = 1
-
-A header file will only be opened if it already exists.
-
-The Shift-key is dead when you are working with Vim in a console terminal
-(non-Gui). You could add
-
- noremap \a :A<CR>
- inoremap \a <C-C>:A<CR>
-
-to get a hot key for this case.
-
-==============================================================================
-4. CUSTOMIZATION *csupport-custom*
-==============================================================================
-
-------------------------------------------------------------------------------
-4.1 GLOBAL VARIABLES *csupport-custom-glob-vars*
-------------------------------------------------------------------------------
-
-Several global variables are checked by the script to customize it:
-
- ----------------------------------------------------------------------------
- GLOBAL VARIABLE DEFAULT VALUE TAG (see below)
- ----------------------------------------------------------------------------
- g:C_GlobalTemplateFile plugin_dir.'c-support/templates/Templates'
- g:C_LocalTemplateFile $HOME.'/.vim/c-support/templates/Templates'
- g:C_TemplateOverwrittenMsg 'yes'
- g:C_Ctrl_j 'on'
-
- g:C_CodeSnippets plugin_dir."/c-support/codesnippets/"
- g:C_Dictionary_File ""
- g:C_LoadMenus "yes"
- g:C_MenuHeader "yes"
- g:C_OutputGvim "vim"
- g:C_XtermDefaults "-fa courier -fs 12 -geometry 80x24"
- g:C_Printheader "%<%f%h%m%< %=%{strftime('%x %X')} Page %N"
- g:C_MapLeader '\'
- g:C_GuiSnippetBrowser 'gui'
- g:C_GuiTemplateBrowser 'gui'
-
- Linux/UNIX:
- g:C_ObjExtension ".o"
- g:C_ExeExtension ""
- g:C_CCompiler "gcc"
- g:C_CplusCompiler "g++"
- g:C_Man "man"
- Windows:
- g:C_ObjExtension ".obj"
- g:C_ExeExtension ".exe"
- g:C_CCompiler "gcc.exe"
- g:C_CplusCompiler "g++.exe"
- g:C_Man "man.exe"
- g:C_CFlags "-Wall -g -O0 -c"
- g:C_LFlags "-Wall -g -O0"
- g:C_Libs "-lm"
- g:C_LineEndCommColDefault 49
- g:C_CExtension "c"
- g:C_TypeOfH "cpp"
- g:C_SourceCodeExtensions "c cc cp cxx cpp CPP c++ C i ii"
-
- g:C_CodeCheckExeName "check"
- g:C_CodeCheckOptions "-K13"
-
-The variable plugin_dir will automatically be set to one of the following values:
- $HOME.'/.vim/' for Linux/Unix
- $VIM.'/vimfiles/' for Windows
-
- ----------------------------------------------------------------------------
-
- 1. group: g:C_GlobalTemplateFile : Sets the master template file (see|csupport-templates|)
- g:C_LocalTemplateFile : Sets the local template file (see|csupport-templates|)
- g:C_TemplateOverwrittenMsg : message if template is overwritten
- g:C_Ctrl_j : hotkey Ctrl-j 'on'/'off' (see|csupport-Ctrl-j|)
-
- 2. group: g:C_CodeSnippets : The name of the code snippet directory
- (see |csupport-snippets|).
- g:C_Dictionary_File : The name(s) of the dictionary file(s) used for
- word completion (see also |csupport-dictionary|)
- g:C_Root : the name of the root menu of this plugin
- g:C_LoadMenus : Load menus and mappings ("yes", "no") at startup.
- g:C_MenuHeader : Switch the submenu header on/off.
- g:C_OutputGvim : when program is running output goes to the vim
- command line ("vim"), to a buffer ("buffer") or to
- an xterm ("xterm").
- g:C_XtermDefaults : the xterm defaults
- g:C_Printheader : hardcopy: definition of the page header
- g:C_MapLeader : the map leader for hotkeys (see|csupport-usage-vim|)
- g:C_GuiSnippetBrowser : code snippet browser: 'gui', 'commandline'
- g:C_GuiTemplateBrowser : code template browser: 'gui', 'explorer', 'commandline'
-
- 3. group: g:C_CExtension : Extension of C files. Everything else is C++.
- g:C_TypeOfH : filetype of header files with extension 'h' (c,cpp)
- g:C_SourceCodeExtensions : filename extensions for C/C++
- implementation files
- g:C_CCompiler : The name of the C compiler.
- g:C_CplusCompiler : The name of the C++ compiler.
- g:C_Man : The name of the man utility.
- g:C_CFlags : Compiler flags used for a compilation.
- g:C_LFlags : Compiler flags used for linkage.
- g:C_Libs : Libraries to link with.
- g:C_ObjExtension : C/C+ file extension for objects
- (leading point required if not empty)
- g:C_ExeExtension : C/C+ file extension for executables
- (leading point required if not empty)
- g:C_LineEndCommColDefault : Default starting column for end-of-line comments.
- g:C_CodeCheckExeName : The name of the CodeCheck (TM) executable
- (the default is 'check')
- g:C_CodeCheckOptions : Default options for CodeCheck (TM)
- (see |csupport-run-codecheck|).
-
-To override the default add appropriate assignments to ~/.vimrc .
-
-------------------------------------------------------------------------------
-4.2 THE ROOT MENU *csupport-custom-root-menu*
-------------------------------------------------------------------------------
-
-The variable g:C_Root, if set (in ~/.vimrc or in ~/.gvimrc), gives the name of
-the single Vim root menu item in which the C/C++ submenus will be put. The
-default is
- '&C\/C\+\+.'
-Note the terminating dot. A single root menu can be used if the screen is
-limited or several plugins are used in parallel.
-
-If set to "", this single root menu item will not appear. Now all submenus
-are put into the Vim root menu. This is nice for beginners in a lab
-installation or for C-only programmers.
-
-------------------------------------------------------------------------------
-4.3 SYSTEM-WIDE INSTALLATION *csupport-system-wide*
-------------------------------------------------------------------------------
-
-A system-wide installation (one installation for all users) is done as
-follows.
-
-As *** SUPERUSER *** :
-
-(1) Find the Vim installation directory.
-The Vim Ex command ':echo $VIM' gives '/usr/local/share/vim' or something like
-that. Beyond this directory you will find the Vim installation, e.g. in
-'/usr/local/share/vim/vim71' if Vim version 7.1 has been installed.
-
-(2) Create a new subdirectory 'vimfiles', e.g. '/usr/local/share/vim/vimfiles'.
-
-(3) Install C/C++ Support
-Copy the archive cvim.zip to this new directory and unpack it:
- unzip cvim.zip
-
-(4) Generate the help tags:
- :helptags $VIM/vimfiles/doc
-
-
-As *** USER *** :
-
-Create your private snippet directory:
-
- mkdir --parents ~/.vim/c-support/codesnippets
-
-You may want to copy the snippets coming with this plugin (in
-$VIM/vimfiles/c-support/codesnippets) into the new directory or to set a
-link to the global directory.
-
-Create your private template directory:
-
- mkdir --parents ~/.vim/c-support/template
-
-Create a private template file 'Templates' in this directory to overwrite some
-macros, e.g.
-
- *|AUTHOR|* = your name
- *|AUTHORREF|* = ...
- *|EMAIL|* = ...
- *|COMPANY|* = ...
- *|COPYRIGHT|* = ...
-
-You can also have local templates which overwrite the global ones. To suppress
-the messages in this case set a global variable in '~/.vimrc' :
-
- let g:C_TemplateOverwrittenMsg= 'no'
-
-The default is 'yes'.
-
-==============================================================================
-5. TEMPLATE FILES AND TAGS *csupport-templates*
-==============================================================================
-
-------------------------------------------------------------------------------
-5.1 TEMPLATE FILES *csupport-templates-files*
-------------------------------------------------------------------------------
-
-Nearly all menu entries insert code snippets or comments. All these stuff is
-taken from template files and can be changed by the user to meet his
-requirements.
-
-The master template file is '$HOME/.vim/c-support/templates/Templates' for a
-user installation and '$VIM/vimfiles/c-support/templates/Templates' for a
-system-wide installation (see|csupport-system-wide|).
-
-The master template file starts with a macro section followed by templates for
-single menu items or better by including other template files grouping the
-templates according to the menu structure of this plugin. The master file
-could look like this:
-
- $
- $ =============================================================
- $ ========== USER MACROS ======================================
- $ =============================================================
- $
- *|AUTHOR|* = Dr. Fritz Mehner
- *|AUTHORREF|* = mn
- *|EMAIL|* = mehner@fh-swf.de
- *|COMPANY|* = FH Südwestfalen, Iserlohn
- *|COPYRIGHT|* = Copyright (c)*|YEAR|,|AUTHOR|*
- $
- $ =============================================================
- $ ========== FILE INCLUDES ====================================
- $ =============================================================
- $
- *|includefile|* = c.comments.template
- *|includefile|* = c.cpp.template
- *|includefile|* = c.idioms.template
- *|includefile|* = c.preprocessor.template
- *|includefile|* = c.statements.template
-
-Lines starting with a dollar sign are comments. The section starting
-with *|AUTHOR|* assigns values to predefined tags
-(see|csupport-templates-macros|) to personalize some templates. Other
-predefined tags with given default values can be used (e.g. *|YEAR|* ).
-
-User defined tags are possible. They have the following syntax:
-
- *|macroname|* = replacement
-
-A macroname starts with a letter (uppercase or lowercase) followed by zero or
-more letters, digits or underscores.
-
-------------------------------------------------------------------------------
-5.2 MACROS *csupport-templates-macros*
-------------------------------------------------------------------------------
-
-The following macro names are predefined. The first group is used to
-personalize templates.
-
- ----------------------------------------------------------------------------
- PREDEFINED MACROS DEFAULT VALUE
- ----------------------------------------------------------------------------
-*|AUTHOR|* ""
-*|AUTHORREF|* ""
-*|EMAIL|* ""
-*|COMPANY|* ""
-*|PROJECT|* ""
-*|COPYRIGHTHOLDER|* ""
-*|STYLE|* ""
-*|includefile|* ""
-
-*|BASENAME|* filename without path and suffix
-*|DATE|* the preferred date representation for the current locale
- without the time
-*|FILENAME|* filename without path
-*|PATH|* path without filename
-*|SUFFIX|* filename suffix
-*|TIME|* the preferred time representation for the current locale
- without the date and the time zone or name or abbreviation
-*|YEAR|* the year as a decimal number including the century
-
-The macro *|includefile|* can be used to include an additional template file.
-A file will be included only once. Commenting and uncommenting include macros
-is a simple way to switch between several sets of templates (see also
-|csupport-run-templates|). Overwriting existing macros and templates is
-possible.
-
- ----------------------------------------------------------------------------
- PREDEFINED TAGS
- ----------------------------------------------------------------------------
- <CURSOR> The cursor position after insertion of a template
- <+text+>,<-text->, Jump targets in templates. Jump with Ctrl-j.
- {+text+},{-text-} See |csupport-templates-jump|.
-
- <SPLIT> The split point when inserting in visual mode
- (see|csupport-templates-definition|)
-
-A dependent template file can start with its own macro section. There is no
-need to have all user defined macros in the master file.
-When the first template definition is found (see below) macro definitions are
-no longer recognized.
-
-------------------------------------------------------------------------------
-5.2.1 USER DEFINED FORMATS FOR DATE AND TIME *csupport-templates-date*
-------------------------------------------------------------------------------
-The format for *|DATE|* ,*|TIME|* , and*|YEAR|* can be set by the user. The
-defaults are
- *|DATE|* '%x'
- *|TIME|* '%X'
- *|YEAR|* '%Y'
-See the manual page of the C function strftime() for the format. The accepted
-format depends on your system, thus this is not portable! The maximum length
-of the result is 80 characters.
-
-User defined formats can be set using the following global variables in
-~/.vimrc , e.g.
- let g:C_FormatDate = '%D'
- let g:C_FormatTime = '%H:%M'
- let g:C_FormatYear = 'year %Y'
-
-------------------------------------------------------------------------------
-5.3 TEMPLATES *csupport-templates-names*
-------------------------------------------------------------------------------
-
-5.3.1 Template names
-
-The template behind a menu entry is identified by a given name. The first part
-of the name identifies the menu, the second part identifies the item. The
-modes are also hard coded (see|csupport-templates-definition|for the use of
-<SPLIT>).
-
- TEMPLATE NAME MODES
- --------------------------------------------------------------------------
-
- comment.class normal
- comment.end-of-line-comment normal
- comment.file-description normal
- comment.file-description-header normal
- comment.file-section-cpp-class-defs normal
- comment.file-section-cpp-class-implementations-exported normal
- comment.file-section-cpp-class-implementations-local normal
- comment.file-section-cpp-data-types normal
- comment.file-section-cpp-function-defs-exported normal
- comment.file-section-cpp-function-defs-local normal
- comment.file-section-cpp-header-includes normal
- comment.file-section-cpp-local-variables normal
- comment.file-section-cpp-macros normal
- comment.file-section-cpp-prototypes normal
- comment.file-section-cpp-typedefs normal
- comment.file-section-hpp-exported-class-defs normal
- comment.file-section-hpp-exported-data-types normal
- comment.file-section-hpp-exported-function-declarations normal
- comment.file-section-hpp-exported-typedefs normal
- comment.file-section-hpp-exported-variables normal
- comment.file-section-hpp-header-includes normal
- comment.file-section-hpp-macros normal
- comment.frame normal
- comment.function normal
- comment.keyword-bug normal
- comment.keyword-compiler normal
- comment.keyword-keyword normal
- comment.keyword-todo normal
- comment.keyword-tricky normal
- comment.keyword-warning normal
- comment.keyword-workaround normal
- comment.method normal
- comment.special-constant-type-is-long normal
- comment.special-constant-type-is-unsigned-long normal
- comment.special-constant-type-is-unsigned normal
- comment.special-empty normal
- comment.special-fall-through normal
- comment.special-implicit-type-conversion normal
- comment.special-no-return normal
- comment.special-not-reached normal
- comment.special-remains-to-be-implemented normal
-
- cpp.accessor-implementation normal
- cpp.catch normal, visual
- cpp.catch-points normal, visual
- cpp.cin normal
- cpp.class-definition normal
- cpp.class-implementation normal
- cpp.class-using-new-definition normal
- cpp.class-using-new-implementation normal
- cpp.cout-operator normal
- cpp.cout normal
- cpp.error-class normal
- cpp.extern normal, visual
- cpp.method-implementation normal
- cpp.namespace-block normal, visual
- cpp.namespace normal
- cpp.namespace-std normal
- cpp.open-input-file normal
- cpp.open-output-file normal
- cpp.operator-in normal
- cpp.operator-out normal
- cpp.output-manipulator-boolalpha normal
- cpp.output-manipulator-dec normal
- cpp.output-manipulator-endl normal
- cpp.output-manipulator-fixed normal
- cpp.output-manipulator-flush normal
- cpp.output-manipulator-hex normal
- cpp.output-manipulator-internal normal
- cpp.output-manipulator-left normal
- cpp.output-manipulator-oct normal
- cpp.output-manipulator-right normal
- cpp.output-manipulator-scientific normal
- cpp.output-manipulator-setbase normal
- cpp.output-manipulator-setfill normal
- cpp.output-manipulator-setiosflag normal
- cpp.output-manipulator-setprecision normal
- cpp.output-manipulator-setw normal
- cpp.output-manipulator-showbase normal
- cpp.output-manipulator-showpoint normal
- cpp.output-manipulator-showpos normal
- cpp.output-manipulator-uppercase normal
- cpp.rtti-const-cast normal
- cpp.rtti-dynamic-cast normal
- cpp.rtti-reinterpret-cast normal
- cpp.rtti-static-cast normal
- cpp.rtti-typeid normal
- cpp.template-accessor-implementation normal
- cpp.template-class-definition normal
- cpp.template-class-implementation normal
- cpp.template-class-using-new-definition normal
- cpp.template-class-using-new-implementation normal
- cpp.template-function normal
- cpp.template-method-implementation normal
- cpp.try-catch normal, visual
-
- idioms.assert normal
- idioms.calloc normal
- idioms.enum normal, visual
- idioms.fprintf normal
- idioms.fscanf normal
- idioms.function normal, visual
- idioms.function-static normal, visual
- idioms.main normal, visual
- idioms.malloc normal
- idioms.open-input-file normal
- idioms.open-output-file normal
- idioms.printf normal
- idioms.scanf normal
- idioms.sizeof normal
- idioms.struct normal, visual
- idioms.union normal, visual
-
- preprocessor.define normal
- preprocessor.ifdef-else-endif normal, visual
- preprocessor.if-else-endif normal, visual
- preprocessor.ifndef-def-endif normal, visual
- preprocessor.ifndef-else-endif normal, visual
- preprocessor.include-global normal
- preprocessor.include-local normal
- preprocessor.undefine normal
-
- statements.block normal, visual
- statements.case normal
- statements.do-while normal, visual
- statements.for-block normal
- statements.for normal
- statements.if-block-else normal, visual
- statements.if-block normal, visual
- statements.if-else normal, visual
- statements.if normal
- statements.switch normal, visual
- statements.while-block normal, visual
- statements.while normal
-
-
-5.3.2 Template definition *csupport-templates-definition*
-
-A template definition starts with a template head line with the following
-syntax:
-
- == templatename == [ position == ]
-
-The templatename is one of the above template identifiers. The position
-attribute is optional. Possible attribute values are:
-
- above insert the template before the current line
- append append the template to the current line
- below insert the template below the current line
- insert insert the template at the cursor position
- start insert the template before the first line of the buffer
-
-An example:
-
- == comment.function ==
- /*
- * === FUNCTION =======================================================
- * Name: <CURSOR>
- * Description:
- * ======================================================================
- */
-
-The definition of a template ends at the next head line or at the end of the
-file.
-
-Templates for the visual mode can use <SPLIT>. The text before <SPLIT> will
-than be inserted above the marked area, the text after <SPLIT> will be
-inserted behind the marked area. An example:
-
- == statements.if-block-else ==
- if ( <CURSOR> ) {
- <SPLIT>} else {
- }
-
-If applied to the marked block
-
- xxxxxxxxxxx
- xxxxxxxxxxx
-
-this template yields
-
- if ( ) {
- xxxxxxxxxxx
- xxxxxxxxxxx
- } else {
- }
-
-The templates with a visual mode are shown in the table under
-|csupport-templates-names|.
-
-5.3.3 Template expansion *csupport-templates-expansion*
-
-There are additional ways to control the expansion of a template.
-
-USER INPUT
-----------
-If the usage of a yet undefined user macro starts with a question mark the
-user will be asked for the replacement first, e.g. with the following template
-
- == idioms.function ==
- void<CURSOR>
- *|?FUNCTION_NAME|* ( )
- {
- <SPLIT> return ;
- } /* ----- end of function*|FUNCTION_NAME|* ----- */
-
-The user can specify the function name which then will be applied twice. If
-the macro was already in use the old value will be suggested as default.
-
-MACRO MANIPULATION
-------------------
-
-A macro expansion can be controlled by the following attributes
-
- :l change macro text to lowercase
- :u change macro text to uppercase
- :c capitalize macro text
- :L legalize name
-
-The include guard template is an example for the use of ':L' :
-
- == preprocessor.ifndef-def-endif ==
- #ifndef *|?BASENAME:L|_INC*
- #define *|BASENAME|_INC*
- <CURSOR><SPLIT>
- #endif // ----- #ifndef*|BASENAME|_INC* -----
-
-The base name of the file shall be used as part of the include guard name.
-The predefined macro*|BASENAME|* is used to ask for this part because this
-macro has already a defined value. That value can accepted or replaced by the
-user. For the filename 'test test++test.h' the legalized base name
-'TEST_TEST_TEST' will be suggested.
-
-Legalization means:
- - replace all whitespaces by underscores
- - replace all non-word characters by underscores
- - replace '+' and '-' by underscore
-
-5.3.4 The macros <+text+> etc. *csupport-templates-jump*
-
-There are four macro types which can be used as jump targets in templates:
-
- <+text+> Can be jumped to by hitting Ctrl-j.
- {+text+} Same as <+text+>. Used in cases where indentation gives unwanted
- results with the first one.
-
- <-text-> Same as the two above. Will be removed if the template is used
- {-text-} in visual mode.
-
-The text inside the brackets is userdefined and can be empty. The text
-can be composed from letters (uppercase and lowercase), digits, underscores
-and blanks. After the insertion of an template these jump targets will be
-highlighted.
-
-5.3.5 Command Ctrl-j *csupport-Ctrl-j*
-
-Use the command Ctrl-j to jump to the next target. The target will be removed
-and the mode will switched to insertion. Ctrl-j works in normal and in insert
-mode.
-
-The template for a function can be written as follows:
-
- == idioms.function ==
- void<CURSOR>
- |?FUNCTION_NAME| ( <+argument list+> )
- {
- <SPLIT> return <+return value+>;
- } /* ----- end of function |FUNCTION_NAME| ----- */
-
-The cursor will be set behind 'void'. You can remove 'void' easily with
-Ctrl-w (delete word before cursor) and insert a new type. A Ctrl-j leads you
-to the argument list. The target disappears and you can type on. When the
-function body is written a final Ctrl-j brings you to the return statement.
-
-The following example shows the usage of the type {-text-}. The idiom for the
-opening of a file marks the line before the file is closed. This is also the
-line where the template will be split to surround a marked area. In this case
-(visual mode) the target is not needed and therefore removed (minus signs as
-mnemonic). In normal and insert mode the target is meaningful and will be
-therefore be present. The form <-...-> would result in a wrong indentation of
-the file close statement. The brace type will be handled as a block and the
-indentation will be correct.
-
- == cpp.open-input-file ==
- char *ifs_file_name = "<CURSOR>"; /* input file name */
- ifstream ifs; /* create ifstream object */
-
- ifs.open (ifs_file_name); /* open ifstream */
- if (!ifs) {
- cerr << "\nERROR : failed to open input file " << ifs_file_name << endl;
- exit (EXIT_FAILURE);
- }
- <SPLIT>{-continue here-}
- ifs.close (); /* close ifstream */
-
-Extra feature of Ctrl-j
------------------------
-If none of the above described targets is left Ctrl-j can be used to jump
-behind closing brackets, parenthesis, braces, or string terminators ('"`).
-This feature is limited to the current line. Ctrl-j does not jump behind the
-last character in a line.
-
-
-How to switch the mapping for Ctrl-j off
-----------------------------------------
-The original meaning of Ctrl-j is 'move [n] lines downward' (see |CTRL-j|).
-If you are accustomed to use the deafult and don't like these jump targets you
-can switch them off. Put the following line in the file .vimrc :
-
- let g:C_Ctrl_j = 'off'
-
-The default value of g:C_Ctrl_j is 'on'. You do not have to change the
-template files. All jump targets will be removed before a template will be
-inserted.
-
-==============================================================================
-5.4 SWITCHING BETWEEN TEMPLATE SETS *csupport-templates-sets*
-==============================================================================
-
-This plugin comes with two sets of templates. These are suggestions. You may
-want to have additional sets for different projects or occasionally want to
-use doxygen style comments. To facilitate switching use the macro*|STYLE|*
-(|csupport-templates-files|) to define a unique name and the
-IF-ENDIF-construct to choose a particular set of files for example:
-
- ...
-
- *|STYLE|* = C
- $
- $ =============================================================
- $ ========== FILE INCLUDES ====================================
- $ =============================================================
- $
- == IF *|STYLE|* IS C ==
- $
- |includefile| = c.comments.template
- |includefile| = c.cpp.template
- |includefile| = c.idioms.template
- |includefile| = c.preprocessor.template
- |includefile| = c.statements.template
- $
- == ENDIF ==
-
- ...
-
-The syntax is as follows:
-
- == IF macro_name IS macro_value ==
-
- == ENDIF ==
-
-Includes outside an IF-ENDIF construct are associated with the default style
-'default'. A style set does not have to a complete set of templates. For an
-incomplete set the other templates are taken from the default style.
-
-IF, IS, and ENDIF are keywords.
-
-HINT. Use these constructs to avoid overwriting your templates when updating
-csupport. Copy and rename the set of files you want to change and surround the
-includes with an appropriate IF-construct:
-
- *|STYLE|* = MY_C
- $
- ...
- $
- == IF *|STYLE|* IS MY_C ==
- |includefile| = my_c.comments.template
- |includefile| = my_c.cpp.template
- |includefile| = my_c.idioms.template
- |includefile| = my_c.preprocessor.template
- |includefile| = my_c.statements.template
- == ENDIF ==
-
-Keep a copy of the main template file 'Templates' because this file will be
-overwritten if you do not update manually.
-
-==============================================================================
-5.5 BINDING A STYLE TO A FILE EXTENSION *csupport-templates-bind*
-==============================================================================
-
-You can bind the existing styles to one or more filename extensions. To do so
-assign a Dictionary to the global variable g:C_Styles in '~/.vimrc' :
-
-let g:C_Styles = { '*.c,*.h' : 'default', '*.cc,*.cpp,*.hh' : 'CPP' }
-
-A Dictionary is created with a comma separated list of entries in curly
-braces. Each entry has a key and a value, separated by a colon. Each key can
-only appear once. The keys are themselves a comma separated list of filename
-pattern. The values are existing styles defined in the template files.
-The given style will be set automatically when switching to a buffer or
-opening a new buffer with the associated filename pattern and supersedes the
-macro *|STYLE|* .
-
-==============================================================================
-6. C/C++ DICTIONARY *csupport-dictionary*
-==============================================================================
-
-The files
-
- c-c++-keywords.list
- k+r.list
- stl_index.list
-
-are a part of this plugin and can be used (together with your own lists) as
-dictionaries for automatic word completion. This feature is enabled by
-default. The default word lists are
-
- plugin_dir/c-support/wordlists/c-c++-keywords.list
- plugin_dir/c-support/wordlists/k+r.list
- plugin_dir/c-support/wordlists/stl_index.list
-
-The variable plugin_dir will automatically be set by the plugin to one of the
-following values:
- $HOME.'/.vim/' for Linux/Unix
- $VIM.'/vimfiles/' for Windows
-If you want to use an additional list MyC.list put the following lines into
- ~/.vimrc :
-
- let g:C_Dictionary_File = PLUGIN_DIR.'/c-support/wordlists/c-c++-keywords.list,'.
- \ PLUGIN_DIR.'/c-support/wordlists/k+r.list,'.
- \ PLUGIN_DIR.'/c-support/wordlists/stl_index.list,'.
- \ PLUGIN_DIR.'/c-support/wordlists/MyC.list'
-
-When in file ~/.vimrc the name PLUGIN_DIR has to be replaced by $HOME or
-$VIM (see above). Whitespaces in the pathnames have to be escaped with a
-backslash.
-The right side is a comma separated list of files. Note the point at the end
-of the first line (string concatenation) and the backslash in front of the
-second line (continuation line).
-You can use Vim's dictionary feature CTRL-X, CTRL-K (and CTRL-P, CTRL-N).
-
-==============================================================================
-7. EXTENDING ctags *csupport-ctags*
-==============================================================================
-
-------------------------------------------------------------------------------
-7.1 make AND qmake *csupport-ctags-make*
-------------------------------------------------------------------------------
-
-The use of the Vim plugin taglist.vim (Author: Yegappan Lakshmanan) is highly
-recommended. It uses the program ctags which generates tag files for 3 dozen
-languages (Exuberant Ctags, Darren Hiebert, http://ctags.sourceforge.net).
-With the following extensions the list of targets in a makefile can be shown
-in the taglist window.
-
- 1) Append the file customization.ctags to the file $HOME/.ctags .
-
- 2) Add the following lines (from customization.vimrc) to $HOME/.vimrc :
-
- "
- "-------------------------------------------------------------------
- " taglist.vim : toggle the taglist window
- " taglist.vim : define the title texts for make
- " taglist.vim : define the title texts for qmake
- "-------------------------------------------------------------------
- noremap <silent> <F11> <Esc><Esc>:Tlist<CR>
- inoremap <silent> <F11> <Esc><Esc>:Tlist<CR>
-
- let tlist_make_settings = 'make;m:makros;t:targets;i:includes'
- let tlist_qmake_settings = 'qmake;t:SystemVariables'
-
- if has("autocmd")
- " ---------- qmake : set file type for *.pro ----------
- autocmd BufNewFile,BufRead *.pro set filetype=qmake
- endif " has("autocmd")
-
- 3) restart vim/gvim
-
-The two maps will toggle the taglist window (hotkey F11) in all editing modes.
-The two assignments define the headings for the (q)make sections in the
-taglist window. The autocmd set the file type 'qmake' for the filename
-extension 'pro' (ctags needs this).
-
-------------------------------------------------------------------------------
-7.2 TEMPLATES *csupport-ctags-templates*
-------------------------------------------------------------------------------
-
-If you frequently change the plugin templates and you are using the taglist
-plugin (section above) you may want to use this plugin for navigation. This is
-achieved in two steps. First add a new language definition to the file
-$HOME/.ctags :
-
- --langdef=template
- --langmap=template:.template,TEMPLATE
- --regex-template=/^==\s+([^=]+)\s+==\s*(\s+==\s+([^=]+)\s+==)?/\1/t,template/
-
-Now add the following lines to the file $HOME/.vimrc :
-
- let tlist_template_settings = 'template;t:template'
- "---------------------------------------------------------------
- " plugin templates : set filetype for *.template
- "---------------------------------------------------------------
- if has("autocmd")
- autocmd BufNewFile,BufRead Templates set filetype=template
- autocmd BufNewFile,BufRead *.template set filetype=template
- endif " has("autocmd")
-
-The assignment defines the heading for the template section in the taglist
-window. The autocmds set the file type 'template' for the main template file
-'Templates' and the includefiles '*.template' (if any).
-
-==============================================================================
-8. FOLDING *csupport-folding*
-==============================================================================
-
-This plugin can be used together with folding.
-
-There are a few peculiarities when the cursor is on a closed fold before
-inserting a template:
-
-Normal mode
------------
-Inserting blocks of complete lines below and above a fold (e.g. frame
-comments) and inserting at the top of a buffer (e.g. file description) works
-as usual.
-Insertions which go to the end of a line (e.g. end-of-line comments) and
-insertions which go to the cursor position (e.g. 'sizeof()') will be suppressed
-and a warning will be shown.
-
-Visual mode
------------
-A range of lines containing closed folds can be surrounded by constructs which
-have a visual mode, e.g. a for-loop:
-
- for ( ; ; ) {
- +--- 4 lines: {------------------------------------------------------------
- }
-
-See |folding| for more information on folding.
-
-==============================================================================
-9. Additional Mappings *csupport-ad-mappings*
-==============================================================================
-
-There are a few additional filetype specific key mappings defined in
-'~/.vim/ftplugin/c.vim'.
-
-Complete a classical C comment: '/*' => '/* | */' (modes: i,v).
-
-Complete a classical C multi-line comment (mode: i):
- '/*<CR>' => /*
- * |
- */
-
-Open a block (modes: i,v):
- '{<CR>' => {
- |
- }
-In visual mode the content of the new block will be indented.
-
-==============================================================================
-10. WINDOWS PARTICULARITIES *csupport-windows*
-==============================================================================
-
-The plugin should go into the directory structure below the local
-installation directory $HOME/.vim/ for LINUX/UNIX and $VIM/vimfiles/ for
-Windows.
-The values of the two variables can be found from inside Vim:
- :echo $VIM
-or
- :echo $HOME
-
-Configuration files:
-
- LINUX/UNIX : $HOME/.vimrc and $HOME/.gvimrc
- Windows : $VIM/_vimrc and $VIM/_gvimrc
-
-Compiler settings:
-
-It could be necessary to add further settings for your compiler. To compile
-C++-programs using a Dev-C++ installation (http://www.bloodshed.net) the
-following item in $VIM/_vimrc is needed (depends on the Dev-C++ install
-directory):
-
- let g:C_CFlags = '-Wall -g -o0 -c -I c:\programs\dev-c++\include\g++'
-
-==============================================================================
-11. ADDITIONAL TIPS *csupport-tips*
-==============================================================================
-
-(1) gVim. Toggle 'insert mode' <--> 'normal mode' with the right mouse button
- (see mapping in file costumization.gvimrc).
-
-(2) gVim. Use tear off menus.
-
-(3) Try 'Focus under mouse' as window behavior (No mouse click when the mouse
- pointer is back from the menu item).
-
-(4) Use Emulate3Buttons "on" (X11) even for a 3-button mouse. Pressing left
- and right button at the same time without moving your fingers is faster
- then moving a finger to the middle button (often a wheel).
-
-==============================================================================
-12. TROUBLESHOOTING *csupport-troubleshooting*
-==============================================================================
-
-* I do not see any new main menu item.
- - Was the archive extracted into the right directory?
-
-* How can I see what was loaded?
- - Use ':scriptnames' from the Vim command line.
-
-* No main menu item.
- - Loading of plugin files must be enabled. If not use
- :filetype plugin on
- This is the minimal content of the file '$HOME/.vimrc'. Create one if there
- is none, or better use customization.vimrc.
-
-* Most key mappings do not work.
- - They are defined in a filetype plugin in '$HOME/.vim/ftplugin/'. Use
- ':filetype' to check if filetype plugins are enabled. If not, add the line
- filetype plugin on
- to the file '~/.vimrc'.
-
-* Some hotkeys do not work.
- - The hotkeys might be in use by your graphical desktop environment. Under
- KDE Ctrl-F9 is the hotkey which let you switch to the 9. desktop. The key
- settings can usually be redefined.
-
-* Splint and/or CodeCheck menu item not visible.
- - The program is not installed or not found (path not set) or not executable.
-
-==============================================================================
-13. RELEASE NOTES *csupport-release-notes*
-==============================================================================
-See file c-support/doc/ChangeLog .
-
-==============================================================================
-vim:tw=78:noet:ts=2:ft=help:norl:
diff --git a/.vim/ftplugin/c.vim b/.vim/ftplugin/c.vim
deleted file mode 100644
index 1a4b473..0000000
--- a/.vim/ftplugin/c.vim
+++ /dev/null
@@ -1,436 +0,0 @@
-" ------------------------------------------------------------------------------
-"
-" Vim filetype plugin file
-"
-" Language : C / C++
-" Plugin : c.vim
-" Maintainer : Fritz Mehner <mehner@fh-swf.de>
-" Revision : $Id: c.vim,v 1.57 2010/02/05 13:21:11 mehner Exp $
-"
-" ------------------------------------------------------------------------------
-"
-" Only do this when not done yet for this buffer
-"
-if exists("b:did_C_ftplugin")
- finish
-endif
-let b:did_C_ftplugin = 1
-"
-" ---------- Do we have a mapleader other than '\' ? ------------
-"
-if exists("g:C_MapLeader")
- let maplocalleader = g:C_MapLeader
-endif
-"
-" ---------- C/C++ dictionary -----------------------------------
-" This will enable keyword completion for C and C++
-" using Vim's dictionary feature |i_CTRL-X_CTRL-K|.
-" Set the new dictionaries in front of the existing ones
-"
-if exists("g:C_Dictionary_File")
- let save=&dictionary
- silent! exe 'setlocal dictionary='.g:C_Dictionary_File
- silent! exe 'setlocal dictionary+='.save
-endif
-"
-" ---------- F-key mappings ------------------------------------
-"
-" Alt-F9 write buffer and compile
-" F9 compile and link
-" Ctrl-F9 run executable
-" Shift-F9 command line arguments
-"
- map <buffer> <silent> <A-F9> :call C_Compile()<CR>:call C_HlMessage()<CR>
-imap <buffer> <silent> <A-F9> <C-C>:call C_Compile()<CR>:call C_HlMessage()<CR>
-"
- map <buffer> <silent> <F9> :call C_Link()<CR>:call C_HlMessage()<CR>
-imap <buffer> <silent> <F9> <C-C>:call C_Link()<CR>:call C_HlMessage()<CR>
-"
- map <buffer> <silent> <C-F9> :call C_Run()<CR>
-imap <buffer> <silent> <C-F9> <C-C>:call C_Run()<CR>
-"
- map <buffer> <silent> <S-F9> :call C_Arguments()<CR>
-imap <buffer> <silent> <S-F9> <C-C>:call C_Arguments()<CR>
-"
-" ---------- alternate file plugin (a.vim) ----------------------
-"
-if exists("loaded_alternateFile")
- map <buffer> <silent> <S-F2> :A<CR>
-imap <buffer> <silent> <S-F2> <C-C>:A<CR>
-endif
-"
-command! -nargs=1 -complete=customlist,C_CFileSectionList CFileSection call C_CFileSectionListInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_HFileSectionList HFileSection call C_HFileSectionListInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_KeywordCommentList KeywordComment call C_KeywordCommentListInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_SpecialCommentList SpecialComment call C_SpecialCommentListInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_StdLibraryIncludesList IncludeStdLibrary call C_StdLibraryIncludesInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_C99LibraryIncludesList IncludeC99Library call C_C99LibraryIncludesInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_CppLibraryIncludesList IncludeCppLibrary call C_CppLibraryIncludesInsert (<f-args>)
-command! -nargs=1 -complete=customlist,C_CppCLibraryIncludesList IncludeCppCLibrary call C_CppCLibraryIncludesInsert(<f-args>)
-command! -nargs=1 -complete=customlist,C_StyleList CStyle call C_Style (<f-args>)
-
-" ---------- KEY MAPPINGS : MENU ENTRIES -------------------------------------
-" ---------- comments menu ------------------------------------------------
-"
- noremap <buffer> <silent> <LocalLeader>cl :call C_LineEndComment()<CR>
-inoremap <buffer> <silent> <LocalLeader>cl <Esc>:call C_LineEndComment()<CR>
-vnoremap <buffer> <silent> <LocalLeader>cl <Esc>:call C_MultiLineEndComments()<CR>a
- noremap <buffer> <silent> <LocalLeader>cj :call C_AdjustLineEndComm("a")<CR>
-vnoremap <buffer> <silent> <LocalLeader>cj <Esc>:call C_AdjustLineEndComm("v")<CR>
-inoremap <buffer> <silent> <LocalLeader>cj <Esc>:call C_AdjustLineEndComm("a")<CR>a
- noremap <buffer> <silent> <LocalLeader>cs :call C_GetLineEndCommCol()<CR>
-
- noremap <buffer> <silent> <LocalLeader>c* :call C_CodeComment("a","yes")<CR>:nohlsearch<CR>j
-vnoremap <buffer> <silent> <LocalLeader>c* <Esc>:call C_CodeComment("v","yes")<CR>:nohlsearch<CR>j
-
- noremap <buffer> <silent> <LocalLeader>cc :call C_CodeComment("a","no")<CR>:nohlsearch<CR>j
-vnoremap <buffer> <silent> <LocalLeader>cc <Esc>:call C_CodeComment("v","no")<CR>:nohlsearch<CR>j
- noremap <buffer> <silent> <LocalLeader>co :call C_CommentCode("a")<CR>:nohlsearch<CR>
-vnoremap <buffer> <silent> <LocalLeader>co <Esc>:call C_CommentCode("v")<CR>:nohlsearch<CR>
-
- noremap <buffer> <silent> <LocalLeader>cfr :call C_InsertTemplate("comment.frame")<CR>
- noremap <buffer> <silent> <LocalLeader>cfu :call C_InsertTemplate("comment.function")<CR>
- noremap <buffer> <silent> <LocalLeader>cme :call C_InsertTemplate("comment.method")<CR>
- noremap <buffer> <silent> <LocalLeader>ccl :call C_InsertTemplate("comment.class")<CR>
- noremap <buffer> <silent> <LocalLeader>cfdi :call C_InsertTemplate("comment.file-description")<CR>
- noremap <buffer> <silent> <LocalLeader>cfdh :call C_InsertTemplate("comment.file-description-header")<CR>
-
-inoremap <buffer> <silent> <LocalLeader>cfr <Esc>:call C_InsertTemplate("comment.frame")<CR>
-inoremap <buffer> <silent> <LocalLeader>cfu <Esc>:call C_InsertTemplate("comment.function")<CR>
-inoremap <buffer> <silent> <LocalLeader>cme <Esc>:call C_InsertTemplate("comment.method")<CR>
-inoremap <buffer> <silent> <LocalLeader>ccl <Esc>:call C_InsertTemplate("comment.class")<CR>
-inoremap <buffer> <silent> <LocalLeader>cfdi <Esc>:call C_InsertTemplate("comment.file-description")<CR>
-inoremap <buffer> <silent> <LocalLeader>cfdh <Esc>:call C_InsertTemplate("comment.file-description-header")<CR>
-
- noremap <buffer> <silent> <LocalLeader>cd <Esc>:call C_InsertDateAndTime('d')<CR>
-inoremap <buffer> <silent> <LocalLeader>cd <Esc>:call C_InsertDateAndTime('d')<CR>a
-vnoremap <buffer> <silent> <LocalLeader>cd s<Esc>:call C_InsertDateAndTime('d')<CR>a
- noremap <buffer> <silent> <LocalLeader>ct <Esc>:call C_InsertDateAndTime('dt')<CR>
-inoremap <buffer> <silent> <LocalLeader>ct <Esc>:call C_InsertDateAndTime('dt')<CR>a
-vnoremap <buffer> <silent> <LocalLeader>ct s<Esc>:call C_InsertDateAndTime('dt')<CR>a
-"
-" call the above defined commands:
-"
- noremap <buffer> <LocalLeader>ccs <Esc>:CFileSection<Space>
- noremap <buffer> <LocalLeader>chs <Esc>:HFileSection<Space>
- noremap <buffer> <LocalLeader>ckc <Esc>:KeywordComment<Space>
- noremap <buffer> <LocalLeader>csc <Esc>:SpecialComment<Space>
-"
-inoremap <buffer> <LocalLeader>ccs <Esc>:CFileSection<Space>
-inoremap <buffer> <LocalLeader>chs <Esc>:HFileSection<Space>
-inoremap <buffer> <LocalLeader>ckc <Esc>:KeywordComment<Space>
-inoremap <buffer> <LocalLeader>csc <Esc>:SpecialComment<Space>
-"
-" ---------- statements menu ------------------------------------------------
-"
- noremap <buffer> <silent> <LocalLeader>sd :call C_InsertTemplate("statements.do-while")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sd <Esc>:call C_InsertTemplate("statements.do-while", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sd <Esc>:call C_InsertTemplate("statements.do-while")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sf :call C_InsertTemplate("statements.for")<CR>
-inoremap <buffer> <silent> <LocalLeader>sf <Esc>:call C_InsertTemplate("statements.for")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sfo :call C_InsertTemplate("statements.for-block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sfo <Esc>:call C_InsertTemplate("statements.for-block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sfo <Esc>:call C_InsertTemplate("statements.for-block")<CR>
-
- noremap <buffer> <silent> <LocalLeader>si :call C_InsertTemplate("statements.if")<CR>
-inoremap <buffer> <silent> <LocalLeader>si <Esc>:call C_InsertTemplate("statements.if")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sif :call C_InsertTemplate("statements.if-block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sif <Esc>:call C_InsertTemplate("statements.if-block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sif <Esc>:call C_InsertTemplate("statements.if-block")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sie :call C_InsertTemplate("statements.if-else")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sie <Esc>:call C_InsertTemplate("statements.if-else", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sie <Esc>:call C_InsertTemplate("statements.if-else")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sife :call C_InsertTemplate("statements.if-block-else")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sife <Esc>:call C_InsertTemplate("statements.if-block-else", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sife <Esc>:call C_InsertTemplate("statements.if-block-else")<CR>
-
- noremap <buffer> <silent> <LocalLeader>se :call C_InsertTemplate("statements.else-block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>se <Esc>:call C_InsertTemplate("statements.else-block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>se <Esc>:call C_InsertTemplate("statements.else-block")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sw :call C_InsertTemplate("statements.while")<CR>
-inoremap <buffer> <silent> <LocalLeader>sw <Esc>:call C_InsertTemplate("statements.while")<CR>
-
- noremap <buffer> <silent> <LocalLeader>swh :call C_InsertTemplate("statements.while-block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>swh <Esc>:call C_InsertTemplate("statements.while-block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>swh <Esc>:call C_InsertTemplate("statements.while-block")<CR>
-
- noremap <buffer> <silent> <LocalLeader>ss :call C_InsertTemplate("statements.switch")<CR>
-vnoremap <buffer> <silent> <LocalLeader>ss <Esc>:call C_InsertTemplate("statements.switch", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>ss <Esc>:call C_InsertTemplate("statements.switch")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sc :call C_InsertTemplate("statements.case")<CR>
-inoremap <buffer> <silent> <LocalLeader>sc <Esc>:call C_InsertTemplate("statements.case")<CR>
-
- noremap <buffer> <silent> <LocalLeader>s{ :call C_InsertTemplate("statements.block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>s{ <Esc>:call C_InsertTemplate("statements.block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>s{ <Esc>:call C_InsertTemplate("statements.block")<CR>
-
- noremap <buffer> <silent> <LocalLeader>sb :call C_InsertTemplate("statements.block")<CR>
-vnoremap <buffer> <silent> <LocalLeader>sb <Esc>:call C_InsertTemplate("statements.block", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>sb <Esc>:call C_InsertTemplate("statements.block")<CR>
-"
-" ---------- preprocessor menu ----------------------------------------------
-""
- noremap <buffer> <LocalLeader>ps :IncludeStdLibrary<Space>
-inoremap <buffer> <LocalLeader>ps <Esc>:IncludeStdLibrary<Space>
- noremap <buffer> <LocalLeader>pc :IncludeC99Library<Space>
-inoremap <buffer> <LocalLeader>pc <Esc>:IncludeC99Library<Space>
- noremap <buffer> <LocalLeader>+ps :IncludeCppLibrary<Space>
-inoremap <buffer> <LocalLeader>+ps <Esc>:IncludeCppLibrary<Space>
- noremap <buffer> <LocalLeader>+pc :IncludeCppCLibrary<Space>
-inoremap <buffer> <LocalLeader>+pc <Esc>:IncludeCppC9Library<Space>
-"
- noremap <buffer> <silent> <LocalLeader>p< :call C_InsertTemplate("preprocessor.include-global")<CR>
- noremap <buffer> <silent> <LocalLeader>p" :call C_InsertTemplate("preprocessor.include-local")<CR>
- noremap <buffer> <silent> <LocalLeader>pd :call C_InsertTemplate("preprocessor.define")<CR>
- noremap <buffer> <silent> <LocalLeader>pu :call C_InsertTemplate("preprocessor.undefine")<CR>
-"
-inoremap <buffer> <silent> <LocalLeader>p< <Esc>:call C_InsertTemplate("preprocessor.include-global")<CR>
-inoremap <buffer> <silent> <LocalLeader>p" <Esc>:call C_InsertTemplate("preprocessor.include-local")<CR>
-inoremap <buffer> <silent> <LocalLeader>pd <Esc>:call C_InsertTemplate("preprocessor.define")<CR>
-inoremap <buffer> <silent> <LocalLeader>pu <Esc>:call C_InsertTemplate("preprocessor.undefine")<CR>
-
- noremap <buffer> <silent> <LocalLeader>pie :call C_InsertTemplate("preprocessor.if-else-endif")<CR>
- noremap <buffer> <silent> <LocalLeader>pid :call C_InsertTemplate("preprocessor.ifdef-else-endif")<CR>
- noremap <buffer> <silent> <LocalLeader>pin :call C_InsertTemplate("preprocessor.ifndef-else-endif")<CR>
- noremap <buffer> <silent> <LocalLeader>pind :call C_InsertTemplate("preprocessor.ifndef-def-endif")<CR>
-
-vnoremap <buffer> <silent> <LocalLeader>pie <Esc>:call C_InsertTemplate("preprocessor.if-else-endif", "v")<CR>
-vnoremap <buffer> <silent> <LocalLeader>pid <Esc>:call C_InsertTemplate("preprocessor.ifdef-else-endif", "v")<CR>
-vnoremap <buffer> <silent> <LocalLeader>pin <Esc>:call C_InsertTemplate("preprocessor.ifndef-else-endif", "v")<CR>
-vnoremap <buffer> <silent> <LocalLeader>pind <Esc>:call C_InsertTemplate("preprocessor.ifndef-def-endif", "v")<CR>
-
-inoremap <buffer> <silent> <LocalLeader>pie <Esc>:call C_InsertTemplate("preprocessor.if-else-endif")<CR>
-inoremap <buffer> <silent> <LocalLeader>pid <Esc>:call C_InsertTemplate("preprocessor.ifdef-else-endif")<CR>
-inoremap <buffer> <silent> <LocalLeader>pin <Esc>:call C_InsertTemplate("preprocessor.ifndef-else-endif")<CR>
-inoremap <buffer> <silent> <LocalLeader>pind <Esc>:call C_InsertTemplate("preprocessor.ifndef-def-endif")<CR>
-
- noremap <buffer> <silent> <LocalLeader>pi0 :call C_PPIf0("a")<CR>2ji
-inoremap <buffer> <silent> <LocalLeader>pi0 <Esc>:call C_PPIf0("a")<CR>2ji
-vnoremap <buffer> <silent> <LocalLeader>pi0 <Esc>:call C_PPIf0("v")<CR>
-
- noremap <buffer> <silent> <LocalLeader>pr0 :call C_PPIf0Remove()<CR>
-inoremap <buffer> <silent> <LocalLeader>pr0 <Esc>:call C_PPIf0Remove()<CR>
-"
- noremap <buffer> <silent> <LocalLeader>pe :call C_InsertTemplate("preprocessor.error")<CR>
- noremap <buffer> <silent> <LocalLeader>pl :call C_InsertTemplate("preprocessor.line")<CR>
- noremap <buffer> <silent> <LocalLeader>pp :call C_InsertTemplate("preprocessor.pragma")<CR>
-"
-inoremap <buffer> <silent> <LocalLeader>pe <Esc>:call C_InsertTemplate("preprocessor.error")<CR>
-inoremap <buffer> <silent> <LocalLeader>pl <Esc>:call C_InsertTemplate("preprocessor.line")<CR>
-inoremap <buffer> <silent> <LocalLeader>pp <Esc>:call C_InsertTemplate("preprocessor.pragma")<CR>
-"
-" ---------- idioms menu ----------------------------------------------------
-"
- noremap <buffer> <silent> <LocalLeader>if :call C_InsertTemplate("idioms.function")<CR>
-vnoremap <buffer> <silent> <LocalLeader>if <Esc>:call C_InsertTemplate("idioms.function", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>if <Esc>:call C_InsertTemplate("idioms.function")<CR>
- noremap <buffer> <silent> <LocalLeader>isf :call C_InsertTemplate("idioms.function-static")<CR>
-vnoremap <buffer> <silent> <LocalLeader>isf <Esc>:call C_InsertTemplate("idioms.function-static", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>isf <Esc>:call C_InsertTemplate("idioms.function-static")<CR>
- noremap <buffer> <silent> <LocalLeader>im :call C_InsertTemplate("idioms.main")<CR>
-vnoremap <buffer> <silent> <LocalLeader>im <Esc>:call C_InsertTemplate("idioms.main", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>im <Esc>:call C_InsertTemplate("idioms.main")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>i0 :call C_CodeFor("up" , "a")<CR>
-vnoremap <buffer> <silent> <LocalLeader>i0 <Esc>:call C_CodeFor("up" , "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>i0 <Esc>:call C_CodeFor("up" , "a")<CR>i
- noremap <buffer> <silent> <LocalLeader>in :call C_CodeFor("down", "a")<CR>
-vnoremap <buffer> <silent> <LocalLeader>in <Esc>:call C_CodeFor("down", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>in <Esc>:call C_CodeFor("down", "a")<CR>i
-"
- noremap <buffer> <silent> <LocalLeader>ie :call C_InsertTemplate("idioms.enum")<CR>
-vnoremap <buffer> <silent> <LocalLeader>ie <Esc>:call C_InsertTemplate("idioms.enum" , "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>ie <Esc>:call C_InsertTemplate("idioms.enum")<CR>
- noremap <buffer> <silent> <LocalLeader>is :call C_InsertTemplate("idioms.struct")<CR>
-vnoremap <buffer> <silent> <LocalLeader>is <Esc>:call C_InsertTemplate("idioms.struct", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>is <Esc>:call C_InsertTemplate("idioms.struct")<CR>
- noremap <buffer> <silent> <LocalLeader>iu :call C_InsertTemplate("idioms.union")<CR>
-vnoremap <buffer> <silent> <LocalLeader>iu <Esc>:call C_InsertTemplate("idioms.union" , "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>iu <Esc>:call C_InsertTemplate("idioms.union")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>ip :call C_InsertTemplate("idioms.printf")<CR>
-inoremap <buffer> <silent> <LocalLeader>ip <Esc>:call C_InsertTemplate("idioms.printf")<CR>
- noremap <buffer> <silent> <LocalLeader>isc :call C_InsertTemplate("idioms.scanf")<CR>
-inoremap <buffer> <silent> <LocalLeader>isc <Esc>:call C_InsertTemplate("idioms.scanf")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>ica :call C_InsertTemplate("idioms.calloc")<CR>
-inoremap <buffer> <silent> <LocalLeader>ica <Esc>:call C_InsertTemplate("idioms.calloc")<CR>
- noremap <buffer> <silent> <LocalLeader>ima :call C_InsertTemplate("idioms.malloc")<CR>
-inoremap <buffer> <silent> <LocalLeader>ima <Esc>:call C_InsertTemplate("idioms.malloc")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>isi :call C_InsertTemplate("idioms.sizeof")<CR>
-inoremap <buffer> <silent> <LocalLeader>isi <Esc>:call C_InsertTemplate("idioms.sizeof")<CR>
-vnoremap <buffer> <silent> <LocalLeader>isi <Esc>:call C_InsertTemplate("idioms.sizeof", "v")<CR>
-
- noremap <buffer> <silent> <LocalLeader>ias :call C_InsertTemplate("idioms.assert")<CR>
-vnoremap <buffer> <silent> <LocalLeader>ias <Esc>:call C_InsertTemplate("idioms.assert", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>ias <Esc>:call C_InsertTemplate("idioms.assert")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>ii :call C_InsertTemplate("idioms.open-input-file")<CR>
-inoremap <buffer> <silent> <LocalLeader>ii <Esc>:call C_InsertTemplate("idioms.open-input-file")<CR>
-vnoremap <buffer> <silent> <LocalLeader>ii <Esc>:call C_InsertTemplate("idioms.open-input-file", "v")<CR>
- noremap <buffer> <silent> <LocalLeader>io :call C_InsertTemplate("idioms.open-output-file")<CR>
-inoremap <buffer> <silent> <LocalLeader>io <Esc>:call C_InsertTemplate("idioms.open-output-file")<CR>
-vnoremap <buffer> <silent> <LocalLeader>io <Esc>:call C_InsertTemplate("idioms.open-output-file", "v")<CR>
-"
-" ---------- snippet menu ----------------------------------------------------
-"
- noremap <buffer> <silent> <LocalLeader>nr :call C_CodeSnippet("r")<CR>
- noremap <buffer> <silent> <LocalLeader>nw :call C_CodeSnippet("w")<CR>
-vnoremap <buffer> <silent> <LocalLeader>nw <Esc>:call C_CodeSnippet("wv")<CR>
- noremap <buffer> <silent> <LocalLeader>ne :call C_CodeSnippet("e")<CR>
-"
-inoremap <buffer> <silent> <LocalLeader>nr <Esc>:call C_CodeSnippet("r")<CR>
-inoremap <buffer> <silent> <LocalLeader>nw <Esc>:call C_CodeSnippet("w")<CR>
-inoremap <buffer> <silent> <LocalLeader>ne <Esc>:call C_CodeSnippet("e")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>np :call C_ProtoPick("n")<CR>
-vnoremap <buffer> <silent> <LocalLeader>np <Esc>:call C_ProtoPick("v")<CR>
- noremap <buffer> <silent> <LocalLeader>ni :call C_ProtoInsert()<CR>
- noremap <buffer> <silent> <LocalLeader>nc :call C_ProtoClear()<CR>
- noremap <buffer> <silent> <LocalLeader>ns :call C_ProtoShow()<CR>
-"
-inoremap <buffer> <silent> <LocalLeader>np <Esc>:call C_ProtoPick("n")<CR>
-inoremap <buffer> <silent> <LocalLeader>ni <Esc>:call C_ProtoInsert()<CR>
-inoremap <buffer> <silent> <LocalLeader>nc <Esc>:call C_ProtoClear()<CR>
-inoremap <buffer> <silent> <LocalLeader>ns <Esc>:call C_ProtoShow()<CR>
-"
- noremap <buffer> <silent> <LocalLeader>ntl :call C_EditTemplates("local")<CR>
- noremap <buffer> <silent> <LocalLeader>ntg :call C_EditTemplates("global")<CR>
- noremap <buffer> <silent> <LocalLeader>ntr :call C_RereadTemplates()<CR>
- noremap <buffer> <LocalLeader>nts <Esc>:CStyle<Space>
-"
-" ---------- C++ menu ----------------------------------------------------
-"
- noremap <buffer> <silent> <LocalLeader>+co :call C_InsertTemplate("cpp.cout")<CR>
-inoremap <buffer> <silent> <LocalLeader>+co <Esc>:call C_InsertTemplate("cpp.cout")<CR>
-"
- noremap <buffer> <silent> <LocalLeader>+c :call C_InsertTemplate("cpp.class-definition")<CR>
-inoremap <buffer> <silent> <LocalLeader>+c <Esc>:call C_InsertTemplate("cpp.class-definition")<CR>
- noremap <buffer> <silent> <LocalLeader>+cn :call C_InsertTemplate("cpp.class-using-new-definition")<CR>
-inoremap <buffer> <silent> <LocalLeader>+cn <Esc>:call C_InsertTemplate("cpp.class-using-new-definition")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+ci :call C_InsertTemplate("cpp.class-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+ci <Esc>:call C_InsertTemplate("cpp.class-implementation")<CR>
- noremap <buffer> <silent> <LocalLeader>+cni :call C_InsertTemplate("cpp.class-using-new-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+cni <Esc>:call C_InsertTemplate("cpp.class-using-new-implementation")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+mi :call C_InsertTemplate("cpp.method-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+mi <Esc>:call C_InsertTemplate("cpp.method-implementation")<CR>
- noremap <buffer> <silent> <LocalLeader>+ai :call C_InsertTemplate("cpp.accessor-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+ai <Esc>:call C_InsertTemplate("cpp.accessor-implementation")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+tc :call C_InsertTemplate("cpp.template-class-definition")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tc <Esc>:call C_InsertTemplate("cpp.template-class-definition")<CR>
- noremap <buffer> <silent> <LocalLeader>+tcn :call C_InsertTemplate("cpp.template-class-using-new-definition")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tcn <Esc>:call C_InsertTemplate("cpp.template-class-using-new-definition")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+tci :call C_InsertTemplate("cpp.template-class-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tci <Esc>:call C_InsertTemplate("cpp.template-class-implementation")<CR>
- noremap <buffer> <silent> <LocalLeader>+tcni :call C_InsertTemplate("cpp.template-class-using-new-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tcni <Esc>:call C_InsertTemplate("cpp.template-class-using-new-implementation")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+tmi :call C_InsertTemplate("cpp.template-method-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tmi <Esc>:call C_InsertTemplate("cpp.template-method-implementation")<CR>
- noremap <buffer> <silent> <LocalLeader>+tai :call C_InsertTemplate("cpp.template-accessor-implementation")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tai <Esc>:call C_InsertTemplate("cpp.template-accessor-implementation")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+tf :call C_InsertTemplate("cpp.template-function")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tf <Esc>:call C_InsertTemplate("cpp.template-function")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+ec :call C_InsertTemplate("cpp.error-class")<CR>
-inoremap <buffer> <silent> <LocalLeader>+ec <Esc>:call C_InsertTemplate("cpp.error-class")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+tr :call C_InsertTemplate("cpp.try-catch")<CR>
-vnoremap <buffer> <silent> <LocalLeader>+tr <Esc>:call C_InsertTemplate("cpp.try-catch", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>+tr <Esc>:call C_InsertTemplate("cpp.try-catch")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+ca :call C_InsertTemplate("cpp.catch")<CR>
-vnoremap <buffer> <silent> <LocalLeader>+ca <Esc>:call C_InsertTemplate("cpp.catch", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>+ca <Esc>:call C_InsertTemplate("cpp.catch")<CR>
-
- noremap <buffer> <silent> <LocalLeader>+c. :call C_InsertTemplate("cpp.catch-points")<CR>
-vnoremap <buffer> <silent> <LocalLeader>+c. <Esc>:call C_InsertTemplate("cpp.catch-points", "v")<CR>
-inoremap <buffer> <silent> <LocalLeader>+c. <Esc>:call C_InsertTemplate("cpp.catch-points")<CR>
-"
-" ---------- run menu --------------------------------------------------------
-"
- map <buffer> <silent> <LocalLeader>rc :call C_Compile()<CR>:call C_HlMessage()<CR>
- map <buffer> <silent> <LocalLeader>rl :call C_Link()<CR>:call C_HlMessage()<CR>
- map <buffer> <silent> <LocalLeader>rr :call C_Run()<CR>
- map <buffer> <silent> <LocalLeader>ra :call C_Arguments()<CR>
- map <buffer> <silent> <LocalLeader>rm :call C_Make()<CR>
- map <buffer> <silent> <LocalLeader>rg :call C_MakeArguments()<CR>
- map <buffer> <silent> <LocalLeader>rp :call C_SplintCheck()<CR>:call C_HlMessage()<CR>
- map <buffer> <silent> <LocalLeader>ri :call C_SplintArguments()<CR>
- map <buffer> <silent> <LocalLeader>rd :call C_Indent()<CR>
- map <buffer> <silent> <LocalLeader>rh :call C_Hardcopy("n")<CR>
- map <buffer> <silent> <LocalLeader>rs :call C_Settings()<CR>
-"
-vmap <buffer> <silent> <LocalLeader>rh <C-C>:call C_Hardcopy("v")<CR>
-"
-imap <buffer> <silent> <LocalLeader>rc <C-C>:call C_Compile()<CR>:call C_HlMessage()<CR>
-imap <buffer> <silent> <LocalLeader>rl <C-C>:call C_Link()<CR>:call C_HlMessage()<CR>
-imap <buffer> <silent> <LocalLeader>rr <C-C>:call C_Run()<CR>
-imap <buffer> <silent> <LocalLeader>ra <C-C>:call C_Arguments()<CR>
-imap <buffer> <silent> <LocalLeader>rm <C-C>:call C_Make()<CR>
-imap <buffer> <silent> <LocalLeader>rg <C-C>:call C_MakeArguments()<CR>
-imap <buffer> <silent> <LocalLeader>rp <C-C>:call C_SplintCheck()<CR>:call C_HlMessage()<CR>
-imap <buffer> <silent> <LocalLeader>ri <C-C>:call C_SplintArguments()<CR>
-imap <buffer> <silent> <LocalLeader>rd <C-C>:call C_Indent()<CR>
-imap <buffer> <silent> <LocalLeader>rh <C-C>:call C_Hardcopy("n")<CR>
-imap <buffer> <silent> <LocalLeader>rs <C-C>:call C_Settings()<CR>
- if has("unix")
- map <buffer> <silent> <LocalLeader>rx :call C_XtermSize()<CR>
- imap <buffer> <silent> <LocalLeader>rx <C-C>:call C_XtermSize()<CR>
- endif
- map <buffer> <silent> <LocalLeader>ro :call C_Toggle_Gvim_Xterm()<CR>
-imap <buffer> <silent> <LocalLeader>ro <C-C>:call C_Toggle_Gvim_Xterm()<CR>
-"
-" Abraxas CodeCheck (R)
-"
-if executable("check")
- map <buffer> <silent> <LocalLeader>rk :call C_CodeCheck()<CR>:call C_HlMessage()<CR>
- map <buffer> <silent> <LocalLeader>re :call C_CodeCheckArguments()<CR>
- imap <buffer> <silent> <LocalLeader>rk <C-C>:call C_CodeCheck()<CR>:call C_HlMessage()<CR>
- imap <buffer> <silent> <LocalLeader>re <C-C>:call C_CodeCheckArguments()<CR>
-endif
-" ---------- plugin help -----------------------------------------------------
-"
- map <buffer> <silent> <LocalLeader>hp :call C_HelpCsupport()<CR>
-imap <buffer> <silent> <LocalLeader>hp <C-C>:call C_HelpCsupport()<CR>
- map <buffer> <silent> <LocalLeader>hm :call C_Help("m")<CR>
-imap <buffer> <silent> <LocalLeader>hm <C-C>:call C_Help("m")<CR>
-"
-"-------------------------------------------------------------------------------
-" additional mapping : complete a classical C comment: '/*' => '/* | */'
-"-------------------------------------------------------------------------------
-inoremap <buffer> /* /*<Space><Space>*/<Left><Left><Left>
-vnoremap <buffer> /* s/*<Space><Space>*/<Left><Left><Left><Esc>p
-"
-"-------------------------------------------------------------------------------
-" additional mapping : complete a classical C multi-line comment:
-" '/*<CR>' => /*
-" * |
-" */
-"-------------------------------------------------------------------------------
-inoremap <buffer> /*<CR> /*<CR><CR>/<Esc>kA<Space>
-"
-"-------------------------------------------------------------------------------
-" additional mapping : {<CR> always opens a block
-"-------------------------------------------------------------------------------
-inoremap <buffer> {<CR> {<CR>}<Esc>O
-vnoremap <buffer> {<CR> S{<CR>}<Esc>Pk=iB
-"
-"
-if !exists("g:C_Ctrl_j") || ( exists("g:C_Ctrl_j") && g:C_Ctrl_j != 'off' )
- nmap <buffer> <silent> <C-j> i<C-R>=C_JumpCtrlJ()<CR>
- imap <buffer> <silent> <C-j> <C-R>=C_JumpCtrlJ()<CR>
-endif
diff --git a/.vim/plugin/buftabs.vim b/.vim/plugin/buftabs.vim
deleted file mode 100644
index 30edea9..0000000
--- a/.vim/plugin/buftabs.vim
+++ /dev/null
@@ -1,309 +0,0 @@
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" buftabs (C) 2006 Ico Doornekamp
-"
-" This program is free software; you can redistribute it and/or modify it
-" under the terms of the GNU General Public License as published by the Free
-" Software Foundation; either version 2 of the License, or (at your option)
-" any later version.
-"
-" This program is distributed in the hope that it will be useful, but WITHOUT
-" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-" more details.
-"
-" Introduction
-" ------------
-"
-" This is a simple script that shows a tabs-like list of buffers in the bottom
-" of the window. The biggest advantage of this script over various others is
-" that it does not take any lines away from your terminal, leaving more space
-" for the document you're editing. The tabs are only visible when you need
-" them - when you are switchin between buffers.
-"
-" Usage
-" -----
-"
-" This script draws buffer tabs on vim startup, when a new buffer is created
-" and when switching between buffers.
-"
-" It might be handy to create a few maps for easy switching of buffers in your
-" .vimrc file. For example, using F1 and F2 keys:
-"
-" noremap <f1> :bprev<CR>
-" noremap <f2> :bnext<CR>
-"
-" or using control-left and control-right keys:
-"
-" :noremap <C-left> :bprev<CR>
-" :noremap <C-right> :bnext<CR>
-"
-"
-" The following extra configuration variables are availabe:
-"
-" * g:buftabs_only_basename
-"
-" Define this variable to make buftabs only print the filename of each buffer,
-" omitting the preceding directory name. Add to your .vimrc:
-"
-" :let g:buftabs_only_basename=1
-"
-"
-" * g:buftabs_in_statusline
-"
-" Define this variable to make the plugin show the buftabs in the statusline
-" instead of the command line. It is a good idea to configure vim to show
-" the statusline as well when only one window is open. Add to your .vimrc:
-"
-" set laststatus=2
-" :let g:buftabs_in_statusline=1
-"
-"
-" * g:buftabs_active_highlight_group
-" * g:buftabs_inactive_highlight_group
-"
-" The name of a highlight group (:help highligh-groups) which is used to
-" show the name of the current active buffer and of all other inactive
-" buffers. If these variables are not defined, no highlighting is used.
-" (Highlighting is only functional when g:buftabs_in_statusline is enabled)
-"
-" :let g:buftabs_active_highlight_group="Visual"
-"
-"
-" * g:buftabs_marker_start [
-" * g:buftabs_marker_end ]
-" * g:buftabs_separator -
-"
-" These strings are drawn around each tab as separators.
-"
-" :let g:buftabs_separator = "."
-" :let g:buftabs_marker_start = "("
-" :let g:buftabs_marker_end = ")"
-"
-"
-" Changelog
-" ---------
-"
-" 0.1 2006-09-22 Initial version
-"
-" 0.2 2006-09-22 Better handling when the list of buffers is longer then the
-" window width.
-"
-" 0.3 2006-09-27 Some cleanups, set 'hidden' mode by default
-"
-" 0.4 2007-02-26 Don't draw buftabs until VimEnter event to avoid clutter at
-" startup in some circumstances
-"
-" 0.5 2007-02-26 Added option for showing only filenames without directories
-" in tabs
-"
-" 0.6 2007-03-04 'only_basename' changed to a global variable. Removed
-" functions and add event handlers instead. 'hidden' mode
-" broke some things, so is disabled now. Fixed documentation
-"
-" 0.7 2007-03-07 Added configuration option to show tabs in statusline
-" instead of cmdline
-"
-" 0.8 2007-04-02 Update buftabs when leaving insertmode
-"
-" 0.9 2007-08-22 Now compatible with older Vim versions < 7.0
-"
-" 0.10 2008-01-26 Added GPL license
-"
-" 0.11 2008-02-29 Added optional syntax highlighting to active buffer name
-"
-" 0.12 2009-03-18 Fixed support for split windows
-"
-" 0.13 2009-05-07 Store and reuse right-aligned part of original statusline
-"
-" 0.14 2010-01-28 Fixed bug that caused buftabs in command line being
-" overwritten when 'hidden' mode is enabled.
-"
-" 0.15 2010-02-16 Fixed window width handling bug which caused strange
-" behaviour in combination with the bufferlist plugin.
-" Fixed wrong buffer display when deleting last window.
-" Added extra options for tabs style and highlighting.
-"
-" 0.16 2010-02-28 Fixed bug causing errors when using buftabs in vim
-" diff mode.
-"
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-let w:buftabs_enabled = 0
-let w:original_statusline = matchstr(&statusline, "%=.*")
-
-"
-" Don't bother when in diff mode
-"
-
-if &diff
- finish
-endif
-
-
-"
-" Called on VimEnter event
-"
-
-function! Buftabs_enable()
- let w:buftabs_enabled = 1
-endfunction
-
-
-"
-" Persistent echo to avoid overwriting of status line when 'hidden' is enabled
-"
-
-function! Pecho(msg)
- let s:hold_ut=&ut|let &ut=1
- let s:Pecho=a:msg
- aug Pecho
- au CursorHold * ec s:Pecho
- \|let &ut=s:hold_ut
- \|aug Pecho|exe 'au!'|aug END|aug! Pecho
- aug END
-endf
-
-
-"
-" Draw the buftabs
-"
-
-function! Buftabs_show(deleted_buf)
-
- let l:i = 1
- let l:list = ''
- let l:start = 0
- let l:end = 0
- if ! exists("w:from")
- let w:from = 0
- endif
-
- if ! exists("w:buftabs_enabled")
- return
- endif
-
- " Walk the list of buffers
-
- while(l:i <= bufnr('$'))
-
- " Only show buffers in the list, and omit help screens
-
- if buflisted(l:i) && getbufvar(l:i, "&modifiable") && a:deleted_buf != l:i
-
- " Get the name of the current buffer, and escape characters that might
- " mess up the statusline
-
- if exists("g:buftabs_only_basename")
- let l:name = fnamemodify(bufname(l:i), ":t")
- else
- let l:name = bufname(l:i)
- endif
- let l:name = substitute(l:name, "%", "%%", "g")
-
- " Append the current buffer number and name to the list. If the buffer
- " is the active buffer, enclose it in some magick characters which will
- " be replaced by markers later. If it is modified, it is appended with
- " an exclaimation mark
-
- if winbufnr(winnr()) == l:i
- let l:start = strlen(l:list)
- let l:list = l:list . "\x01"
- else
- let l:list = l:list . ' '
- endif
-
- let l:buftabs_separator = "-"
- if exists("g:buftabs_separator")
- let l:buftabs_separator = g:buftabs_separator
- endif
-
- let l:list = l:list . l:i . l:buftabs_separator
- let l:list = l:list . l:name
-
- if getbufvar(l:i, "&modified") == 1
- let l:list = l:list . "!"
- endif
-
- if winbufnr(winnr()) == l:i
- let l:list = l:list . "\x02"
- let l:end = strlen(l:list)
- else
- let l:list = l:list . ' '
- endif
- end
-
- let l:i = l:i + 1
- endwhile
-
- " If the resulting list is too long to fit on the screen, chop
- " out the appropriate part
-
- let l:width = winwidth(0) - 12
-
- if(l:start < w:from)
- let w:from = l:start - 1
- endif
- if l:end > w:from + l:width
- let w:from = l:end - l:width
- endif
-
- let l:list = strpart(l:list, w:from, l:width)
-
- " Replace the magic characters by visible markers for highlighting the
- " current buffer. The markers can be simple characters like square brackets,
- " but can also be special codes with highlight groups
-
- let l:buftabs_marker_start = "["
- if exists("g:buftabs_marker_start")
- let l:buftabs_marker_start = g:buftabs_marker_start
- endif
-
- let l:buftabs_marker_end = "]"
- if exists("g:buftabs_marker_end")
- let l:buftabs_marker_end = g:buftabs_marker_end
- endif
-
- if exists("g:buftabs_active_highlight_group")
- if exists("g:buftabs_in_statusline")
- let l:buftabs_marker_start = "%#" . g:buftabs_active_highlight_group . "#" . l:buftabs_marker_start
- let l:buftabs_marker_end = l:buftabs_marker_end . "%##"
- end
- end
-
- if exists("g:buftabs_inactive_highlight_group")
- if exists("g:buftabs_in_statusline")
- let l:list = '%#' . g:buftabs_inactive_highlight_group . '#' . l:list
- let l:list .= '%##'
- let l:buftabs_marker_end = l:buftabs_marker_end . '%#' . g:buftabs_inactive_highlight_group . '#'
- end
- end
-
- let l:list = substitute(l:list, "\x01", l:buftabs_marker_start, 'g')
- let l:list = substitute(l:list, "\x02", l:buftabs_marker_end, 'g')
-
- " Show the list. The buftabs_in_statusline variable determines of the list
- " is displayed in the command line (volatile) or in the statusline
- " (persistent)
-
- if exists("g:buftabs_in_statusline")
- let &l:statusline = l:list . w:original_statusline
- else
- redraw
- call Pecho(l:list)
- end
-
-endfunction
-
-
-" Hook to events to show buftabs at startup, when creating and when switching
-" buffers
-
-autocmd VimEnter * call Buftabs_enable()
-autocmd VimEnter,BufNew,BufEnter,BufWritePost * call Buftabs_show(-1)
-autocmd BufDelete * call Buftabs_show(expand('<abuf>'))
-if version >= 700
- autocmd InsertLeave,VimResized * call Buftabs_show(-1)
-end
-
-" vi: ts=2 sw=2
-
diff --git a/.vim/plugin/c.vim b/.vim/plugin/c.vim
deleted file mode 100644
index 741764b..0000000
--- a/.vim/plugin/c.vim
+++ /dev/null
@@ -1,3550 +0,0 @@
-"#################################################################################
-"
-" Filename: c.vim
-"
-" Description: C/C++-IDE. Write programs by inserting complete statements,
-" comments, idioms, code snippets, templates and comments.
-" Compile, link and run one-file-programs without a makefile.
-" See also help file csupport.txt .
-"
-" GVIM Version: 7.0+
-"
-" Configuration: There are some personal details which should be configured
-" (see the files README.csupport and csupport.txt).
-"
-" Author: Dr.-Ing. Fritz Mehner, FH Südwestfalen, 58644 Iserlohn, Germany
-" Email: mehner@fh-swf.de
-"
-" Version: see variable g:C_Version below
-" Created: 04.11.2000
-" License: Copyright (c) 2000-2010, Fritz Mehner
-" This program is free software; you can redistribute it and/or
-" modify it under the terms of the GNU General Public License as
-" published by the Free Software Foundation, version 2 of the
-" License.
-" This program is distributed in the hope that it will be
-" useful, but WITHOUT ANY WARRANTY; without even the implied
-" warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-" PURPOSE.
-" See the GNU General Public License version 2 for more details.
-" Revision: $Id: c.vim,v 1.106 2010/02/02 13:24:41 mehner Exp $
-"
-"------------------------------------------------------------------------------
-"
-if v:version < 700
- echohl WarningMsg | echo 'The plugin c-support.vim needs Vim version >= 7 .'| echohl None
- finish
-endif
-"
-" Prevent duplicate loading:
-"
-if exists("g:C_Version") || &cp
- finish
-endif
-let g:C_Version= "5.10" " version number of this script; do not change
-"
-"#################################################################################
-"
-" Global variables (with default values) which can be overridden.
-"
-" Platform specific items: {{{1
-" - root directory
-" - characters that must be escaped for filenames
-"
-let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
-"
-if s:MSWIN
- "
- let s:escfilename = ''
- let s:plugin_dir = $VIM.'\vimfiles\'
- let s:C_CodeSnippets = s:plugin_dir.'c-support/codesnippets/'
- let s:C_IndentErrorLog = $HOME.'.indent.errorlog'
- let s:installation = 'system'
- "
- let s:C_Display = ''
- "
-else
- "
- let s:escfilename = ' \%#[]'
- let s:installation = 'local'
- "
- " user / system wide installation (Linux/Unix)
- "
- if match( expand("<sfile>"), $VIM ) >= 0
- " system wide installation
- let s:plugin_dir = $VIM.'/vimfiles/'
- let s:installation = 'system'
- else
- " user installation assumed
- let s:plugin_dir = $HOME.'/.vim/'
- endif
- "
- let s:C_CodeSnippets = $HOME.'/.vim/c-support/codesnippets/'
- let s:C_IndentErrorLog = $HOME.'/.indent.errorlog'
- "
- let s:C_Display = system("echo -n $DISPLAY")
- "
-endif
-" Use of dictionaries {{{1
-" Key word completion is enabled by the filetype plugin 'c.vim'
-" g:C_Dictionary_File must be global
-"
-if !exists("g:C_Dictionary_File")
- let g:C_Dictionary_File = s:plugin_dir.'c-support/wordlists/c-c++-keywords.list,'.
- \ s:plugin_dir.'c-support/wordlists/k+r.list,'.
- \ s:plugin_dir.'c-support/wordlists/stl_index.list'
-endif
-"
-" Modul global variables (with default values) which can be overridden. {{{1
-"
-if s:MSWIN
- let s:C_CCompiler = 'gcc.exe' " the C compiler
- let s:C_CplusCompiler = 'g++.exe' " the C++ compiler
- let s:C_ExeExtension = '.exe' " file extension for executables (leading point required)
- let s:C_ObjExtension = '.obj' " file extension for objects (leading point required)
- let s:C_Man = 'man.exe' " the manual program
-else
- let s:C_CCompiler = 'gcc' " the C compiler
- let s:C_CplusCompiler = 'g++' " the C++ compiler
- let s:C_ExeExtension = '' " file extension for executables (leading point required)
- let s:C_ObjExtension = '.o' " file extension for objects (leading point required)
- let s:C_Man = 'man' " the manual program
-endif
-"
-let s:C_CExtension = 'c' " C file extension; everything else is C++
-let s:C_CFlags = '-Wall -g -O0 -c' " compiler flags: compile, don't optimize
-let s:C_CodeCheckExeName = 'check'
-let s:C_CodeCheckOptions = '-K13'
-let s:C_LFlags = '-Wall -g -O0' " compiler flags: link , don't optimize
-let s:C_Libs = '-lm' " libraries to use
-let s:C_LineEndCommColDefault = 49
-let s:C_LoadMenus = 'yes'
-let s:C_MenuHeader = 'yes'
-let s:C_OutputGvim = 'vim'
-let s:C_Printheader = "%<%f%h%m%< %=%{strftime('%x %X')} Page %N"
-let s:C_Root = '&C\/C\+\+.' " the name of the root menu of this plugin
-let s:C_TypeOfH = 'cpp'
-let s:C_Wrapper = s:plugin_dir.'c-support/scripts/wrapper.sh'
-let s:C_XtermDefaults = '-fa courier -fs 12 -geometry 80x24'
-let s:C_GuiSnippetBrowser = 'gui' " gui / commandline
-let s:C_GuiTemplateBrowser = 'gui' " gui / explorer / commandline
-"
-let s:C_GlobalTemplateFile = s:plugin_dir.'c-support/templates/Templates'
-let s:C_GlobalTemplateDir = fnamemodify( s:C_GlobalTemplateFile, ":p:h" ).'/'
-let s:C_LocalTemplateFile = $HOME.'/.vim/c-support/templates/Templates'
-let s:C_LocalTemplateDir = fnamemodify( s:C_LocalTemplateFile, ":p:h" ).'/'
-let s:C_TemplateOverwrittenMsg= 'yes'
-let s:C_Ctrl_j = 'on'
-"
-let s:C_FormatDate = '%x'
-let s:C_FormatTime = '%X'
-let s:C_FormatYear = '%Y'
-let s:C_SourceCodeExtensions = 'c cc cp cxx cpp CPP c++ C i ii'
-"
-"------------------------------------------------------------------------------
-"
-" Look for global variables (if any), to override the defaults.
-"
-function! C_CheckGlobal ( name )
- if exists('g:'.a:name)
- exe 'let s:'.a:name.' = g:'.a:name
- endif
-endfunction " ---------- end of function C_CheckGlobal ----------
-"
-call C_CheckGlobal('C_CCompiler ')
-call C_CheckGlobal('C_CExtension ')
-call C_CheckGlobal('C_CFlags ')
-call C_CheckGlobal('C_CodeCheckExeName ')
-call C_CheckGlobal('C_CodeCheckOptions ')
-call C_CheckGlobal('C_CodeSnippets ')
-call C_CheckGlobal('C_CplusCompiler ')
-call C_CheckGlobal('C_Ctrl_j ')
-call C_CheckGlobal('C_ExeExtension ')
-call C_CheckGlobal('C_FormatDate ')
-call C_CheckGlobal('C_FormatTime ')
-call C_CheckGlobal('C_FormatYear ')
-call C_CheckGlobal('C_GlobalTemplateFile ')
-call C_CheckGlobal('C_GuiSnippetBrowser ')
-call C_CheckGlobal('C_GuiTemplateBrowser ')
-call C_CheckGlobal('C_IndentErrorLog ')
-call C_CheckGlobal('C_LFlags ')
-call C_CheckGlobal('C_Libs ')
-call C_CheckGlobal('C_LineEndCommColDefault ')
-call C_CheckGlobal('C_LoadMenus ')
-call C_CheckGlobal('C_LocalTemplateFile ')
-call C_CheckGlobal('C_Man ')
-call C_CheckGlobal('C_MenuHeader ')
-call C_CheckGlobal('C_ObjExtension ')
-call C_CheckGlobal('C_OutputGvim ')
-call C_CheckGlobal('C_Printheader ')
-call C_CheckGlobal('C_Root ')
-call C_CheckGlobal('C_SourceCodeExtensions ')
-call C_CheckGlobal('C_TemplateOverwrittenMsg ')
-call C_CheckGlobal('C_TypeOfH ')
-call C_CheckGlobal('C_XtermDefaults ')
-"
-"----- some variables for internal use only -----------------------------------
-"
-"
-" set default geometry if not specified
-"
-if match( s:C_XtermDefaults, "-geometry\\s\\+\\d\\+x\\d\\+" ) < 0
- let s:C_XtermDefaults = s:C_XtermDefaults." -geometry 80x24"
-endif
-"
-" escape the printheader
-"
-let s:C_Printheader = escape( s:C_Printheader, ' %' )
-"
-let s:C_HlMessage = ""
-"
-" characters that must be escaped for filenames
-"
-let s:C_If0_Counter = 0
-let s:C_If0_Txt = "If0Label_"
-"
-let s:C_SplintIsExecutable = 0
-if executable( "splint" )
- let s:C_SplintIsExecutable = 1
-endif
-"
-let s:C_CodeCheckIsExecutable = 0
-if executable( s:C_CodeCheckExeName )
- let s:C_CodeCheckIsExecutable = 1
-endif
-"
-"------------------------------------------------------------------------------
-" Control variables (not user configurable)
-"------------------------------------------------------------------------------
-let s:Attribute = { 'below':'', 'above':'', 'start':'', 'append':'', 'insert':'' }
-let s:C_Attribute = {}
-let s:C_ExpansionLimit = 10
-let s:C_FileVisited = []
-"
-let s:C_MacroNameRegex = '\([a-zA-Z][a-zA-Z0-9_]*\)'
-let s:C_MacroLineRegex = '^\s*|'.s:C_MacroNameRegex.'|\s*=\s*\(.*\)'
-let s:C_MacroCommentRegex = '^\$'
-let s:C_ExpansionRegex = '|?'.s:C_MacroNameRegex.'\(:\a\)\?|'
-let s:C_NonExpansionRegex = '|'.s:C_MacroNameRegex.'\(:\a\)\?|'
-"
-let s:C_TemplateNameDelimiter = '-+_,\. '
-let s:C_TemplateLineRegex = '^==\s*\([a-zA-Z][0-9a-zA-Z'.s:C_TemplateNameDelimiter
-let s:C_TemplateLineRegex .= ']\+\)\s*==\s*\([a-z]\+\s*==\)\?'
-let s:C_TemplateIf = '^==\s*IF\s\+|STYLE|\s\+IS\s\+'.s:C_MacroNameRegex.'\s*=='
-let s:C_TemplateEndif = '^==\s*ENDIF\s*=='
-"
-let s:C_ExpansionCounter = {}
-let s:C_TJT = '[ 0-9a-zA-Z_]*'
-let s:C_TemplateJumpTarget1 = '<+'.s:C_TJT.'+>\|{+'.s:C_TJT.'+}'
-let s:C_TemplateJumpTarget2 = '<-'.s:C_TJT.'->\|{-'.s:C_TJT.'-}'
-let s:C_Macro = {'|AUTHOR|' : 'first name surname',
- \ '|AUTHORREF|' : '',
- \ '|EMAIL|' : '',
- \ '|COMPANY|' : '',
- \ '|PROJECT|' : '',
- \ '|COPYRIGHTHOLDER|': '',
- \ '|STYLE|' : ''
- \ }
-let s:C_MacroFlag = { ':l' : 'lowercase' ,
- \ ':u' : 'uppercase' ,
- \ ':c' : 'capitalize' ,
- \ ':L' : 'legalize name' ,
- \ }
-let s:C_ActualStyle = 'default'
-let s:C_ActualStyleLast = s:C_ActualStyle
-let s:C_Template = { 'default' : {} }
-
-let s:C_ForTypes = [
- \ 'char ' ,
- \ 'int ' ,
- \ 'long int ' ,
- \ 'long ' ,
- \ 'short int ' ,
- \ 'short ' ,
- \ 'size_t ' ,
- \ 'unsigned char ' ,
- \ 'unsigned int ' ,
- \ 'unsigned long int ' ,
- \ 'unsigned long ' ,
- \ 'unsigned short int ',
- \ 'unsigned short ' ,
- \ 'unsigned ' ,
- \ ]
-
-let s:MsgInsNotAvail = "insertion not available for a fold"
-
-"------------------------------------------------------------------------------
-
-let s:C_SourceCodeExtensionsList = split( s:C_SourceCodeExtensions, '\s\+' )
-
-"------------------------------------------------------------------------------
-
-"------------------------------------------------------------------------------
-" C : C_InitMenus {{{1
-" Initialization of C support menus
-"------------------------------------------------------------------------------
-"
-" the menu names
-"
-let s:Comments = s:C_Root.'&Comments'
-let s:Statements = s:C_Root.'&Statements'
-let s:Idioms = s:C_Root.'&Idioms'
-let s:Preprocessor = s:C_Root.'&Preprocessor'
-let s:Snippets = s:C_Root.'S&nippets'
-let s:Cpp = s:C_Root.'C&++'
-let s:Run = s:C_Root.'&Run'
-"
-function! C_InitMenus ()
- "
- "===============================================================================================
- "----- Menu : C main menu entry ------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_Root != ""
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:C_Root.'C\/C\+\+ <Nop>'
- exe "amenu ".s:C_Root.'-Sep00- <Nop>'
- endif
- endif
- "
- "===============================================================================================
- "----- Menu : C-Comments -------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:C_Root.'&Comments.&Comments<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:C_Root.'&Comments.-Sep00- <Nop>'
- endif
- exe "amenu <silent> ".s:Comments.'.end-of-&line\ comment<Tab>\\cl :call C_LineEndComment( )<CR>'
- exe "vmenu <silent> ".s:Comments.'.end-of-&line\ comment<Tab>\\cl <Esc>:call C_MultiLineEndComments( )<CR>a'
-
- exe "amenu <silent> ".s:Comments.'.ad&just\ end-of-line\ com\.<Tab>\\cj :call C_AdjustLineEndComm("a")<CR>'
- exe "vmenu <silent> ".s:Comments.'.ad&just\ end-of-line\ com\.<Tab>\\cj :call C_AdjustLineEndComm("v")<CR>'
-
- exe "amenu <silent> ".s:Comments.'.&set\ end-of-line\ com\.\ col\.<Tab>\\cs :call C_GetLineEndCommCol()<CR>'
-
- exe "amenu ".s:Comments.'.-SEP10- :'
- exe "amenu <silent> ".s:Comments.'.code\ ->\ comment\ \/&*\ *\/<Tab>\\c* :call C_CodeComment("a","yes")<CR>:nohlsearch<CR>j'
- exe "vmenu <silent> ".s:Comments.'.code\ ->\ comment\ \/&*\ *\/<Tab>\\c* <Esc>:call C_CodeComment("v","yes")<CR>:nohlsearch<CR>j'
- exe "amenu <silent> ".s:Comments.'.code\ ->\ comment\ &\/\/<Tab>\\cc :call C_CodeComment("a","no")<CR>:nohlsearch<CR>j'
- exe "vmenu <silent> ".s:Comments.'.code\ ->\ comment\ &\/\/<Tab>\\cc <Esc>:call C_CodeComment("v","no")<CR>:nohlsearch<CR>j'
- exe "amenu <silent> ".s:Comments.'.c&omment\ ->\ code<Tab>\\co :call C_CommentCode("a")<CR>:nohlsearch<CR>'
- exe "vmenu <silent> ".s:Comments.'.c&omment\ ->\ code<Tab>\\co :call C_CommentCode("v")<CR>:nohlsearch<CR>'
-
- exe "amenu ".s:Comments.'.-SEP0- :'
- exe "amenu <silent> ".s:Comments.'.&frame\ comment<Tab>\\cfr :call C_InsertTemplate("comment.frame")<CR>'
- exe "amenu <silent> ".s:Comments.'.f&unction\ description<Tab>\\cfu :call C_InsertTemplate("comment.function")<CR>'
- exe "amenu ".s:Comments.'.-SEP1- :'
- exe "amenu <silent> ".s:Comments.'.&method\ description<Tab>\\cme :call C_InsertTemplate("comment.method")<CR>'
- exe "amenu <silent> ".s:Comments.'.cl&ass\ description<Tab>\\ccl :call C_InsertTemplate("comment.class")<CR>'
- exe "amenu ".s:Comments.'.-SEP2- :'
- exe "amenu <silent> ".s:Comments.'.file\ description\ \(impl\.\)<Tab>\\cfdi :call C_InsertTemplate("comment.file-description")<CR>'
- exe "amenu <silent> ".s:Comments.'.file\ description\ \(header\)<Tab>\\cfdh :call C_InsertTemplate("comment.file-description-header")<CR>'
- exe "amenu ".s:Comments.'.-SEP3- :'
- "
- "----- Submenu : C-Comments : file sections -------------------------------------------------------------
- "
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.file\ sections<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.-Sep0- <Nop>'
- "
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.&Header\ File\ Includes :call C_InsertTemplate("comment.file-section-cpp-header-includes")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Macros :call C_InsertTemplate("comment.file-section-cpp-macros")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Type\ Def\. :call C_InsertTemplate("comment.file-section-cpp-typedefs")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Data\ Types :call C_InsertTemplate("comment.file-section-cpp-data-types")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Variables :call C_InsertTemplate("comment.file-section-cpp-local-variables")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Prototypes :call C_InsertTemplate("comment.file-section-cpp-prototypes")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.&Exp\.\ Function\ Def\. :call C_InsertTemplate("comment.file-section-cpp-function-defs-exported")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.&Local\ Function\ Def\. :call C_InsertTemplate("comment.file-section-cpp-function-defs-local")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.-SEP6- :'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.Local\ &Class\ Def\. :call C_InsertTemplate("comment.file-section-cpp-class-defs")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.E&xp\.\ Class\ Impl\. :call C_InsertTemplate("comment.file-section-cpp-class-implementations-exported")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.L&ocal\ Class\ Impl\. :call C_InsertTemplate("comment.file-section-cpp-class-implementations-local")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.-SEP7- :'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.&All\ sections,\ C :call C_Comment_C_SectionAll("c")<CR>'
- exe "amenu ".s:Comments.'.&C\/C\+\+-file\ sections<Tab>\\ccs.All\ &sections,\ C++ :call C_Comment_C_SectionAll("cpp")<CR>'
- "
- "----- Submenu : H-Comments : file sections -------------------------------------------------------------
- "
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.H-file\ sections<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.-Sep0- <Nop>'
- "'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.&Header\ File\ Includes :call C_InsertTemplate("comment.file-section-hpp-header-includes")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.Exported\ &Macros :call C_InsertTemplate("comment.file-section-hpp-macros")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.Exported\ &Type\ Def\. :call C_InsertTemplate("comment.file-section-hpp-exported-typedefs")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.Exported\ &Data\ Types :call C_InsertTemplate("comment.file-section-hpp-exported-data-types")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.Exported\ &Variables :call C_InsertTemplate("comment.file-section-hpp-exported-variables")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.Exported\ &Funct\.\ Decl\. :call C_InsertTemplate("comment.file-section-hpp-exported-function-declarations")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.-SEP4- :'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.E&xported\ Class\ Def\. :call C_InsertTemplate("comment.file-section-hpp-exported-class-defs")<CR>'
-
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.-SEP5- :'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.&All\ sections,\ C :call C_Comment_H_SectionAll("c")<CR>'
- exe "amenu ".s:Comments.'.&H-file\ sections<Tab>\\chs.All\ &sections,\ C++ :call C_Comment_H_SectionAll("cpp")<CR>'
- "
- exe "amenu ".s:Comments.'.-SEP8- :'
- "
- "----- Submenu : C-Comments : keyword comments ----------------------------------------------------------
- "
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.keyw\.+comm\.<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.-Sep0- <Nop>'
-"
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&BUG\: $:call C_InsertTemplate("comment.keyword-bug")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&COMPILER\: $:call C_InsertTemplate("comment.keyword-compiler")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&TODO\: $:call C_InsertTemplate("comment.keyword-todo")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:T&RICKY\: $:call C_InsertTemplate("comment.keyword-tricky")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&WARNING\: $:call C_InsertTemplate("comment.keyword-warning")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:W&ORKAROUND\: $:call C_InsertTemplate("comment.keyword-workaround")<CR>'
- exe "amenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&new\ keyword\: $:call C_InsertTemplate("comment.keyword-keyword")<CR>'
-"
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&BUG\: <Esc>$:call C_InsertTemplate("comment.keyword-bug")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&COMPILER\: <Esc>$:call C_InsertTemplate("comment.keyword-compiler")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&TODO\: <Esc>$:call C_InsertTemplate("comment.keyword-todo")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:T&RICKY\: <Esc>$:call C_InsertTemplate("comment.keyword-tricky")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&WARNING\: <Esc>$:call C_InsertTemplate("comment.keyword-warning")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:W&ORKAROUND\: <Esc>$:call C_InsertTemplate("comment.keyword-workaround")<CR>'
- exe "imenu ".s:Comments.'.&keyword\ comm\.<Tab>\\ckc.\:&new\ keyword\: <Esc>$:call C_InsertTemplate("comment.keyword-keyword")<CR>'
- "
- "----- Submenu : C-Comments : special comments ----------------------------------------------------------
- "
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.special\ comm\.<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.-Sep0- <Nop>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&EMPTY $:call C_InsertTemplate("comment.special-empty")<CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&FALL\ THROUGH $:call C_InsertTemplate("comment.special-fall-through") <CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&IMPL\.\ TYPE\ CONV $:call C_InsertTemplate("comment.special-implicit-type-conversion") <CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&NO\ RETURN $:call C_InsertTemplate("comment.special-no-return") <CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.NOT\ &REACHED $:call C_InsertTemplate("comment.special-not-reached") <CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&TO\ BE\ IMPL\. $:call C_InsertTemplate("comment.special-remains-to-be-implemented")<CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.-SEP81- :'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ &long\ (L) $:call C_InsertTemplate("comment.special-constant-type-is-long")<CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ &unsigned\ (U) $:call C_InsertTemplate("comment.special-constant-type-is-unsigned")<CR>'
- exe "amenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ unsigned\ l&ong\ (UL) $:call C_InsertTemplate("comment.special-constant-type-is-unsigned-long")<CR>'
- "
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&EMPTY <Esc>$:call C_InsertTemplate("comment.special-empty")<CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&FALL\ THROUGH <Esc>$:call C_InsertTemplate("comment.special-fall-through") <CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&IMPL\.\ TYPE\ CONV <Esc>$:call C_InsertTemplate("comment.special-implicit-type-conversion") <CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&NO\ RETURN <Esc>$:call C_InsertTemplate("comment.special-no-return") <CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.NOT\ &REACHED <Esc>$:call C_InsertTemplate("comment.special-not-reached") <CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.&TO\ BE\ IMPL\. <Esc>$:call C_InsertTemplate("comment.special-remains-to-be-implemented")<CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.-SEP81- :'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ &long\ (L) <Esc>$:call C_InsertTemplate("comment.special-constant-type-is-long")<CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ &unsigned\ (U) <Esc>$:call C_InsertTemplate("comment.special-constant-type-is-unsigned")<CR>'
- exe "imenu ".s:Comments.'.&special\ comm\.<Tab>\\ckc.constant\ type\ is\ unsigned\ l&ong\ (UL) <Esc>$:call C_InsertTemplate("comment.special-constant-type-is-unsigned-long")<CR>'
- "
- "----- Submenu : C-Comments : Tags ----------------------------------------------------------
- "
- exe "amenu ".s:Comments.'.ta&gs\ (plugin).tags\ (plugin)<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Comments.'.ta&gs\ (plugin).-Sep0- <Nop>'
- "
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).&AUTHOR :call C_InsertMacroValue("AUTHOR")<CR>'
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).AUTHOR&REF :call C_InsertMacroValue("AUTHORREF")<CR>'
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).&COMPANY :call C_InsertMacroValue("COMPANY")<CR>'
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).C&OPYRIGHTHOLDER :call C_InsertMacroValue("COPYRIGHTHOLDER")<CR>'
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).&EMAIL :call C_InsertMacroValue("EMAIL")<CR>'
- exe "anoremenu ".s:Comments.'.ta&gs\ (plugin).&PROJECT :call C_InsertMacroValue("PROJECT")<CR>'
- "
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).&AUTHOR <Esc>:call C_InsertMacroValue("AUTHOR")<CR>a'
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).AUTHOR&REF <Esc>:call C_InsertMacroValue("AUTHORREF")<CR>a'
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).&COMPANY <Esc>:call C_InsertMacroValue("COMPANY")<CR>a'
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).C&OPYRIGHTHOLDER <Esc>:call C_InsertMacroValue("COPYRIGHTHOLDER")<CR>a'
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).&EMAIL <Esc>:call C_InsertMacroValue("EMAIL")<CR>a'
- exe "inoremenu ".s:Comments.'.ta&gs\ (plugin).&PROJECT <Esc>:call C_InsertMacroValue("PROJECT")<CR>a'
- "
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).&AUTHOR s<Esc>:call C_InsertMacroValue("AUTHOR")<CR>a'
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).AUTHOR&REF s<Esc>:call C_InsertMacroValue("AUTHORREF")<CR>a'
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).&COMPANY s<Esc>:call C_InsertMacroValue("COMPANY")<CR>a'
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).C&OPYRIGHTHOLDER s<Esc>:call C_InsertMacroValue("COPYRIGHTHOLDER")<CR>a'
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).&EMAIL s<Esc>:call C_InsertMacroValue("EMAIL")<CR>a'
- exe "vnoremenu ".s:Comments.'.ta&gs\ (plugin).&PROJECT s<Esc>:call C_InsertMacroValue("PROJECT")<CR>a'
- "
- "
- exe "amenu ".s:Comments.'.-SEP9- :'
- "
- exe " menu ".s:Comments.'.&date<Tab>\\cd <Esc>:call C_InsertDateAndTime("d")<CR>'
- exe "imenu ".s:Comments.'.&date<Tab>\\cd <Esc>:call C_InsertDateAndTime("d")<CR>a'
- exe "vmenu ".s:Comments.'.&date<Tab>\\cd s<Esc>:call C_InsertDateAndTime("d")<CR>a'
- exe " menu ".s:Comments.'.date\ &time<Tab>\\ct <Esc>:call C_InsertDateAndTime("dt")<CR>'
- exe "imenu ".s:Comments.'.date\ &time<Tab>\\ct <Esc>:call C_InsertDateAndTime("dt")<CR>a'
- exe "vmenu ".s:Comments.'.date\ &time<Tab>\\ct s<Esc>:call C_InsertDateAndTime("dt")<CR>a'
-
- exe "amenu ".s:Comments.'.-SEP12- :'
- exe "amenu <silent> ".s:Comments.'.\/\/\ xxx\ \ \ \ \ &->\ \ \/*\ xxx\ *\/ :call C_CommentCppToC()<CR>'
- exe "vmenu <silent> ".s:Comments.'.\/\/\ xxx\ \ \ \ \ &->\ \ \/*\ xxx\ *\/ <Esc>:'."'<,'>".'call C_CommentCppToC()<CR>'
- exe "amenu <silent> ".s:Comments.'.\/*\ xxx\ *\/\ \ -&>\ \ \/\/\ xxx :call C_CommentCToCpp()<CR>'
- exe "vmenu <silent> ".s:Comments.'.\/*\ xxx\ *\/\ \ -&>\ \ \/\/\ xxx <Esc>:'."'<,'>".'call C_CommentCToCpp()<CR>'
- "
- "===============================================================================================
- "----- Menu : C-Statements------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Statements.'.&Statements<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Statements.'.-Sep00- <Nop>'
- endif
- "
- exe "amenu <silent>".s:Statements.'.&do\ \{\ \}\ while<Tab>\\sd :call C_InsertTemplate("statements.do-while")<CR>'
- exe "vmenu <silent>".s:Statements.'.&do\ \{\ \}\ while<Tab>\\sd <Esc>:call C_InsertTemplate("statements.do-while", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.&do\ \{\ \}\ while<Tab>\\sd <Esc>:call C_InsertTemplate("statements.do-while")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.f&or<Tab>\\sf :call C_InsertTemplate("statements.for")<CR>'
- exe "imenu <silent>".s:Statements.'.f&or<Tab>\\sf <Esc>:call C_InsertTemplate("statements.for")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.fo&r\ \{\ \}<Tab>\\sfo :call C_InsertTemplate("statements.for-block")<CR>'
- exe "vmenu <silent>".s:Statements.'.fo&r\ \{\ \}<Tab>\\sfo <Esc>:call C_InsertTemplate("statements.for-block", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.fo&r\ \{\ \}<Tab>\\sfo <Esc>:call C_InsertTemplate("statements.for-block")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.&if<Tab>\\si :call C_InsertTemplate("statements.if")<CR>'
- exe "imenu <silent>".s:Statements.'.&if<Tab>\\si <Esc>:call C_InsertTemplate("statements.if")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.i&f\ \{\ \}<Tab>\\sif :call C_InsertTemplate("statements.if-block")<CR>'
- exe "vmenu <silent>".s:Statements.'.i&f\ \{\ \}<Tab>\\sif <Esc>:call C_InsertTemplate("statements.if-block", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.i&f\ \{\ \}<Tab>\\sif <Esc>:call C_InsertTemplate("statements.if-block")<CR>'
-
- exe "amenu <silent>".s:Statements.'.if\ &else<Tab>\\sie :call C_InsertTemplate("statements.if-else")<CR>'
- exe "vmenu <silent>".s:Statements.'.if\ &else<Tab>\\sie <Esc>:call C_InsertTemplate("statements.if-else", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.if\ &else<Tab>\\sie <Esc>:call C_InsertTemplate("statements.if-else")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.if\ \{\ \}\ e&lse\ \{\ \}<Tab>\\sife :call C_InsertTemplate("statements.if-block-else")<CR>'
- exe "vmenu <silent>".s:Statements.'.if\ \{\ \}\ e&lse\ \{\ \}<Tab>\\sife <Esc>:call C_InsertTemplate("statements.if-block-else", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.if\ \{\ \}\ e&lse\ \{\ \}<Tab>\\sife <Esc>:call C_InsertTemplate("statements.if-block-else")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.&else\ \{\ \}<Tab>\\se :call C_InsertTemplate("statements.else-block")<CR>'
- exe "vmenu <silent>".s:Statements.'.&else\ \{\ \}<Tab>\\se <Esc>:call C_InsertTemplate("statements.else-block", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.&else\ \{\ \}<Tab>\\se <Esc>:call C_InsertTemplate("statements.else-block")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.&while<Tab>\\sw :call C_InsertTemplate("statements.while")<CR>'
- exe "imenu <silent>".s:Statements.'.&while<Tab>\\sw <Esc>:call C_InsertTemplate("statements.while")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.w&hile\ \{\ \}<Tab>\\swh :call C_InsertTemplate("statements.while-block")<CR>'
- exe "vmenu <silent>".s:Statements.'.w&hile\ \{\ \}<Tab>\\swh <Esc>:call C_InsertTemplate("statements.while-block", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.w&hile\ \{\ \}<Tab>\\swh <Esc>:call C_InsertTemplate("statements.while-block")<CR>'
- "
- exe "amenu <silent>".s:Statements.'.&switch\ \{\ \}<Tab>\\ss :call C_InsertTemplate("statements.switch")<CR>'
- exe "vmenu <silent>".s:Statements.'.&switch\ \{\ \}<Tab>\\ss <Esc>:call C_InsertTemplate("statements.switch", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.&switch\ \{\ \}<Tab>\\ss <Esc>:call C_InsertTemplate("statements.switch")<CR>'
- "
- exe "amenu ".s:Statements.'.&case\ \.\.\.\ break<Tab>\\sc :call C_InsertTemplate("statements.case")<CR>'
- exe "imenu ".s:Statements.'.&case\ \.\.\.\ break<Tab>\\sc <Esc>:call C_InsertTemplate("statements.case")<CR>'
- "
- "
- exe "amenu <silent>".s:Statements.'.&\{\ \}<Tab>\\sb :call C_InsertTemplate("statements.block")<CR>'
- exe "vmenu <silent>".s:Statements.'.&\{\ \}<Tab>\\sb <Esc>:call C_InsertTemplate("statements.block", "v")<CR>'
- exe "imenu <silent>".s:Statements.'.&\{\ \}<Tab>\\sb <Esc>:call C_InsertTemplate("statements.block")<CR>'
- "
- "
- "===============================================================================================
- "----- Menu : C-Idioms ---------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Idioms.'.&Idioms<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Idioms.'.-Sep00- <Nop>'
- endif
- exe "amenu <silent> ".s:Idioms.'.&function<Tab>\\if :call C_InsertTemplate("idioms.function")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.&function<Tab>\\if <Esc>:call C_InsertTemplate("idioms.function", "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.&function<Tab>\\if <Esc>:call C_InsertTemplate("idioms.function")<CR>'
- exe "amenu <silent> ".s:Idioms.'.s&tatic\ function<Tab>\\isf :call C_InsertTemplate("idioms.function-static")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.s&tatic\ function<Tab>\\isf <Esc>:call C_InsertTemplate("idioms.function-static", "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.s&tatic\ function<Tab>\\isf <Esc>:call C_InsertTemplate("idioms.function-static")<CR>'
- exe "amenu <silent> ".s:Idioms.'.&main<Tab>\\im :call C_InsertTemplate("idioms.main")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.&main<Tab>\\im <Esc>:call C_InsertTemplate("idioms.main", "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.&main<Tab>\\im <Esc>:call C_InsertTemplate("idioms.main")<CR>'
-
- exe "amenu ".s:Idioms.'.-SEP1- :'
- exe "amenu ".s:Idioms.'.for(x=&0;\ x<n;\ x\+=1)<Tab>\\i0 :call C_CodeFor("up" , "a")<CR>'
- exe "vmenu ".s:Idioms.'.for(x=&0;\ x<n;\ x\+=1)<Tab>\\i0 <Esc>:call C_CodeFor("up" , "v")<CR>'
- exe "imenu ".s:Idioms.'.for(x=&0;\ x<n;\ x\+=1)<Tab>\\i0 <Esc>:call C_CodeFor("up" , "a")<CR>i'
- exe "amenu ".s:Idioms.'.for(x=&n-1;\ x>=0;\ x\-=1)<Tab>\\in :call C_CodeFor("down", "a")<CR>'
- exe "vmenu ".s:Idioms.'.for(x=&n-1;\ x>=0;\ x\-=1)<Tab>\\in <Esc>:call C_CodeFor("down", "v")<CR>'
- exe "imenu ".s:Idioms.'.for(x=&n-1;\ x>=0;\ x\-=1)<Tab>\\in <Esc>:call C_CodeFor("down", "a")<CR>i'
-
- exe "amenu ".s:Idioms.'.-SEP2- :'
- exe "amenu <silent> ".s:Idioms.'.&enum<Tab>\\ie :call C_InsertTemplate("idioms.enum")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.&enum<Tab>\\ie <Esc>:call C_InsertTemplate("idioms.enum" , "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.&enum<Tab>\\ie <Esc>:call C_InsertTemplate("idioms.enum" )<CR>'
- exe "amenu <silent> ".s:Idioms.'.&struct<Tab>\\is :call C_InsertTemplate("idioms.struct")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.&struct<Tab>\\is <Esc>:call C_InsertTemplate("idioms.struct", "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.&struct<Tab>\\is <Esc>:call C_InsertTemplate("idioms.struct")<CR>'
- exe "amenu <silent> ".s:Idioms.'.&union<Tab>\\iu :call C_InsertTemplate("idioms.union")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.&union<Tab>\\iu <Esc>:call C_InsertTemplate("idioms.union" , "v")<CR>'
- exe "imenu <silent> ".s:Idioms.'.&union<Tab>\\iu <Esc>:call C_InsertTemplate("idioms.union" )<CR>'
- exe "amenu ".s:Idioms.'.-SEP3- :'
- "
- exe "amenu <silent> ".s:Idioms.'.scanf<Tab>\\isc :call C_InsertTemplate("idioms.scanf")<CR>'
- exe "imenu <silent> ".s:Idioms.'.scanf<Tab>\\isc <Esc>:call C_InsertTemplate("idioms.scanf")<CR>'
- exe "amenu <silent> ".s:Idioms.'.printf<Tab>\\ip :call C_InsertTemplate("idioms.printf")<CR>'
- exe "imenu <silent> ".s:Idioms.'.printf<Tab>\\ip <Esc>:call C_InsertTemplate("idioms.printf")<CR>'
- "
- exe "amenu ".s:Idioms.'.-SEP4- :'
- exe "amenu <silent> ".s:Idioms.'.p=ca&lloc\(n,sizeof(type)\)<Tab>\\ica :call C_InsertTemplate("idioms.calloc")<CR>'
- exe "imenu <silent> ".s:Idioms.'.p=ca&lloc\(n,sizeof(type)\)<Tab>\\ica <Esc>:call C_InsertTemplate("idioms.calloc")<CR>'
- exe "amenu <silent> ".s:Idioms.'.p=m&alloc\(sizeof(type)\)<Tab>\\ima :call C_InsertTemplate("idioms.malloc")<CR>'
- exe "imenu <silent> ".s:Idioms.'.p=m&alloc\(sizeof(type)\)<Tab>\\ima <Esc>:call C_InsertTemplate("idioms.malloc")<CR>'
- "
- exe "anoremenu <silent> ".s:Idioms.'.si&zeof(\ \)<Tab>\\isi :call C_InsertTemplate("idioms.sizeof")<CR>'
- exe "inoremenu <silent> ".s:Idioms.'.si&zeof(\ \)<Tab>\\isi <Esc>:call C_InsertTemplate("idioms.sizeof")<CR>'
- exe "vnoremenu <silent> ".s:Idioms.'.si&zeof(\ \)<Tab>\\isi <Esc>:call C_InsertTemplate("idioms.sizeof", "v")<CR>'
- "
- exe "anoremenu <silent> ".s:Idioms.'.asse&rt(\ \)<Tab>\\ias :call C_InsertTemplate("idioms.assert")<CR>'
- exe "inoremenu <silent> ".s:Idioms.'.asse&rt(\ \)<Tab>\\ias <Esc>:call C_InsertTemplate("idioms.assert")<CR>'
- exe "vnoremenu <silent> ".s:Idioms.'.asse&rt(\ \)<Tab>\\ias <Esc>:call C_InsertTemplate("idioms.assert", "v")<CR>'
-
- exe "amenu ".s:Idioms.'.-SEP5- :'
- exe "amenu <silent> ".s:Idioms.'.open\ &input\ file<Tab>\\ii :call C_InsertTemplate("idioms.open-input-file")<CR>'
- exe "imenu <silent> ".s:Idioms.'.open\ &input\ file<Tab>\\ii <Esc>:call C_InsertTemplate("idioms.open-input-file")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.open\ &input\ file<Tab>\\ii <Esc>:call C_InsertTemplate("idioms.open-input-file", "v")<CR>'
- exe "amenu <silent> ".s:Idioms.'.open\ &output\ file<Tab>\\io :call C_InsertTemplate("idioms.open-output-file")<CR>'
- exe "imenu <silent> ".s:Idioms.'.open\ &output\ file<Tab>\\io <Esc>:call C_InsertTemplate("idioms.open-output-file")<CR>'
- exe "vmenu <silent> ".s:Idioms.'.open\ &output\ file<Tab>\\io <Esc>:call C_InsertTemplate("idioms.open-output-file", "v")<CR>'
- "
- exe "amenu <silent> ".s:Idioms.'.fscanf :call C_InsertTemplate("idioms.fscanf")<CR>'
- exe "imenu <silent> ".s:Idioms.'.fscanf <Esc>:call C_InsertTemplate("idioms.fscanf")<CR>'
- exe "amenu <silent> ".s:Idioms.'.fprintf :call C_InsertTemplate("idioms.fprintf")<CR>'
- exe "imenu <silent> ".s:Idioms.'.fprintf <Esc>:call C_InsertTemplate("idioms.fprintf")<CR>'
- "
- "===============================================================================================
- "----- Menu : C-Preprocessor ---------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Preprocessor.'.&Preprocessor<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Preprocessor.'.-Sep00- <Nop>'
- endif
- "
- "----- Submenu : C-Idioms: standard library -------------------------------------------------------
- "'
- exe "amenu ".s:Preprocessor.'.#include\ &Std\.Lib\.<Tab>\\ps.Std\.Lib\.<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Preprocessor.'.#include\ &Std\.Lib\.<Tab>\\ps.-Sep0- <Nop>'
- call C_CIncludeMenus ( s:Preprocessor.'.#include\ &Std\.Lib\.<Tab>\\ps', s:C_StandardLibs )
- "
- exe "anoremenu ".s:Preprocessor.'.#include\ C&99<Tab>\\pc.C99<Tab>C\/C\+\+ <Nop>'
- exe "anoremenu ".s:Preprocessor.'.#include\ C&99<Tab>\\pc.-Sep0- <Nop>'
- call C_CIncludeMenus ( s:Preprocessor.'.#include\ C&99<Tab>\\pc', s:C_C99Libs )
- "
- exe "amenu ".s:Preprocessor.'.-SEP2- :'
- exe "anoremenu ".s:Preprocessor.'.#include\ &\<\.\.\.\><Tab>\\p< :call C_InsertTemplate("preprocessor.include-global")<CR>'
- exe "inoremenu ".s:Preprocessor.'.#include\ &\<\.\.\.\><Tab>\\p< <Esc>:call C_InsertTemplate("preprocessor.include-global")<CR>'
- exe "anoremenu ".s:Preprocessor.'.#include\ &\"\.\.\.\"<Tab>\\p" :call C_InsertTemplate("preprocessor.include-local")<CR>'
- exe "inoremenu ".s:Preprocessor.'.#include\ &\"\.\.\.\"<Tab>\\p" <Esc>:call C_InsertTemplate("preprocessor.include-local")<CR>'
- exe "amenu ".s:Preprocessor.'.#&define<Tab>\\pd :call C_InsertTemplate("preprocessor.define")<CR>'
- exe "imenu ".s:Preprocessor.'.#&define<Tab>\\pd <Esc>:call C_InsertTemplate("preprocessor.define")<CR>'
- exe "amenu ".s:Preprocessor.'.&#undef<Tab>\\pu :call C_InsertTemplate("preprocessor.undefine")<CR>'
- exe "imenu ".s:Preprocessor.'.&#undef<Tab>\\pu <Esc>:call C_InsertTemplate("preprocessor.undefine")<CR>'
- "
- exe "amenu ".s:Preprocessor.'.#&if\ #else\ #endif<Tab>\\pie :call C_InsertTemplate("preprocessor.if-else-endif")<CR>'
- exe "imenu ".s:Preprocessor.'.#&if\ #else\ #endif<Tab>\\pie <Esc>:call C_InsertTemplate("preprocessor.if-else-endif")<CR>'
- exe "vmenu ".s:Preprocessor.'.#&if\ #else\ #endif<Tab>\\pie <Esc>:call C_InsertTemplate("preprocessor.if-else-endif", "v")<CR>'
- exe "amenu ".s:Preprocessor.'.#i&fdef\ #else\ #endif<Tab>\\pid :call C_InsertTemplate("preprocessor.ifdef-else-endif")<CR>'
- exe "imenu ".s:Preprocessor.'.#i&fdef\ #else\ #endif<Tab>\\pid <Esc>:call C_InsertTemplate("preprocessor.ifdef-else-endif")<CR>'
- exe "vmenu ".s:Preprocessor.'.#i&fdef\ #else\ #endif<Tab>\\pid <Esc>:call C_InsertTemplate("preprocessor.ifdef-else-endif", "v")<CR>'
- exe "amenu ".s:Preprocessor.'.#if&ndef\ #else\ #endif<Tab>\\pin :call C_InsertTemplate("preprocessor.ifndef-else-endif")<CR>'
- exe "imenu ".s:Preprocessor.'.#if&ndef\ #else\ #endif<Tab>\\pin <Esc>:call C_InsertTemplate("preprocessor.ifndef-else-endif")<CR>'
- exe "vmenu ".s:Preprocessor.'.#if&ndef\ #else\ #endif<Tab>\\pin <Esc>:call C_InsertTemplate("preprocessor.ifndef-else-endif", "v")<CR>'
- exe "amenu ".s:Preprocessor.'.#ifnd&ef\ #def\ #endif<Tab>\\pind :call C_InsertTemplate("preprocessor.ifndef-def-endif")<CR>'
- exe "imenu ".s:Preprocessor.'.#ifnd&ef\ #def\ #endif<Tab>\\pind <Esc>:call C_InsertTemplate("preprocessor.ifndef-def-endif")<CR>'
- exe "vmenu ".s:Preprocessor.'.#ifnd&ef\ #def\ #endif<Tab>\\pind <Esc>:call C_InsertTemplate("preprocessor.ifndef-def-endif", "v")<CR>'
-
- exe "amenu ".s:Preprocessor.'.#if\ &0\ #endif<Tab>\\pi0 :call C_PPIf0("a")<CR>2ji'
- exe "imenu ".s:Preprocessor.'.#if\ &0\ #endif<Tab>\\pi0 <Esc>:call C_PPIf0("a")<CR>2ji'
- exe "vmenu ".s:Preprocessor.'.#if\ &0\ #endif<Tab>\\pi0 <Esc>:call C_PPIf0("v")<CR>'
- "
- exe "amenu <silent> ".s:Preprocessor.'.&remove\ #if\ 0\ #endif<Tab>\\pr0 :call C_PPIf0Remove()<CR>'
- exe "imenu <silent> ".s:Preprocessor.'.&remove\ #if\ 0\ #endif<Tab>\\pr0 <Esc>:call C_PPIf0Remove()<CR>'
- "
- exe "amenu ".s:Preprocessor.'.#err&or<Tab>\\pe :call C_InsertTemplate("preprocessor.error")<CR>'
- exe "imenu ".s:Preprocessor.'.#err&or<Tab>\\pe <C-C>:call C_InsertTemplate("preprocessor.error")<CR>'
- exe "amenu ".s:Preprocessor.'.#&line<Tab>\\pl :call C_InsertTemplate("preprocessor.line")<CR>'
- exe "imenu ".s:Preprocessor.'.#&line<Tab>\\pl <C-C>:call C_InsertTemplate("preprocessor.line")<CR>'
- exe "amenu ".s:Preprocessor.'.#&pragma<Tab>\\pp :call C_InsertTemplate("preprocessor.pragma")<CR>'
- exe "imenu ".s:Preprocessor.'.#&pragma<Tab>\\pp <C-C>:call C_InsertTemplate("preprocessor.pragma")<CR>'
- "
- "===============================================================================================
- "----- Menu : Snippets ---------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Snippets.'.S&nippets<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Snippets.'.-Sep00- <Nop>'
- endif
- if s:C_CodeSnippets != ""
- exe "amenu <silent> ".s:Snippets.'.&read\ code\ snippet<Tab>\\nr :call C_CodeSnippet("r")<CR>'
- exe "imenu <silent> ".s:Snippets.'.&read\ code\ snippet<Tab>\\nr <C-C>:call C_CodeSnippet("r")<CR>'
- exe "amenu <silent> ".s:Snippets.'.&write\ code\ snippet<Tab>\\nw :call C_CodeSnippet("w")<CR>'
- exe "imenu <silent> ".s:Snippets.'.&write\ code\ snippet<Tab>\\nw <C-C>:call C_CodeSnippet("w")<CR>'
- exe "vmenu <silent> ".s:Snippets.'.&write\ code\ snippet<Tab>\\nw <C-C>:call C_CodeSnippet("wv")<CR>'
- exe "amenu <silent> ".s:Snippets.'.&edit\ code\ snippet<Tab>\\ne :call C_CodeSnippet("e")<CR>'
- exe "imenu <silent> ".s:Snippets.'.&edit\ code\ snippet<Tab>\\ne <C-C>:call C_CodeSnippet("e")<CR>'
- exe " menu <silent> ".s:Snippets.'.-SEP1- :'
- endif
- exe " menu <silent> ".s:Snippets.'.&pick\ up\ prototype<Tab>\\np :call C_ProtoPick("n")<CR>'
- exe "imenu <silent> ".s:Snippets.'.&pick\ up\ prototype<Tab>\\np <C-C>:call C_ProtoPick("n")<CR>'
- exe "vmenu <silent> ".s:Snippets.'.&pick\ up\ prototype<Tab>\\np <C-C>:call C_ProtoPick("v")<CR>'
- exe " menu <silent> ".s:Snippets.'.&insert\ prototype(s)<Tab>\\ni :call C_ProtoInsert()<CR>'
- exe "imenu <silent> ".s:Snippets.'.&insert\ prototype(s)<Tab>\\ni <C-C>:call C_ProtoInsert()<CR>'
- exe " menu <silent> ".s:Snippets.'.&clear\ prototype(s)<Tab>\\nc :call C_ProtoClear()<CR>'
- exe "imenu <silent> ".s:Snippets.'.&clear\ prototype(s)<Tab>\\nc <C-C>:call C_ProtoClear()<CR>'
- exe " menu <silent> ".s:Snippets.'.&show\ prototype(s)<Tab>\\ns :call C_ProtoShow()<CR>'
- exe "imenu <silent> ".s:Snippets.'.&show\ prototype(s)<Tab>\\ns <C-C>:call C_ProtoShow()<CR>'
-
- exe " menu <silent> ".s:Snippets.'.-SEP2- :'
- exe "amenu <silent> ".s:Snippets.'.edit\ &local\ templates<Tab>\\ntl :call C_EditTemplates("local")<CR>'
- exe "imenu <silent> ".s:Snippets.'.edit\ &local\ templates<Tab>\\ntl <C-C>:call C_EditTemplates("local")<CR>'
- exe "amenu <silent> ".s:Snippets.'.edit\ &global\ templates<Tab>\\ntg :call C_EditTemplates("global")<CR>'
- exe "imenu <silent> ".s:Snippets.'.edit\ &global\ templates<Tab>\\ntg <C-C>:call C_EditTemplates("global")<CR>'
- exe "amenu <silent> ".s:Snippets.'.reread\ &templates<Tab>\\ntr :call C_RereadTemplates()<CR>'
- exe "imenu <silent> ".s:Snippets.'.reread\ &templates<Tab>\\ntr <C-C>:call C_RereadTemplates()<CR>'
- exe "amenu ".s:Snippets.'.switch\ template\ st&yle<Tab>\\nts :CStyle<Space>'
- exe "imenu ".s:Snippets.'.switch\ template\ st&yle<Tab>\\nts <C-C>:CStyle<Space>'
- "
- "===============================================================================================
- "----- Menu : C++ --------------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Cpp.'.C&\+\+<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.-Sep00- <Nop>'
- endif
- exe "anoremenu ".s:Cpp.'.c&in :call C_InsertTemplate("cpp.cin")<CR>'
- exe "inoremenu ".s:Cpp.'.c&in <Esc>:call C_InsertTemplate("cpp.cin")<CR>'
- exe "anoremenu ".s:Cpp.'.c&out<Tab>\\+co :call C_InsertTemplate("cpp.cout")<CR>'
- exe "inoremenu ".s:Cpp.'.c&out<Tab>\\+co <Esc>:call C_InsertTemplate("cpp.cout")<CR>'
- exe "anoremenu ".s:Cpp.'.<<\ &\"\" :call C_InsertTemplate("cpp.cout-operator")<CR>'
- exe "inoremenu ".s:Cpp.'.<<\ &\"\" <Esc>:call C_InsertTemplate("cpp.cout-operator")<CR>'
- "
- "----- Submenu : C++ : output manipulators -------------------------------------------------------
- "
- exe "amenu ".s:Cpp.'.&output\ manipulators.output\ manip\.<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.&output\ manipulators.-Sep0- <Nop>'
- "
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &boolalpha :call C_InsertTemplate("cpp.output-manipulator-boolalpha")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &dec :call C_InsertTemplate("cpp.output-manipulator-dec")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &endl :call C_InsertTemplate("cpp.output-manipulator-endl")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &fixed :call C_InsertTemplate("cpp.output-manipulator-fixed")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ fl&ush :call C_InsertTemplate("cpp.output-manipulator-flush")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &hex :call C_InsertTemplate("cpp.output-manipulator-hex")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &internal :call C_InsertTemplate("cpp.output-manipulator-internal")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &left :call C_InsertTemplate("cpp.output-manipulator-left")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &oct :call C_InsertTemplate("cpp.output-manipulator-oct")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &right :call C_InsertTemplate("cpp.output-manipulator-right")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ s&cientific :call C_InsertTemplate("cpp.output-manipulator-scientific")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &setbase\(\ \) :call C_InsertTemplate("cpp.output-manipulator-setbase")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ se&tfill\(\ \) :call C_InsertTemplate("cpp.output-manipulator-setfill")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ setiosfla&g\(\ \) :call C_InsertTemplate("cpp.output-manipulator-setiosflags")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ set&precision\(\ \) :call C_InsertTemplate("cpp.output-manipulator-setprecision")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ set&w\(\ \) :call C_InsertTemplate("cpp.output-manipulator-setw")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showb&ase :call C_InsertTemplate("cpp.output-manipulator-showbase")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showpoi&nt :call C_InsertTemplate("cpp.output-manipulator-showpoint")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showpos\ \(&1\) :call C_InsertTemplate("cpp.output-manipulator-showpos")<CR>'
- exe "anoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ uppercase\ \(&2\) :call C_InsertTemplate("cpp.output-manipulator-uppercase")<CR>'
- "
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &boolalpha <Esc>:call C_InsertTemplate("cpp.output-manipulator-boolalpha")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &dec <Esc>:call C_InsertTemplate("cpp.output-manipulator-dec")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &endl <Esc>:call C_InsertTemplate("cpp.output-manipulator-endl")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &fixed <Esc>:call C_InsertTemplate("cpp.output-manipulator-fixed")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ fl&ush <Esc>:call C_InsertTemplate("cpp.output-manipulator-flush")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &hex <Esc>:call C_InsertTemplate("cpp.output-manipulator-hex")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &internal <Esc>:call C_InsertTemplate("cpp.output-manipulator-internal")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &left <Esc>:call C_InsertTemplate("cpp.output-manipulator-left")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &oct <Esc>:call C_InsertTemplate("cpp.output-manipulator-oct")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &right <Esc>:call C_InsertTemplate("cpp.output-manipulator-right")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ s&cientific <Esc>:call C_InsertTemplate("cpp.output-manipulator-scientific")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ &setbase\(\ \) <Esc>:call C_InsertTemplate("cpp.output-manipulator-setbase")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ se&tfill\(\ \) <Esc>:call C_InsertTemplate("cpp.output-manipulator-setfill")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ setiosfla&g\(\ \) <Esc>:call C_InsertTemplate("cpp.output-manipulator-setiosflags")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ set&precision\(\ \) <Esc>:call C_InsertTemplate("cpp.output-manipulator-setprecision")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ set&w\(\ \) <Esc>:call C_InsertTemplate("cpp.output-manipulator-setw")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showb&ase <Esc>:call C_InsertTemplate("cpp.output-manipulator-showbase")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showpoi&nt <Esc>:call C_InsertTemplate("cpp.output-manipulator-showpoint")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ showpos\ \(&1\) <Esc>:call C_InsertTemplate("cpp.output-manipulator-showpos")<CR>'
- exe "inoremenu ".s:Cpp.'.&output\ manipulators.\<\<\ uppercase\ \(&2\) <Esc>:call C_InsertTemplate("cpp.output-manipulator-uppercase")<CR>'
- "
- "----- Submenu : C++ : ios flag bits -------------------------------------------------------------
- "
- exe "amenu ".s:Cpp.'.ios\ flag&bits.ios\ flags<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.ios\ flag&bits.-Sep0- <Nop>'
- "
- call C_CIosFlagMenus ( s:Cpp.'.ios\ flag&bits', s:Cpp_IosFlagBits )
- "
- "----- Submenu : C++ library (algorithm - locale) ----------------------------------------------
- "
- exe "amenu ".s:Cpp.'.&#include\ <alg\.\.vec><Tab>\\+ps.alg\.\.vec<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.&#include\ <alg\.\.vec><Tab>\\+ps.-Sep0- <Nop>'
- call C_CIncludeMenus ( s:Cpp.'.&#include\ <alg\.\.vec><Tab>\\+ps', s:Cpp_StandardLibs )
- "
- "----- Submenu : C library (cassert - ctime) -------------------------------------------------
- "
- exe "amenu ".s:Cpp.'.&#include\ <cX><Tab>\\+pc.cX<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.&#include\ <cX><Tab>\\+pc.-Sep0- <Nop>'
- call C_CIncludeMenus ( s:Cpp.'.&#include\ <cX><Tab>\\+pc', s:Cpp_CStandardLibs )
- "
- "----- End Submenu : C library (cassert - ctime) ---------------------------------------------
- "
- exe "amenu <silent> ".s:Cpp.'.-SEP2- :'
-
- exe "amenu <silent> ".s:Cpp.'.&class<Tab>\\+c :call C_InsertTemplate("cpp.class-definition")<CR>'
- exe "imenu <silent> ".s:Cpp.'.&class<Tab>\\+c <Esc>:call C_InsertTemplate("cpp.class-definition")<CR>'
- exe "amenu <silent> ".s:Cpp.'.class\ (w\.\ &new)<Tab>\\+cn :call C_InsertTemplate("cpp.class-using-new-definition")<CR>'
- exe "imenu <silent> ".s:Cpp.'.class\ (w\.\ &new)<Tab>\\+cn <Esc>:call C_InsertTemplate("cpp.class-using-new-definition")<CR>'
- exe "amenu <silent> ".s:Cpp.'.&templ\.\ class<Tab>\\+tc :call C_InsertTemplate("cpp.template-class-definition")<CR>'
- exe "imenu <silent> ".s:Cpp.'.&templ\.\ class<Tab>\\+tc <Esc>:call C_InsertTemplate("cpp.template-class-definition")<CR>'
- exe "amenu <silent> ".s:Cpp.'.templ\.\ class\ (w\.\ ne&w)<Tab>\\+tcn :call C_InsertTemplate("cpp.template-class-using-new-definition")<CR>'
- exe "imenu <silent> ".s:Cpp.'.templ\.\ class\ (w\.\ ne&w)<Tab>\\+tcn <Esc>:call C_InsertTemplate("cpp.template-class-using-new-definition")<CR>'
-
- "
- "----- Submenu : C++ : IMPLEMENTATION -------------------------------------------------------
- "
- exe "amenu ".s:Cpp.'.IM&PLEMENTATION.IMPLEMENT\.<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.IM&PLEMENTATION.-Sep0- <Nop>'
- "
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&class<Tab>\\+ci :call C_InsertTemplate("cpp.class-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&class<Tab>\\+ci <Esc>:call C_InsertTemplate("cpp.class-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.class\ (w\.\ &new)<Tab>\\+cni :call C_InsertTemplate("cpp.class-using-new-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.class\ (w\.\ &new)<Tab>\\+cni <Esc>:call C_InsertTemplate("cpp.class-using-new-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&method<Tab>\\+mi :call C_InsertTemplate("cpp.method-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&method<Tab>\\+mi <Esc>:call C_InsertTemplate("cpp.method-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&accessor<Tab>\\+ai :call C_InsertTemplate("cpp.accessor-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&accessor<Tab>\\+ai <Esc>:call C_InsertTemplate("cpp.accessor-implementation")<CR>'
- "
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.-SEP21- :'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&templ\.\ class<Tab>\\+tci <Esc>:call C_InsertTemplate("cpp.template-class-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.&templ\.\ class<Tab>\\+tci :call C_InsertTemplate("cpp.template-class-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ class\ (w\.\ ne&w)<Tab>\\+tcni <Esc>:call C_InsertTemplate("cpp.template-class-using-new-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ class\ (w\.\ ne&w)<Tab>\\+tcni :call C_InsertTemplate("cpp.template-class-using-new-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ m&ethod<Tab>\\+tmi :call C_InsertTemplate("cpp.template-method-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ m&ethod<Tab>\\+tmi <Esc>:call C_InsertTemplate("cpp.template-method-implementation")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ a&ccessor<Tab>\\+tai :call C_InsertTemplate("cpp.template-accessor-implementation")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.templ\.\ a&ccessor<Tab>\\+tai <Esc>:call C_InsertTemplate("cpp.template-accessor-implementation")<CR>'
- "
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.-SEP22- :'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.operator\ &<< :call C_InsertTemplate("cpp.operator-in")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.operator\ &<< <Esc>:call C_InsertTemplate("cpp.operator-in")<CR>'
- exe "amenu <silent> ".s:Cpp.'.IM&PLEMENTATION.operator\ &>> :call C_InsertTemplate("cpp.operator-out")<CR>'
- exe "imenu <silent> ".s:Cpp.'.IM&PLEMENTATION.operator\ &>> <Esc>:call C_InsertTemplate("cpp.operator-out")<CR>'
- "
- "----- End Submenu : C++ : IMPLEMENTATION -------------------------------------------------------
- "
- exe "amenu <silent> ".s:Cpp.'.-SEP31- :'
- exe "amenu <silent> ".s:Cpp.'.templ\.\ &function<Tab>\\+tf :call C_InsertTemplate("cpp.template-function")<CR>'
- exe "imenu <silent> ".s:Cpp.'.templ\.\ &function<Tab>\\+tf <Esc>:call C_InsertTemplate("cpp.template-function")<CR>'
- exe "amenu <silent> ".s:Cpp.'.&error\ class<Tab>\\+ec :call C_InsertTemplate("cpp.error-class")<CR>'
- exe "imenu <silent> ".s:Cpp.'.&error\ class<Tab>\\+ec <Esc>:call C_InsertTemplate("cpp.error-class")<CR>'
-
- exe "amenu <silent> ".s:Cpp.'.-SEP5- :'
- exe "amenu <silent> ".s:Cpp.'.tr&y\ \.\.\ catch<Tab>\\+tr :call C_InsertTemplate("cpp.try-catch")<CR>'
- exe "imenu <silent> ".s:Cpp.'.tr&y\ \.\.\ catch<Tab>\\+tr <Esc>:call C_InsertTemplate("cpp.try-catch")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.tr&y\ \.\.\ catch<Tab>\\+tr <Esc>:call C_InsertTemplate("cpp.try-catch", "v")<CR>'
- exe "amenu <silent> ".s:Cpp.'.catc&h<Tab>\\+ca :call C_InsertTemplate("cpp.catch")<CR>'
- exe "imenu <silent> ".s:Cpp.'.catc&h<Tab>\\+ca <Esc>:call C_InsertTemplate("cpp.catch")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.catc&h<Tab>\\+ca <Esc>:call C_InsertTemplate("cpp.catch", "v")<CR>'
-
- exe "amenu <silent> ".s:Cpp.'.catch\(&\.\.\.\)<Tab>\\+c\. :call C_InsertTemplate("cpp.catch-points")<CR>'
- exe "imenu <silent> ".s:Cpp.'.catch\(&\.\.\.\)<Tab>\\+c\. <Esc>:call C_InsertTemplate("cpp.catch-points")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.catch\(&\.\.\.\)<Tab>\\+c\. <Esc>:call C_InsertTemplate("cpp.catch-points", "v")<CR>'
-
- exe "amenu <silent> ".s:Cpp.'.-SEP6- :'
- exe "amenu <silent> ".s:Cpp.'.open\ input\ file\ \ \(&4\) :call C_InsertTemplate("cpp.open-input-file")<CR>'
- exe "imenu <silent> ".s:Cpp.'.open\ input\ file\ \ \(&4\) <Esc>:call C_InsertTemplate("cpp.open-input-file")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.open\ input\ file\ \ \(&4\) <Esc>:call C_InsertTemplate("cpp.open-input-file", "v")<CR>'
- exe "amenu <silent> ".s:Cpp.'.open\ output\ file\ \(&5\) :call C_InsertTemplate("cpp.open-output-file")<CR>'
- exe "imenu <silent> ".s:Cpp.'.open\ output\ file\ \(&5\) <Esc>:call C_InsertTemplate("cpp.open-output-file")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.open\ output\ file\ \(&5\) <Esc>:call C_InsertTemplate("cpp.open-output-file", "v")<CR>'
- exe "amenu <silent> ".s:Cpp.'.-SEP7- :'
-
- exe "amenu <silent> ".s:Cpp.'.&using\ namespace\ std; :call C_InsertTemplate("cpp.namespace-std")<CR>'
- exe "imenu <silent> ".s:Cpp.'.&using\ namespace\ std; <Esc>:call C_InsertTemplate("cpp.namespace-std")<CR>'
- exe "amenu <silent> ".s:Cpp.'.u&sing\ namespace\ ???; :call C_InsertTemplate("cpp.namespace")<CR>'
- exe "imenu <silent> ".s:Cpp.'.u&sing\ namespace\ ???; <Esc>:call C_InsertTemplate("cpp.namespace")<CR>'
-
- exe "amenu <silent> ".s:Cpp.'.names&pace\ ???\ \{\ \} :call C_InsertTemplate("cpp.namespace-block")<CR>'
- exe "imenu <silent> ".s:Cpp.'.names&pace\ ???\ \{\ \} <Esc>:call C_InsertTemplate("cpp.namespace-block")<CR>'
- exe "vmenu <silent> ".s:Cpp.'.names&pace\ ???\ \{\ \} <Esc>:call C_InsertTemplate("cpp.namespace-block", "v")<CR>'
- exe "amenu <silent> ".s:Cpp.'.namespace\ &alias\ =\ ??? :call C_InsertTemplate("cpp.namespace-alias")<CR>'
- exe "imenu <silent> ".s:Cpp.'.namespace\ &alias\ =\ ??? <Esc>:call C_InsertTemplate("cpp.namespace-alias")<CR>'
-
- exe "amenu <silent> ".s:Cpp.'.-SEP8- :'
- "
- "----- Submenu : RTTI ----------------------------------------------------------------------------
- "
- exe "amenu ".s:Cpp.'.&RTTI.RTTI<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Cpp.'.&RTTI.-Sep0- <Nop>'
- "
- exe "anoremenu ".s:Cpp.'.&RTTI.&typeid :call C_InsertTemplate("cpp.rtti-typeid")<CR>'
- exe "anoremenu ".s:Cpp.'.&RTTI.&static_cast :call C_InsertTemplate("cpp.rtti-static-cast")<CR>'
- exe "anoremenu ".s:Cpp.'.&RTTI.&const_cast :call C_InsertTemplate("cpp.rtti-const-cast")<CR>'
- exe "anoremenu ".s:Cpp.'.&RTTI.&reinterpret_cast :call C_InsertTemplate("cpp.rtti-reinterpret-cast")<CR>'
- exe "anoremenu ".s:Cpp.'.&RTTI.&dynamic_cast :call C_InsertTemplate("cpp.rtti-dynamic-cast")<CR>'
- "
- exe "inoremenu ".s:Cpp.'.&RTTI.&typeid <Esc>:call C_InsertTemplate("cpp.rtti-typeid")<CR>'
- exe "inoremenu ".s:Cpp.'.&RTTI.&static_cast <Esc>:call C_InsertTemplate("cpp.rtti-static-cast")<CR>'
- exe "inoremenu ".s:Cpp.'.&RTTI.&const_cast <Esc>:call C_InsertTemplate("cpp.rtti-const-cast")<CR>'
- exe "inoremenu ".s:Cpp.'.&RTTI.&reinterpret_cast <Esc>:call C_InsertTemplate("cpp.rtti-reinterpret-cast")<CR>'
- exe "inoremenu ".s:Cpp.'.&RTTI.&dynamic_cast <Esc>:call C_InsertTemplate("cpp.rtti-dynamic-cast")<CR>'
- "
- exe "vnoremenu ".s:Cpp.'.&RTTI.&typeid <Esc>:call C_InsertTemplate("cpp.rtti-typeid", "v")<CR>'
- exe "vnoremenu ".s:Cpp.'.&RTTI.&static_cast <Esc>:call C_InsertTemplate("cpp.rtti-static-cast", "v")<CR>'
- exe "vnoremenu ".s:Cpp.'.&RTTI.&const_cast <Esc>:call C_InsertTemplate("cpp.rtti-const-cast", "v")<CR>'
- exe "vnoremenu ".s:Cpp.'.&RTTI.&reinterpret_cast <Esc>:call C_InsertTemplate("cpp.rtti-reinterpret-cast", "v")<CR>'
- exe "vnoremenu ".s:Cpp.'.&RTTI.&dynamic_cast <Esc>:call C_InsertTemplate("cpp.rtti-dynamic-cast", "v")<CR>'
- "
- "----- End Submenu : RTTI ------------------------------------------------------------------------
- "
- exe "amenu <silent>".s:Cpp.'.e&xtern\ \"C\"\ \{\ \} :call C_InsertTemplate("cpp.extern")<CR>'
- exe "imenu <silent>".s:Cpp.'.e&xtern\ \"C\"\ \{\ \} <Esc>:call C_InsertTemplate("cpp.extern")<CR>'
- exe "vmenu <silent>".s:Cpp.'.e&xtern\ \"C\"\ \{\ \} <Esc>:call C_InsertTemplate("cpp.extern", "v")<CR>'
- "
- "===============================================================================================
- "----- Menu : run ----- -------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_MenuHeader == 'yes'
- exe "amenu ".s:Run.'.&Run<Tab>C\/C\+\+ <Nop>'
- exe "amenu ".s:Run.'.-Sep00- <Nop>'
- endif
- "
- exe "amenu <silent> ".s:Run.'.save\ and\ &compile<Tab>\\rc\ \ \<A-F9\> :call C_Compile()<CR>:call C_HlMessage()<CR>'
- exe "imenu <silent> ".s:Run.'.save\ and\ &compile<Tab>\\rc\ \ \<A-F9\> <C-C>:call C_Compile()<CR>:call C_HlMessage()<CR>'
- exe "amenu <silent> ".s:Run.'.&link<Tab>\\rl\ \ \ \ \<F9\> :call C_Link()<CR>:call C_HlMessage()<CR>'
- exe "imenu <silent> ".s:Run.'.&link<Tab>\\rl\ \ \ \ \<F9\> <C-C>:call C_Link()<CR>:call C_HlMessage()<CR>'
- exe "amenu <silent> ".s:Run.'.&run<Tab>\\rr\ \ \<C-F9\> :call C_Run()<CR>'
- exe "imenu <silent> ".s:Run.'.&run<Tab>\\rr\ \ \<C-F9\> <C-C>:call C_Run()<CR>'
- exe "amenu <silent> ".s:Run.'.cmd\.\ line\ &arg\.<Tab>\\ra\ \ \<S-F9\> :call C_Arguments()<CR>'
- exe "imenu <silent> ".s:Run.'.cmd\.\ line\ &arg\.<Tab>\\ra\ \ \<S-F9\> <C-C>:call C_Arguments()<CR>'
- "
- exe "amenu <silent> ".s:Run.'.-SEP0- :'
- exe "amenu <silent> ".s:Run.'.&make<Tab>\\rm :call C_Make()<CR>'
- exe "imenu <silent> ".s:Run.'.&make<Tab>\\rm <C-C>:call C_Make()<CR>'
- exe "amenu <silent> ".s:Run.'.cmd\.\ line\ ar&g\.\ for\ make<Tab>\\rg :call C_MakeArguments()<CR>'
- exe "imenu <silent> ".s:Run.'.cmd\.\ line\ ar&g\.\ for\ make<Tab>\\rg <C-C>:call C_MakeArguments()<CR>'
- "
- exe "amenu <silent> ".s:Run.'.-SEP1- :'
- "
- if s:C_SplintIsExecutable==1
- exe "amenu <silent> ".s:Run.'.s&plint<Tab>\\rp :call C_SplintCheck()<CR>:call C_HlMessage()<CR>'
- exe "imenu <silent> ".s:Run.'.s&plint<Tab>\\rp <C-C>:call C_SplintCheck()<CR>:call C_HlMessage()<CR>'
- exe "amenu <silent> ".s:Run.'.cmd\.\ line\ arg\.\ for\ spl&int<Tab>\\ri :call C_SplintArguments()<CR>'
- exe "imenu <silent> ".s:Run.'.cmd\.\ line\ arg\.\ for\ spl&int<Tab>\\ri <C-C>:call C_SplintArguments()<CR>'
- exe "amenu <silent> ".s:Run.'.-SEP2- :'
- endif
- "
- if s:C_CodeCheckIsExecutable==1
- exe "amenu <silent> ".s:Run.'.CodeChec&k<Tab>\\rk :call C_CodeCheck()<CR>:call C_HlMessage()<CR>'
- exe "imenu <silent> ".s:Run.'.CodeChec&k<Tab>\\rk <C-C>:call C_CodeCheck()<CR>:call C_HlMessage()<CR>'
- exe "amenu <silent> ".s:Run.'.cmd\.\ line\ arg\.\ for\ Cod&eCheck<Tab>\\re :call C_CodeCheckArguments()<CR>'
- exe "imenu <silent> ".s:Run.'.cmd\.\ line\ arg\.\ for\ Cod&eCheck<Tab>\\re <C-C>:call C_CodeCheckArguments()<CR>'
- exe "amenu <silent> ".s:Run.'.-SEP3- :'
- endif
- "
- exe "amenu <silent> ".s:Run.'.in&dent<Tab>\\rd :call C_Indent()<CR>'
- exe "imenu <silent> ".s:Run.'.in&dent<Tab>\\rd <C-C>:call C_Indent()<CR>'
- if s:MSWIN
- exe "amenu <silent> ".s:Run.'.&hardcopy\ to\ printer<Tab>\\rh :call C_Hardcopy("n")<CR>'
- exe "imenu <silent> ".s:Run.'.&hardcopy\ to\ printer<Tab>\\rh <C-C>:call C_Hardcopy("n")<CR>'
- exe "vmenu <silent> ".s:Run.'.&hardcopy\ to\ printer<Tab>\\rh <C-C>:call C_Hardcopy("v")<CR>'
- else
- exe "amenu <silent> ".s:Run.'.&hardcopy\ to\ FILENAME\.ps<Tab>\\rh :call C_Hardcopy("n")<CR>'
- exe "imenu <silent> ".s:Run.'.&hardcopy\ to\ FILENAME\.ps<Tab>\\rh <C-C>:call C_Hardcopy("n")<CR>'
- exe "vmenu <silent> ".s:Run.'.&hardcopy\ to\ FILENAME\.ps<Tab>\\rh <C-C>:call C_Hardcopy("v")<CR>'
- endif
- exe "imenu <silent> ".s:Run.'.-SEP4- :'
-
- exe "amenu <silent> ".s:Run.'.&settings<Tab>\\rs :call C_Settings()<CR>'
- exe "imenu <silent> ".s:Run.'.&settings<Tab>\\rs <C-C>:call C_Settings()<CR>'
- exe "imenu <silent> ".s:Run.'.-SEP5- :'
-
- if !s:MSWIN
- exe "amenu <silent> ".s:Run.'.&xterm\ size<Tab>\\rx :call C_XtermSize()<CR>'
- exe "imenu <silent> ".s:Run.'.&xterm\ size<Tab>\\rx <C-C>:call C_XtermSize()<CR>'
- endif
- if s:C_OutputGvim == "vim"
- exe "amenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm<Tab>\\ro :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm<Tab>\\ro <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- else
- if s:C_OutputGvim == "buffer"
- exe "amenu <silent> ".s:Run.'.&output:\ BUFFER->xterm->vim<Tab>\\ro :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ BUFFER->xterm->vim<Tab>\\ro <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- else
- exe "amenu <silent> ".s:Run.'.&output:\ XTERM->vim->buffer<Tab>\\ro :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ XTERM->vim->buffer<Tab>\\ro <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- endif
- endif
- "
- "===============================================================================================
- "----- Menu : help ------------------------------------------------------- {{{2
- "===============================================================================================
- "
- if s:C_Root != ""
- exe " menu <silent> ".s:C_Root.'&help\ (C-Support)<Tab>\\hp :call C_HelpCsupport()<CR>'
- exe "imenu <silent> ".s:C_Root.'&help\ (C-Support)<Tab>\\hp <C-C>:call C_HelpCsupport()<CR>'
- exe " menu <silent> ".s:C_Root.'show\ &manual<Tab>\\hm :call C_Help("m")<CR>'
- exe "imenu <silent> ".s:C_Root.'show\ &manual<Tab>\\hm <C-C>:call C_Help("m")<CR>'
- endif
-
-endfunction " ---------- end of function C_InitMenus ----------
-"
-"===============================================================================================
-"----- Menu Functions --------------------------------------------------------------------------
-"===============================================================================================
-"
-let s:C_StandardLibs = [
- \ '&assert\.h' , '&ctype\.h' , '&errno\.h' ,
- \ '&float\.h' , '&limits\.h' , 'l&ocale\.h' ,
- \ '&math\.h' , 'set&jmp\.h' , 's&ignal\.h' ,
- \ 'stdar&g\.h' , 'st&ddef\.h' , '&stdio\.h' ,
- \ 'stdli&b\.h' , 'st&ring\.h' , '&time\.h' ,
- \ ]
-"
-let s:C_C99Libs = [
- \ '&complex\.h', '&fenv\.h', '&inttypes\.h',
- \ 'is&o646\.h', '&stdbool\.h', 's&tdint\.h',
- \ 'tg&math\.h', '&wchar\.h', 'wct&ype\.h',
- \ ]
-"
-let s:Cpp_StandardLibs = [
- \ '&algorithm', '&bitset', '&complex', '&deque',
- \ '&exception', '&fstream', 'f&unctional', 'iomani&p',
- \ '&ios', 'iosf&wd', 'io&stream', 'istrea&m',
- \ 'iterato&r', '&limits', 'lis&t', 'l&ocale',
- \ '&map', 'memor&y', '&new', 'numeri&c',
- \ '&ostream', '&queue', '&set', 'sst&ream',
- \ 'st&ack', 'stde&xcept', 'stream&buf', 'str&ing',
- \ '&typeinfo', '&utility', '&valarray', 'v&ector',
- \ ]
-"
-let s:Cpp_CStandardLibs = [
- \ 'c&assert', 'c&ctype', 'c&errno', 'c&float',
- \ 'c&limits', 'cl&ocale', 'c&math', 'cset&jmp',
- \ 'cs&ignal', 'cstdar&g', 'cst&ddef', 'c&stdio',
- \ 'cstdli&b', 'cst&ring', 'c&time',
- \ ]
-
-let s:Cpp_IosFlagBits = [
- \ 'ios::&adjustfield', 'ios::bas&efield', 'ios::&boolalpha',
- \ 'ios::&dec', 'ios::&fixed', 'ios::floa&tfield',
- \ 'ios::&hex', 'ios::&internal', 'ios::&left',
- \ 'ios::&oct', 'ios::&right', 'ios::s&cientific',
- \ 'ios::sho&wbase', 'ios::showpoint\ \(&1\)', 'ios::show&pos',
- \ 'ios::&skipws', 'ios::u&nitbuf', 'ios::&uppercase',
- \ ]
-
-"------------------------------------------------------------------------------
-" C_CIncludeMenus: generate the C/C++-standard library menu entries {{{1
-"------------------------------------------------------------------------------
-function! C_CIncludeMenus ( menupath, liblist )
- for item in a:liblist
- let replacement = substitute( item, '[&\\]*', '','g' )
- exe "anoremenu ".a:menupath.'.'.item.' o#include<Tab><'.replacement.'>'
- exe "inoremenu ".a:menupath.'.'.item.' <Esc>o#include<Tab><'.replacement.'>'
- endfor
- return
-endfunction " ---------- end of function C_CIncludeMenus ----------
-
-"------------------------------------------------------------------------------
-" C_CIosFlagMenus: generate the C++ ios flags menu entries {{{1
-"------------------------------------------------------------------------------
-function! C_CIosFlagMenus ( menupath, flaglist )
- for item in a:flaglist
- let replacement = substitute( item, '[^[:alpha:]:]', '','g' )
- exe " noremenu ".a:menupath.'.'.item.' i'.replacement
- exe "inoremenu ".a:menupath.'.'.item.' '.replacement
- endfor
- return
-endfunction " ---------- end of function C_CIosFlagMenus ----------
-"
-"------------------------------------------------------------------------------
-" C_Input: Input after a highlighted prompt {{{1
-"------------------------------------------------------------------------------
-function! C_Input ( promp, text, ... )
- echohl Search " highlight prompt
- call inputsave() " preserve typeahead
- if a:0 == 0 || a:1 == ''
- let retval =input( a:promp, a:text )
- else
- let retval =input( a:promp, a:text, a:1 )
- endif
- call inputrestore() " restore typeahead
- echohl None " reset highlighting
- let retval = substitute( retval, '^\s\+', "", "" ) " remove leading whitespaces
- let retval = substitute( retval, '\s\+$', "", "" ) " remove trailing whitespaces
- return retval
-endfunction " ---------- end of function C_Input ----------
-"
-"------------------------------------------------------------------------------
-" C_AdjustLineEndComm: adjust line-end comments {{{1
-"------------------------------------------------------------------------------
-"
-" C comment or C++ comment:
-let s:c_cppcomment= '\(\/\*.\{-}\*\/\|\/\/.*$\)'
-
-function! C_AdjustLineEndComm ( mode ) range
- "
- if !exists("b:C_LineEndCommentColumn")
- let b:C_LineEndCommentColumn = s:C_LineEndCommColDefault
- endif
-
- let save_cursor = getpos(".")
-
- let save_expandtab = &expandtab
- exe ":set expandtab"
-
- if a:mode == 'v'
- let pos0 = line("'<")
- let pos1 = line("'>")
- else
- let pos0 = line(".")
- let pos1 = pos0
- endif
-
- let linenumber = pos0
- exe ":".pos0
-
- while linenumber <= pos1
- let line= getline(".")
-
- " line is not a pure comment but contains one
- "
- if match( line, '^\s*'.s:c_cppcomment ) < 0 && match( line, s:c_cppcomment ) > 0
- "
- " disregard comments starting in a string
- "
- let idx1 = -1
- let idx2 = -1
- let commentstart= -2
- let commentend = 0
- while commentstart < idx2 && idx2 < commentend
- let start = commentend
- let idx2 = match( line, s:c_cppcomment, start )
- let commentstart= match ( line, '"[^"]\+"', start )
- let commentend = matchend( line, '"[^"]\+"', start )
- endwhile
- "
- " try to adjust the comment
- "
- let idx1 = 1 + match( line, '\s*'.s:c_cppcomment, start )
- let idx2 = 1 + idx2
- call setpos(".", [ 0, linenumber, idx1, 0 ] )
- let vpos1 = virtcol(".")
- call setpos(".", [ 0, linenumber, idx2, 0 ] )
- let vpos2 = virtcol(".")
-
- if ! ( vpos2 == b:C_LineEndCommentColumn
- \ || vpos1 > b:C_LineEndCommentColumn
- \ || idx2 == 0 )
-
- exe ":.,.retab"
- " insert some spaces
- if vpos2 < b:C_LineEndCommentColumn
- let diff = b:C_LineEndCommentColumn-vpos2
- call setpos(".", [ 0, linenumber, vpos2, 0 ] )
- let @" = ' '
- exe "normal ".diff."P"
- endif
-
- " remove some spaces
- if vpos1 < b:C_LineEndCommentColumn && vpos2 > b:C_LineEndCommentColumn
- let diff = vpos2 - b:C_LineEndCommentColumn
- call setpos(".", [ 0, linenumber, b:C_LineEndCommentColumn, 0 ] )
- exe "normal ".diff."x"
- endif
-
- endif
- endif
- let linenumber=linenumber+1
- normal j
- endwhile
- "
- " restore tab expansion settings and cursor position
- let &expandtab = save_expandtab
- call setpos('.', save_cursor)
-
-endfunction " ---------- end of function C_AdjustLineEndComm ----------
-"
-"------------------------------------------------------------------------------
-" C_GetLineEndCommCol: get line-end comment position {{{1
-"------------------------------------------------------------------------------
-function! C_GetLineEndCommCol ()
- let actcol = virtcol(".")
- if actcol+1 == virtcol("$")
- let b:C_LineEndCommentColumn = ''
- while match( b:C_LineEndCommentColumn, '^\s*\d\+\s*$' ) < 0
- let b:C_LineEndCommentColumn = C_Input( 'start line-end comment at virtual column : ', actcol, '' )
- endwhile
- else
- let b:C_LineEndCommentColumn = virtcol(".")
- endif
- echomsg "line end comments will start at column ".b:C_LineEndCommentColumn
-endfunction " ---------- end of function C_GetLineEndCommCol ----------
-"
-"------------------------------------------------------------------------------
-" C_LineEndComment: single line-end comment {{{1
-"------------------------------------------------------------------------------
-function! C_LineEndComment ( )
- if !exists("b:C_LineEndCommentColumn")
- let b:C_LineEndCommentColumn = s:C_LineEndCommColDefault
- endif
- " ----- trim whitespaces -----
- exe 's/\s*$//'
- let linelength= virtcol("$") - 1
- if linelength < b:C_LineEndCommentColumn
- let diff = b:C_LineEndCommentColumn -1 -linelength
- exe "normal ".diff."A "
- endif
- " append at least one blank
- if linelength >= b:C_LineEndCommentColumn
- exe "normal A "
- endif
- call C_InsertTemplate('comment.end-of-line-comment')
-endfunction " ---------- end of function C_LineEndComment ----------
-"
-"------------------------------------------------------------------------------
-" C_MultiLineEndComments: multi line-end comments {{{1
-"------------------------------------------------------------------------------
-function! C_MultiLineEndComments ( )
- "
- if !exists("b:C_LineEndCommentColumn")
- let b:C_LineEndCommentColumn = s:C_LineEndCommColDefault
- endif
- "
- let pos0 = line("'<")
- let pos1 = line("'>")
- "
- " ----- trim whitespaces -----
- exe pos0.','.pos1.'s/\s*$//'
- "
- " ----- find the longest line -----
- let maxlength = 0
- normal '<
- for linenumber in range( pos0, pos1 )
- if getline(linenumber) !~ '^\s*$' && maxlength<virtcol("$")
- let maxlength= virtcol("$")
- endif
- endfor
- "
- if maxlength < b:C_LineEndCommentColumn
- let maxlength = b:C_LineEndCommentColumn
- else
- let maxlength = maxlength+1 " at least 1 blank
- endif
- "
- " ----- fill lines with blanks -----
- for linenumber in range( pos0, pos1 )
- exe ":".linenumber
- if getline(linenumber) !~ '^\s*$'
- let diff = maxlength - virtcol("$")
- exe "normal ".diff."A "
- call C_InsertTemplate('comment.end-of-line-comment')
- endif
- endfor
- "
- " ----- back to the begin of the marked block -----
- stopinsert
- normal '<$
- if match( getline("."), '\/\/\s*$' ) < 0
- if search( '\/\*', 'bcW', line(".") ) > 1
- normal l
- endif
- let save_cursor = getpos(".")
- if getline(".")[save_cursor[2]+1] == ' '
- normal l
- endif
- else
- normal $
- endif
-endfunction " ---------- end of function C_MultiLineEndComments ----------
-"
-"------------------------------------------------------------------------------
-" C_Comment_C_SectionAll: Section Comments {{{1
-"------------------------------------------------------------------------------
-"
-function! C_Comment_C_SectionAll ( type )
-
- call C_InsertTemplate("comment.file-section-cpp-header-includes")
- call C_InsertTemplate("comment.file-section-cpp-macros")
- call C_InsertTemplate("comment.file-section-cpp-typedefs")
- call C_InsertTemplate("comment.file-section-cpp-data-types")
- if a:type=="cpp"
- call C_InsertTemplate("comment.file-section-cpp-class-defs")
- endif
- call C_InsertTemplate("comment.file-section-cpp-local-variables")
- call C_InsertTemplate("comment.file-section-cpp-prototypes")
- call C_InsertTemplate("comment.file-section-cpp-function-defs-exported")
- call C_InsertTemplate("comment.file-section-cpp-function-defs-local")
- if a:type=="cpp"
- call C_InsertTemplate("comment.file-section-cpp-class-implementations-exported")
- call C_InsertTemplate("comment.file-section-cpp-class-implementations-local")
- endif
-
-endfunction " ---------- end of function C_Comment_C_SectionAll ----------
-"
-function! C_Comment_H_SectionAll ( type )
-
- call C_InsertTemplate("comment.file-section-hpp-header-includes")
- call C_InsertTemplate("comment.file-section-hpp-macros")
- call C_InsertTemplate("comment.file-section-hpp-exported-typedefs")
- call C_InsertTemplate("comment.file-section-hpp-exported-data-types")
- if a:type=="cpp"
- call C_InsertTemplate("comment.file-section-hpp-exported-class-defs")
- endif
- call C_InsertTemplate("comment.file-section-hpp-exported-variables")
- call C_InsertTemplate("comment.file-section-hpp-exported-function-declarations")
-
-endfunction " ---------- end of function C_Comment_H_SectionAll ----------
-"
-"----------------------------------------------------------------------
-" C_CodeComment : Code -> Comment {{{1
-"----------------------------------------------------------------------
-function! C_CodeComment( mode, style )
-
- if a:mode=="a"
- if a:style == 'yes'
- silent exe ":s#^#/\* #"
- silent put = ' */'
- else
- silent exe ":s#^#//#"
- endif
- endif
-
- if a:mode=="v"
- if a:style == 'yes'
- silent exe ":'<,'>s/^/ \* /"
- silent exe ":'< s'^ '\/'"
- silent exe ":'>"
- silent put = ' */'
- else
- silent exe ":'<,'>s#^#//#"
- endif
- endif
-
-endfunction " ---------- end of function C_CodeComment ----------
-"
-"----------------------------------------------------------------------
-" C_StartMultilineComment : Comment -> Code {{{1
-"----------------------------------------------------------------------
-let s:C_StartMultilineComment = '^\s*\/\*[\*! ]\='
-
-function! C_RemoveCComment( start, end )
-
- if a:end-a:start<1
- return 0 " lines removed
- endif
- "
- " Is the C-comment complete ? Get length.
- "
- let check = getline( a:start ) =~ s:C_StartMultilineComment
- let linenumber = a:start+1
- while linenumber < a:end && getline( linenumber ) !~ '^\s*\*\/'
- let check = check && getline( linenumber ) =~ '^\s*\*[ ]\='
- let linenumber = linenumber+1
- endwhile
- let check = check && getline( linenumber ) =~ '^\s*\*\/'
- "
- " remove a complete comment
- "
- if check
- exe "silent :".a:start.' s/'.s:C_StartMultilineComment.'//'
- let linenumber1 = a:start+1
- while linenumber1 < linenumber
- exe "silent :".linenumber1.' s/^\s*\*[ ]\=//'
- let linenumber1 = linenumber1+1
- endwhile
- exe "silent :".linenumber1.' s/^\s*\*\///'
- endif
-
- return linenumber-a:start+1 " lines removed
-endfunction " ---------- end of function C_RemoveCComment ----------
-"
-"----------------------------------------------------------------------
-" C_CommentCode : Comment -> Code {{{1
-"----------------------------------------------------------------------
-function! C_CommentCode(mode)
- if a:mode=="a"
- let pos1 = line(".")
- let pos2 = pos1
- endif
- if a:mode=="v"
- let pos1 = line("'<")
- let pos2 = line("'>")
- endif
-
- let removed = 0
- "
- let linenumber=pos1
- while linenumber <= pos2
- " Do we have a C++ comment ?
- if getline( linenumber ) =~ '^\s*//'
- exe "silent :".linenumber.' s#^\s*//##'
- let removed = 1
- endif
- " Do we have a C comment ?
- if removed == 0 && getline( linenumber ) =~ s:C_StartMultilineComment
- let removed = C_RemoveCComment(linenumber,pos2)
- endif
-
- if removed!=0
- let linenumber = linenumber+removed
- let removed = 0
- else
- let linenumber = linenumber+1
- endif
- endwhile
-endfunction " ---------- end of function C_CommentCode ----------
-"
-"----------------------------------------------------------------------
-" C_CommentCppToC : C++ Comment -> C Comment {{{1
-" Removes trailing whitespaces.
-"----------------------------------------------------------------------
-function! C_CommentCppToC()
- silent! exe ':s#\/\/\s*\(.*\)\s*$#/* \1 */#'
-endfunction " ---------- end of function C_CommentCppToC ----------
-"
-"----------------------------------------------------------------------
-" C_CommentCToCpp : C Comment -> C++ Comment {{{1
-" Changes the first comment in case of multiple comments:
-" xxxx; /* */ /* */
-" xxxx; // /* */
-" Removes trailing whitespaces.
-"----------------------------------------------------------------------
-function! C_CommentCToCpp()
- silent! exe ':s!\/\*\s*\(.\{-}\)\*\/!\/\/ \1!'
- silent! exe ':s!\s*$!!'
-endfunction " ---------- end of function C_CommentCToCpp ----------
-"
-"=====================================================================================
-"----- Menu : Statements -----------------------------------------------------------
-"=====================================================================================
-"
-"------------------------------------------------------------------------------
-" C_PPIf0 : #if 0 .. #endif {{{1
-"------------------------------------------------------------------------------
-function! C_PPIf0 (mode)
- "
- let s:C_If0_Counter = 0
- let save_line = line(".")
- let actual_line = 0
- "
- " search for the maximum option number (if any)
- "
- normal gg
- while actual_line < search( s:C_If0_Txt."\\d\\+" )
- let actual_line = line(".")
- let actual_opt = matchstr( getline(actual_line), s:C_If0_Txt."\\d\\+" )
- let actual_opt = strpart( actual_opt, strlen(s:C_If0_Txt),strlen(actual_opt)-strlen(s:C_If0_Txt))
- if s:C_If0_Counter < actual_opt
- let s:C_If0_Counter = actual_opt
- endif
- endwhile
- let s:C_If0_Counter = s:C_If0_Counter+1
- silent exe ":".save_line
- "
- if a:mode=='a'
- let zz= "\n#if 0 ".s:C_Com1." ----- #if 0 : ".s:C_If0_Txt.s:C_If0_Counter." ----- ".s:C_Com2."\n"
- let zz= zz."\n#endif ".s:C_Com1." ----- #if 0 : ".s:C_If0_Txt.s:C_If0_Counter." ----- ".s:C_Com2."\n\n"
- put =zz
- normal 4k
- endif
-
- if a:mode=='v'
- let pos1 = line("'<")
- let pos2 = line("'>")
- let zz= "#endif ".s:C_Com1." ----- #if 0 : ".s:C_If0_Txt.s:C_If0_Counter." ----- ".s:C_Com2."\n\n"
- exe ":".pos2."put =zz"
- let zz= "\n#if 0 ".s:C_Com1." ----- #if 0 : ".s:C_If0_Txt.s:C_If0_Counter." ----- ".s:C_Com2."\n"
- exe ":".pos1."put! =zz"
- "
- if &foldenable && foldclosed(".")
- normal zv
- endif
- endif
-
-endfunction " ---------- end of function C_PPIf0 ----------
-"
-"------------------------------------------------------------------------------
-" C_PPIf0Remove : remove #if 0 .. #endif {{{1
-"------------------------------------------------------------------------------
-function! C_PPIf0Remove ()
- "
- " cursor on fold: open fold first
- if &foldenable && foldclosed(".")
- normal zv
- endif
- "
- let frstline = searchpair( '^\s*#if\s\+0', '', '^\s*#endif\>.\+\<If0Label_', 'bn' )
- if frstline<=0
- echohl WarningMsg | echo 'no #if 0 ... #endif found or cursor not inside such a directive'| echohl None
- return
- endif
- let lastline = searchpair( '^\s*#if\s\+0', '', '^\s*#endif\>.\+\<If0Label_', 'n' )
- if lastline<=0
- echohl WarningMsg | echo 'no #if 0 ... #endif found or cursor not inside such a directive'| echohl None
- return
- endif
- let actualnumber1 = matchstr( getline(frstline), s:C_If0_Txt."\\d\\+" )
- let actualnumber2 = matchstr( getline(lastline), s:C_If0_Txt."\\d\\+" )
- if actualnumber1 != actualnumber2
- echohl WarningMsg | echo 'lines '.frstline.', '.lastline.': comment tags do not match'| echohl None
- return
- endif
-
- silent exe ':'.lastline.','.lastline.'d'
- silent exe ':'.frstline.','.frstline.'d'
-
-endfunction " ---------- end of function C_PPIf0Remove ----------
-"
-"-------------------------------------------------------------------------------
-" C_LegalizeName : replace non-word characters by underscores
-" - multiple whitespaces
-" - multiple non-word characters
-" - multiple underscores
-"-------------------------------------------------------------------------------
-function! C_LegalizeName ( name )
- let identifier = substitute( a:name, '\s\+', '_', 'g' )
- let identifier = substitute( identifier, '\W\+', '_', 'g' )
- let identifier = substitute( identifier, '_\+', '_', 'g' )
- return identifier
-endfunction " ---------- end of function C_LegalizeName ----------
-
-"------------------------------------------------------------------------------
-" C_CodeSnippet : read / edit code snippet {{{1
-"------------------------------------------------------------------------------
-function! C_CodeSnippet(mode)
-
- if isdirectory(s:C_CodeSnippets)
- "
- " read snippet file, put content below current line and indent
- "
- if a:mode == "r"
- if has("browse") && s:C_GuiSnippetBrowser == 'gui'
- let l:snippetfile=browse(0,"read a code snippet",s:C_CodeSnippets,"")
- else
- let l:snippetfile=input("read snippet ", s:C_CodeSnippets, "file" )
- endif
- if filereadable(l:snippetfile)
- let linesread= line("$")
- let l:old_cpoptions = &cpoptions " Prevent the alternate buffer from being set to this files
- setlocal cpoptions-=a
- :execute "read ".l:snippetfile
- let &cpoptions = l:old_cpoptions " restore previous options
- let linesread= line("$")-linesread-1
- if linesread>=0 && match( l:snippetfile, '\.\(ni\|noindent\)$' ) < 0
- endif
- endif
- if line(".")==2 && getline(1)=~"^$"
- silent exe ":1,1d"
- endif
- endif
- "
- " update current buffer / split window / edit snippet file
- "
- if a:mode == "e"
- if has("browse") && s:C_GuiSnippetBrowser == 'gui'
- let l:snippetfile = browse(0,"edit a code snippet",s:C_CodeSnippets,"")
- else
- let l:snippetfile=input("edit snippet ", s:C_CodeSnippets, "file" )
- endif
- if l:snippetfile != ""
- :execute "update! | split | edit ".l:snippetfile
- endif
- endif
- "
- " write whole buffer into snippet file
- "
- if a:mode == "w" || a:mode == "wv"
- if has("browse") && s:C_GuiSnippetBrowser == 'gui'
- let l:snippetfile = browse(0,"write a code snippet",s:C_CodeSnippets,"")
- else
- let l:snippetfile=input("write snippet ", s:C_CodeSnippets, "file" )
- endif
- if l:snippetfile != ""
- if filereadable(l:snippetfile)
- if confirm("File ".l:snippetfile." exists ! Overwrite ? ", "&Cancel\n&No\n&Yes") != 3
- return
- endif
- endif
- if a:mode == "w"
- :execute ":write! ".l:snippetfile
- else
- :execute ":*write! ".l:snippetfile
- endif
- endif
- endif
-
- else
- echo "code snippet directory ".s:C_CodeSnippets." does not exist (please create it)"
- endif
-endfunction " ---------- end of function C_CodeSnippets ----------
-"
-"------------------------------------------------------------------------------
-" C_help : builtin completion {{{1
-"------------------------------------------------------------------------------
-function! C_ForTypeComplete ( ArgLead, CmdLine, CursorPos )
- "
- " show all types
- if a:ArgLead == ''
- return s:C_ForTypes
- endif
- "
- " show types beginning with a:ArgLead
- let expansions = []
- for item in s:C_ForTypes
- if match( item, '\<'.a:ArgLead.'\w*' ) == 0
- call add( expansions, item )
- endif
- endfor
- return expansions
-endfunction " ---------- end of function C_ForTypeComplete ----------
-"
-"------------------------------------------------------------------------------
-" C_CodeFor : for (idiom) {{{1
-"------------------------------------------------------------------------------
-function! C_CodeFor( direction, mode )
- "
- if a:direction == 'up'
- let string = 'INCR.'
- else
- let string = 'DECR.'
- endif
- let string = C_Input( '[TYPE (expand)] VARIABLE [START [END ['.string.']]] : ', '', 'customlist,C_ForTypeComplete' )
- if string == ''
- return
- endif
- "
- let part = ['']
- let nextindex = -1
- for item in s:C_ForTypes
- let nextindex = matchend( string, '^'.item )
- if nextindex >= 0
- let part[0] = item
- let string = strpart( string, nextindex-1 )
- endif
- endfor
- let part = part + split( string )
-
- if len( part ) > 5
- echohl WarningMsg | echomsg "for loop construction : to many arguments " | echohl None
- return
- endif
-
- let missing = 0
- while len(part) < 5
- let part = part + ['']
- let missing = missing+1
- endwhile
-
- let [ loopvar_type, loopvar, startval, endval, incval ] = part
-
- if incval==''
- let incval = '1'
- endif
-
- if a:direction == 'up'
- if endval == ''
- let endval = 'n'
- endif
- if startval == ''
- let startval = '0'
- endif
- let zz= 'for ( '.loopvar_type.loopvar.' = '.startval.'; '.loopvar.' < '.endval.'; '.loopvar.' += '.incval." )"
- else
- if endval == ''
- let endval = '0'
- endif
- if startval == ''
- let startval = 'n-1'
- endif
- let zz= 'for ( '.loopvar_type.loopvar.' = '.startval.'; '.loopvar.' >= '.endval.'; '.loopvar.' -= '.incval." )"
- endif
- "
- " use internal formatting to avoid conficts when using == below
- let equalprg_save = &equalprg
- set equalprg=
-
- " ----- normal mode ----------------
- if a:mode=='a'
- let zz = zz." {\n}"
- put =zz
- normal k
- normal 2==
- endif
- " ----- visual mode ----------------
- if a:mode=='v'
- let pos1 = line("'<")
- let pos2 = line("'>")
- let zz = zz.' {'
- let zz2= '}'
- exe ":".pos2."put =zz2"
- exe ":".pos1."put! =zz"
- :exe 'normal ='.(pos2-pos1+2).'+'
- endif
- "
- " restore formatter programm
- let &equalprg = equalprg_save
- "
- " position the cursor
- "
- normal ^
- if missing == 1
- let match = search( '\<'.incval.'\>', 'W', line(".") )
- else
- if missing == 2
- let match = search( '\<'.endval.'\>', 'W', line(".") )
- else
- if missing == 3
- let match = search( '\<'.startval.'\>', 'W', line(".") )
- endif
- endif
- endif
- "
-endfunction " ---------- end of function C_CodeFor ----------
-"
-"------------------------------------------------------------------------------
-" Handle prototypes {{{1
-"------------------------------------------------------------------------------
-"
-let s:C_Prototype = []
-let s:C_PrototypeShow = []
-let s:C_PrototypeCounter = 0
-let s:C_CComment = '\/\*.\{-}\*\/\s*' " C comment with trailing whitespaces
- " '.\{-}' any character, non-greedy
-let s:C_CppComment = '\/\/.*$' " C++ comment
-"
-"------------------------------------------------------------------------------
-" C_ProtoPick : pick up (normal/visual) {{{1
-"------------------------------------------------------------------------------
-function! C_ProtoPick (mode)
- if a:mode=="n"
- " --- normal mode -------------------
- let pos1 = line(".")
- let pos2 = pos1
- else
- " --- visual mode -------------------
- let pos1 = line("'<")
- let pos2 = line("'>")
- endif
- "
- " remove C/C++-comments, leading and trailing whitespaces, squeeze whitespaces
- "
- let prototyp = ''
- for linenumber in range( pos1, pos2 )
- let newline = getline(linenumber)
- let newline = substitute( newline, s:C_CppComment, "", "" ) " remove C++ comment
- let prototyp = prototyp." ".newline
- endfor
- "
- let prototyp = substitute( prototyp, '^\s\+', "", "" ) " remove leading whitespaces
- let prototyp = substitute( prototyp, s:C_CComment, "", "g" ) " remove (multiline) C comments
- let prototyp = substitute( prototyp, '\s\+', " ", "g" ) " squeeze whitespaces
- let prototyp = substitute( prototyp, '\s\+$', "", "" ) " remove trailing whitespaces
- "
- " remove template keyword
- "
- let prototyp = substitute( prototyp, '^template\s*<\s*class \w\+\s*>\s*', "", "" )
- "
- let parlist = stridx( prototyp, '(' ) " start of the parameter list
- let part1 = strpart( prototyp, 0, parlist )
- let part2 = strpart( prototyp, parlist )
- "
- " remove the scope res. operator
- "
- let part1 = substitute( part1, '<\s*\w\+\s*>', "", "g" )
- let part1 = substitute( part1, '\<std\s*::', 'std##', 'g' ) " remove the scope res. operator
- let part1 = substitute( part1, '\<\h\w*\s*::', '', 'g' ) " remove the scope res. operator
- let part1 = substitute( part1, '\<std##', 'std::', 'g' ) " remove the scope res. operator
- let prototyp = part1.part2
- "
- " remove trailing parts of the function body; add semicolon
- "
- let prototyp = substitute( prototyp, '\s*{.*$', "", "" )
- let prototyp = prototyp.";\n"
- "
- " bookkeeping
- "
- let s:C_PrototypeCounter += 1
- let s:C_Prototype += [prototyp]
- let s:C_PrototypeShow += ["(".s:C_PrototypeCounter.") ".bufname("%")." # ".prototyp]
- "
- echon s:C_PrototypeCounter.' prototype'
- if s:C_PrototypeCounter > 1
- echon 's'
- endif
- "
-endfunction " --------- end of function C_ProtoPick ----------
-"
-"------------------------------------------------------------------------------
-" C_ProtoInsert : insert {{{1
-"------------------------------------------------------------------------------
-function! C_ProtoInsert ()
- "
- " use internal formatting to avoid conficts when using == below
- let equalprg_save = &equalprg
- set equalprg=
- "
- if s:C_PrototypeCounter > 0
- for protytype in s:C_Prototype
- put =protytype
- endfor
- let lines = s:C_PrototypeCounter - 1
- silent exe "normal =".lines."-"
- call C_ProtoClear()
- else
- echo "currently no prototypes available"
- endif
- "
- " restore formatter programm
- let &equalprg = equalprg_save
- "
-endfunction " --------- end of function C_ProtoInsert ----------
-"
-"------------------------------------------------------------------------------
-" C_ProtoClear : clear {{{1
-"------------------------------------------------------------------------------
-function! C_ProtoClear ()
- if s:C_PrototypeCounter > 0
- let s:C_Prototype = []
- let s:C_PrototypeShow = []
- if s:C_PrototypeCounter == 1
- echo s:C_PrototypeCounter.' prototype deleted'
- else
- echo s:C_PrototypeCounter.' prototypes deleted'
- endif
- let s:C_PrototypeCounter = 0
- else
- echo "currently no prototypes available"
- endif
-endfunction " --------- end of function C_ProtoClear ----------
-"
-"------------------------------------------------------------------------------
-" C_ProtoShow : show {{{1
-"------------------------------------------------------------------------------
-function! C_ProtoShow ()
- if s:C_PrototypeCounter > 0
- for protytype in s:C_PrototypeShow
- echo protytype
- endfor
- else
- echo "currently no prototypes available"
- endif
-endfunction " --------- end of function C_ProtoShow ----------
-"
-"------------------------------------------------------------------------------
-" C_EscapeBlanks : C_EscapeBlanks {{{1
-"------------------------------------------------------------------------------
-function! C_EscapeBlanks (arg)
- return substitute( a:arg, " ", "\\ ", "g" )
-endfunction " --------- end of function C_EscapeBlanks ----------
-"
-"------------------------------------------------------------------------------
-" C_Compile : C_Compile {{{1
-"------------------------------------------------------------------------------
-" The standard make program 'make' called by vim is set to the C or C++ compiler
-" and reset after the compilation (setlocal makeprg=... ).
-" The errorfile created by the compiler will now be read by gvim and
-" the commands cl, cp, cn, ... can be used.
-"------------------------------------------------------------------------------
-let s:LastShellReturnCode = 0 " for compile / link / run only
-
-function! C_Compile ()
-
- let s:C_HlMessage = ""
- exe ":cclose"
- let Sou = expand("%:p") " name of the file in the current buffer
- let Obj = expand("%:p:r").s:C_ObjExtension " name of the object
- let SouEsc= escape( Sou, s:escfilename )
- let ObjEsc= escape( Obj, s:escfilename )
-
- " update : write source file if necessary
- exe ":update"
-
- " compilation if object does not exist or object exists and is older then the source
- if !filereadable(Obj) || (filereadable(Obj) && (getftime(Obj) < getftime(Sou)))
- " &makeprg can be a string containing blanks
- let makeprg_saved = '"'.&makeprg.'"'
- if expand("%:e") == s:C_CExtension
- exe "setlocal makeprg=".s:C_CCompiler
- else
- exe "setlocal makeprg=".s:C_CplusCompiler
- endif
- "
- " COMPILATION
- "
- let v:statusmsg = ''
- let s:LastShellReturnCode = 0
- if s:MSWIN
- exe "make ".s:C_CFlags." \"".SouEsc."\" -o \"".ObjEsc."\""
- else
- exe "make ".s:C_CFlags." ".SouEsc." -o ".ObjEsc
- endif
- exe "setlocal makeprg=".makeprg_saved
- if v:statusmsg == ''
- let s:C_HlMessage = "'".Obj."' : compilation successful"
- endif
- if v:shell_error != 0
- let s:LastShellReturnCode = v:shell_error
- endif
- "
- " open error window if necessary
- :redraw!
- exe ":botright cwindow"
- else
- let s:C_HlMessage = " '".Obj."' is up to date "
- endif
-
-endfunction " ---------- end of function C_Compile ----------
-"
-"------------------------------------------------------------------------------
-" C_Link : C_Link {{{1
-"------------------------------------------------------------------------------
-" The standard make program which is used by gvim is set to the compiler
-" (for linking) and reset after linking.
-"
-" calls: C_Compile
-"------------------------------------------------------------------------------
-function! C_Link ()
-
- call C_Compile()
- :redraw!
- if s:LastShellReturnCode != 0
- let s:LastShellReturnCode = 0
- return
- endif
-
- let s:C_HlMessage = ""
- let Sou = expand("%:p") " name of the file (full path)
- let Obj = expand("%:p:r").s:C_ObjExtension " name of the object file
- let Exe = expand("%:p:r").s:C_ExeExtension " name of the executable
- let ObjEsc= escape( Obj, s:escfilename )
- let ExeEsc= escape( Exe, s:escfilename )
-
- " no linkage if:
- " executable exists
- " object exists
- " source exists
- " executable newer then object
- " object newer then source
-
- if filereadable(Exe) &&
- \ filereadable(Obj) &&
- \ filereadable(Sou) &&
- \ (getftime(Exe) >= getftime(Obj)) &&
- \ (getftime(Obj) >= getftime(Sou))
- let s:C_HlMessage = " '".Exe."' is up to date "
- return
- endif
-
- " linkage if:
- " object exists
- " source exists
- " object newer then source
-
- if filereadable(Obj) && (getftime(Obj) >= getftime(Sou))
- let makeprg_saved='"'.&makeprg.'"'
- if expand("%:e") == s:C_CExtension
- exe "setlocal makeprg=".s:C_CCompiler
- else
- exe "setlocal makeprg=".s:C_CplusCompiler
- endif
- let s:LastShellReturnCode = 0
- let v:statusmsg = ''
- if s:MSWIN
- silent exe "make ".s:C_LFlags." ".s:C_Libs." -o \"".ExeEsc."\" \"".ObjEsc."\""
- else
- silent exe "make ".s:C_LFlags." ".s:C_Libs." -o ".ExeEsc." ".ObjEsc
- endif
- if v:statusmsg == ''
- let s:C_HlMessage = "'".Exe."' : linking successful"
- else
- let s:C_HlMessage = "'".Exe."' : linking NOT successful"
- endif
- if v:shell_error != 0
- let s:LastShellReturnCode = v:shell_error
- endif
- exe "setlocal makeprg=".makeprg_saved
- endif
-endfunction " ---------- end of function C_Link ----------
-"
-"------------------------------------------------------------------------------
-" C_Run : C_Run {{{1
-" calls: C_Link
-"------------------------------------------------------------------------------
-"
-let s:C_OutputBufferName = "C-Output"
-let s:C_OutputBufferNumber = -1
-let s:C_RunMsg1 ="' does not exist or is not executable or object/source older then executable"
-"
-function! C_Run ()
-"
- let s:C_HlMessage = ""
- let Sou = expand("%:p") " name of the source file
- let Obj = expand("%:p:r").s:C_ObjExtension " name of the object file
- let Exe = expand("%:p:r").s:C_ExeExtension " name of the executable
- let ExeEsc = escape( Exe, s:escfilename ) " name of the executable, escaped
- "
- let l:arguments = exists("b:C_CmdLineArgs") ? b:C_CmdLineArgs : ''
- "
- let l:currentbuffer = bufname("%")
- "
- "==============================================================================
- " run : run from the vim command line
- "==============================================================================
- if s:C_OutputGvim == "vim"
- "
- silent call C_Link()
- if s:LastShellReturnCode == 0
- " clear the last linking message if any"
- let s:C_HlMessage = ""
- call C_HlMessage()
- endif
- "
- if executable(Exe) && getftime(Exe) >= getftime(Obj) && getftime(Obj) >= getftime(Sou)
- if s:MSWIN
- exe "!\"".ExeEsc."\" ".l:arguments
- else
- exe "!".ExeEsc." ".l:arguments
- endif
- else
- echomsg "file '".Exe.s:C_RunMsg1
- endif
-
- endif
- "
- "==============================================================================
- " run : redirect output to an output buffer
- "==============================================================================
- if s:C_OutputGvim == "buffer"
- let l:currentbuffernr = bufnr("%")
- "
- silent call C_Link()
- "
- if l:currentbuffer == bufname("%")
- "
- "
- if bufloaded(s:C_OutputBufferName) != 0 && bufwinnr(s:C_OutputBufferNumber)!=-1
- exe bufwinnr(s:C_OutputBufferNumber) . "wincmd w"
- " buffer number may have changed, e.g. after a 'save as'
- if bufnr("%") != s:C_OutputBufferNumber
- let s:C_OutputBufferNumber = bufnr(s:C_OutputBufferName)
- exe ":bn ".s:C_OutputBufferNumber
- endif
- else
- silent exe ":new ".s:C_OutputBufferName
- let s:C_OutputBufferNumber=bufnr("%")
- setlocal buftype=nofile
- setlocal noswapfile
- setlocal syntax=none
- setlocal bufhidden=delete
- setlocal tabstop=8
- endif
- "
- " run programm
- "
- setlocal modifiable
- if executable(Exe) && getftime(Exe) >= getftime(Obj) && getftime(Obj) >= getftime(Sou)
- if s:MSWIN
- exe "%!\"".ExeEsc."\" ".l:arguments
- else
- exe "%!".ExeEsc." ".l:arguments
- endif
- setlocal nomodifiable
- "
- if winheight(winnr()) >= line("$")
- exe bufwinnr(l:currentbuffernr) . "wincmd w"
- endif
- else
- setlocal nomodifiable
- :close
- echomsg "file '".Exe.s:C_RunMsg1
- endif
- "
- endif
- endif
- "
- "==============================================================================
- " run : run in a detached xterm (not available for MS Windows)
- "==============================================================================
- if s:C_OutputGvim == "xterm"
- "
- silent call C_Link()
- "
- if executable(Exe) && getftime(Exe) >= getftime(Obj) && getftime(Obj) >= getftime(Sou)
- if s:MSWIN
- exe "!\"".ExeEsc."\" ".l:arguments
- else
- silent exe '!xterm -title '.ExeEsc.' '.s:C_XtermDefaults.' -e '.s:C_Wrapper.' '.ExeEsc.' '.l:arguments.' &'
- :redraw!
- endif
- else
- echomsg "file '".Exe.s:C_RunMsg1
- endif
- endif
-
- if v:statusmsg == ''
- let s:C_HlMessage = ""
- endif
-endfunction " ---------- end of function C_Run ----------
-"
-"------------------------------------------------------------------------------
-" C_Arguments : Arguments for the executable {{{1
-"------------------------------------------------------------------------------
-function! C_Arguments ()
- let Exe = expand("%:r").s:C_ExeExtension
- if Exe == ""
- redraw
- echohl WarningMsg | echo "no file name " | echohl None
- return
- endif
- let prompt = 'command line arguments for "'.Exe.'" : '
- if exists("b:C_CmdLineArgs")
- let b:C_CmdLineArgs= C_Input( prompt, b:C_CmdLineArgs, 'file' )
- else
- let b:C_CmdLineArgs= C_Input( prompt , "", 'file' )
- endif
-endfunction " ---------- end of function C_Arguments ----------
-"
-"----------------------------------------------------------------------
-" C_Toggle_Gvim_Xterm : change output destination {{{1
-"----------------------------------------------------------------------
-function! C_Toggle_Gvim_Xterm ()
-
- if s:C_OutputGvim == "vim"
- if has("gui_running")
- exe "aunmenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm'
- exe "amenu <silent> ".s:Run.'.&output:\ BUFFER->xterm->vim :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ BUFFER->xterm->vim <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- endif
- let s:C_OutputGvim = "buffer"
- else
- if s:C_OutputGvim == "buffer"
- if has("gui_running")
- exe "aunmenu <silent> ".s:Run.'.&output:\ BUFFER->xterm->vim'
- if (!s:MSWIN)
- exe "amenu <silent> ".s:Run.'.&output:\ XTERM->vim->buffer :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ XTERM->vim->buffer <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- else
- exe "amenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- endif
- endif
- if (!s:MSWIN) && (s:C_Display != '')
- let s:C_OutputGvim = "xterm"
- else
- let s:C_OutputGvim = "vim"
- endif
- else
- " ---------- output : xterm -> gvim
- if has("gui_running")
- exe "aunmenu <silent> ".s:Run.'.&output:\ XTERM->vim->buffer'
- exe "amenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm :call C_Toggle_Gvim_Xterm()<CR><CR>'
- exe "imenu <silent> ".s:Run.'.&output:\ VIM->buffer->xterm <C-C>:call C_Toggle_Gvim_Xterm()<CR><CR>'
- endif
- let s:C_OutputGvim = "vim"
- endif
- endif
- echomsg "output destination is '".s:C_OutputGvim."'"
-
-endfunction " ---------- end of function C_Toggle_Gvim_Xterm ----------
-"
-"------------------------------------------------------------------------------
-" C_XtermSize : xterm geometry {{{1
-"------------------------------------------------------------------------------
-function! C_XtermSize ()
- let regex = '-geometry\s\+\d\+x\d\+'
- let geom = matchstr( s:C_XtermDefaults, regex )
- let geom = matchstr( geom, '\d\+x\d\+' )
- let geom = substitute( geom, 'x', ' ', "" )
- let answer= C_Input(" xterm size (COLUMNS LINES) : ", geom )
- while match(answer, '^\s*\d\+\s\+\d\+\s*$' ) < 0
- let answer= C_Input(" + xterm size (COLUMNS LINES) : ", geom )
- endwhile
- let answer = substitute( answer, '\s\+', "x", "" ) " replace inner whitespaces
- let s:C_XtermDefaults = substitute( s:C_XtermDefaults, regex, "-geometry ".answer , "" )
-endfunction " ---------- end of function C_XtermSize ----------
-"
-"------------------------------------------------------------------------------
-" C_MakeArguments : run make(1) {{{1
-"------------------------------------------------------------------------------
-
-let s:C_MakeCmdLineArgs = "" " command line arguments for Run-make; initially empty
-
-function! C_MakeArguments ()
- let s:C_MakeCmdLineArgs= C_Input("make command line arguments : ",s:C_MakeCmdLineArgs )
-endfunction " ---------- end of function C_MakeArguments ----------
-"
-function! C_Make()
- " update : write source file if necessary
- exe ":update"
- " run make
- exe ":!make ".s:C_MakeCmdLineArgs
-endfunction " ---------- end of function C_Make ----------
-"
-"------------------------------------------------------------------------------
-" C_SplintArguments : splint command line arguments {{{1
-"------------------------------------------------------------------------------
-function! C_SplintArguments ()
- if s:C_SplintIsExecutable==0
- let s:C_HlMessage = ' Splint is not executable or not installed! '
- else
- let prompt = 'Splint command line arguments for "'.expand("%").'" : '
- if exists("b:C_SplintCmdLineArgs")
- let b:C_SplintCmdLineArgs= C_Input( prompt, b:C_SplintCmdLineArgs )
- else
- let b:C_SplintCmdLineArgs= C_Input( prompt , "" )
- endif
- endif
-endfunction " ---------- end of function C_SplintArguments ----------
-"
-"------------------------------------------------------------------------------
-" C_SplintCheck : run splint(1) {{{1
-"------------------------------------------------------------------------------
-function! C_SplintCheck ()
- if s:C_SplintIsExecutable==0
- let s:C_HlMessage = ' Splint is not executable or not installed! '
- return
- endif
- let l:currentbuffer=bufname("%")
- if &filetype != "c" && &filetype != "cpp"
- let s:C_HlMessage = ' "'.l:currentbuffer.'" seems not to be a C/C++ file '
- return
- endif
- let s:C_HlMessage = ""
- exe ":cclose"
- silent exe ":update"
- let makeprg_saved='"'.&makeprg.'"'
- " Windows seems to need this:
- if s:MSWIN
- :compiler splint
- endif
- :setlocal makeprg=splint
- "
- let l:arguments = exists("b:C_SplintCmdLineArgs") ? b:C_SplintCmdLineArgs : ' '
- silent exe "make ".l:arguments." ".escape(l:currentbuffer,s:escfilename)
- exe "setlocal makeprg=".makeprg_saved
- exe ":botright cwindow"
- "
- " message in case of success
- "
- if l:currentbuffer == bufname("%")
- let s:C_HlMessage = " Splint --- no warnings for : ".l:currentbuffer
- endif
-endfunction " ---------- end of function C_SplintCheck ----------
-"
-"------------------------------------------------------------------------------
-" C_CodeCheckArguments : CodeCheck command line arguments {{{1
-"------------------------------------------------------------------------------
-function! C_CodeCheckArguments ()
- if s:C_CodeCheckIsExecutable==0
- let s:C_HlMessage = ' CodeCheck is not executable or not installed! '
- else
- let prompt = 'CodeCheck command line arguments for "'.expand("%").'" : '
- if exists("b:C_CodeCheckCmdLineArgs")
- let b:C_CodeCheckCmdLineArgs= C_Input( prompt, b:C_CodeCheckCmdLineArgs )
- else
- let b:C_CodeCheckCmdLineArgs= C_Input( prompt , s:C_CodeCheckOptions )
- endif
- endif
-endfunction " ---------- end of function C_CodeCheckArguments ----------
-"
-"------------------------------------------------------------------------------
-" C_CodeCheck : run CodeCheck {{{1
-"------------------------------------------------------------------------------
-function! C_CodeCheck ()
- if s:C_CodeCheckIsExecutable==0
- let s:C_HlMessage = ' CodeCheck is not executable or not installed! '
- return
- endif
- let l:currentbuffer=bufname("%")
- if &filetype != "c" && &filetype != "cpp"
- let s:C_HlMessage = ' "'.l:currentbuffer.'" seems not to be a C/C++ file '
- return
- endif
- let s:C_HlMessage = ""
- exe ":cclose"
- silent exe ":update"
- let makeprg_saved='"'.&makeprg.'"'
- exe "setlocal makeprg=".s:C_CodeCheckExeName
- "
- " match the splint error messages (quickfix commands)
- " ignore any lines that didn't match one of the patterns
- "
- :setlocal errorformat=%f(%l)%m
- "
- let l:arguments = exists("b:C_CodeCheckCmdLineArgs") ? b:C_CodeCheckCmdLineArgs : ""
- if l:arguments == ""
- let l:arguments = s:C_CodeCheckOptions
- endif
- exe ":make ".l:arguments." ".escape( l:currentbuffer, s:escfilename )
- exe ':setlocal errorformat='
- exe ":setlocal makeprg=".makeprg_saved
- exe ":botright cwindow"
- "
- " message in case of success
- "
- if l:currentbuffer == bufname("%")
- let s:C_HlMessage = " CodeCheck --- no warnings for : ".l:currentbuffer
- endif
-endfunction " ---------- end of function C_CodeCheck ----------
-"
-"------------------------------------------------------------------------------
-" C_Indent : run indent(1) {{{1
-"------------------------------------------------------------------------------
-"
-function! C_Indent ( )
- if !executable("indent")
- echomsg 'indent is not executable or not installed!'
- return
- endif
- let l:currentbuffer=expand("%:p")
- if &filetype != "c" && &filetype != "cpp"
- echomsg '"'.l:currentbuffer.'" seems not to be a C/C++ file '
- return
- endif
- if C_Input("indent whole file [y/n/Esc] : ", "y" ) != "y"
- return
- endif
- :update
-
- exe ":cclose"
- if s:MSWIN
- silent exe ":%!indent "
- else
- silent exe ":%!indent 2> ".s:C_IndentErrorLog
- redraw!
- if getfsize( s:C_IndentErrorLog ) > 0
- exe ':edit! '.s:C_IndentErrorLog
- let errorlogbuffer = bufnr("%")
- exe ':%s/^indent: Standard input/indent: '.escape( l:currentbuffer, '/' ).'/'
- setlocal errorformat=indent:\ %f:%l:%m
- :cbuffer
- exe ':bdelete! '.errorlogbuffer
- exe ':botright cwindow'
- else
- echomsg 'File "'.l:currentbuffer.'" reformatted.'
- endif
- setlocal errorformat=
- endif
-
-endfunction " ---------- end of function C_Indent ----------
-"
-"------------------------------------------------------------------------------
-" C_HlMessage : indent message {{{1
-"------------------------------------------------------------------------------
-function! C_HlMessage ()
- redraw!
- echohl Search
- echo s:C_HlMessage
- echohl None
-endfunction " ---------- end of function C_HlMessage ----------
-"
-"------------------------------------------------------------------------------
-" C_Settings : settings {{{1
-"------------------------------------------------------------------------------
-function! C_Settings ()
- let txt = " C/C++-Support settings\n\n"
- let txt = txt.' author : "'.s:C_Macro['|AUTHOR|']."\"\n"
- let txt = txt.' initials : "'.s:C_Macro['|AUTHORREF|']."\"\n"
- let txt = txt.' email : "'.s:C_Macro['|EMAIL|']."\"\n"
- let txt = txt.' company : "'.s:C_Macro['|COMPANY|']."\"\n"
- let txt = txt.' project : "'.s:C_Macro['|PROJECT|']."\"\n"
- let txt = txt.' copyright holder : "'.s:C_Macro['|COPYRIGHTHOLDER|']."\"\n"
- let txt = txt.' C / C++ compiler : '.s:C_CCompiler.' / '.s:C_CplusCompiler."\n"
- let txt = txt.' C file extension : "'.s:C_CExtension.'" (everything else is C++)'."\n"
- let txt = txt.' extension for objects : "'.s:C_ObjExtension."\"\n"
- let txt = txt.'extension for executables : "'.s:C_ExeExtension."\"\n"
- let txt = txt.' compiler flags : "'.s:C_CFlags."\"\n"
- let txt = txt.' linker flags : "'.s:C_LFlags."\"\n"
- let txt = txt.' libraries : "'.s:C_Libs."\"\n"
- let txt = txt.' code snippet directory : "'.s:C_CodeSnippets."\"\n"
- " ----- template files ------------------------
- let txt = txt.' template style : "'.s:C_ActualStyle."\"\n"
- if s:installation == 'system'
- let txt = txt.'global template directory : '.s:C_GlobalTemplateDir."\n"
- if filereadable( s:C_LocalTemplateFile )
- let txt = txt.' local template directory : '.s:C_LocalTemplateDir."\n"
- endif
- else
- let txt = txt.' local template directory : '.s:C_GlobalTemplateDir."\n"
- endif
- if !s:MSWIN
- let txt = txt.' xterm defaults : '.s:C_XtermDefaults."\n"
- endif
- " ----- dictionaries ------------------------
- if g:C_Dictionary_File != ""
- let ausgabe= &dictionary
- let ausgabe= substitute( ausgabe, ",", ",\n + ", "g" )
- let txt = txt." dictionary file(s) : ".ausgabe."\n"
- endif
- let txt = txt.' current output dest. : '.s:C_OutputGvim."\n"
- " ----- splint ------------------------------
- if s:C_SplintIsExecutable==1
- if exists("b:C_SplintCmdLineArgs")
- let ausgabe = b:C_SplintCmdLineArgs
- else
- let ausgabe = ""
- endif
- let txt = txt." splint options(s) : ".ausgabe."\n"
- endif
- " ----- code check --------------------------
- if s:C_CodeCheckIsExecutable==1
- if exists("b:C_CodeCheckCmdLineArgs")
- let ausgabe = b:C_CodeCheckCmdLineArgs
- else
- let ausgabe = s:C_CodeCheckOptions
- endif
- let txt = txt."CodeCheck (TM) options(s) : ".ausgabe."\n"
- endif
- let txt = txt."\n"
- let txt = txt."__________________________________________________________________________\n"
- let txt = txt." C/C++-Support, Version ".g:C_Version." / Dr.-Ing. Fritz Mehner / mehner@fh-swf.de\n\n"
- echo txt
-endfunction " ---------- end of function C_Settings ----------
-"
-"------------------------------------------------------------------------------
-" C_Hardcopy : hardcopy {{{1
-" MSWIN : a printer dialog is displayed
-" other : print PostScript to file
-"------------------------------------------------------------------------------
-function! C_Hardcopy (mode)
- let outfile = expand("%")
- if outfile == ""
- let s:C_HlMessage = 'Buffer has no name.'
- call C_HlMessage()
- endif
- let outdir = getcwd()
- if filewritable(outdir) != 2
- let outdir = $HOME
- endif
- if !s:MSWIN
- let outdir = outdir.'/'
- endif
- let old_printheader=&printheader
- exe ':set printheader='.s:C_Printheader
- " ----- normal mode ----------------
- if a:mode=="n"
- silent exe 'hardcopy > '.outdir.outfile.'.ps'
- if !s:MSWIN
- echo 'file "'.outfile.'" printed to "'.outdir.outfile.'.ps"'
- endif
- endif
- " ----- visual mode ----------------
- if a:mode=="v"
- silent exe "*hardcopy > ".outdir.outfile.".ps"
- if !s:MSWIN
- echo 'file "'.outfile.'" (lines '.line("'<").'-'.line("'>").') printed to "'.outdir.outfile.'.ps"'
- endif
- endif
- exe ':set printheader='.escape( old_printheader, ' %' )
-endfunction " ---------- end of function C_Hardcopy ----------
-"
-"------------------------------------------------------------------------------
-" C_HelpCsupport : help csupport {{{1
-"------------------------------------------------------------------------------
-function! C_HelpCsupport ()
- try
- :help csupport
- catch
- exe ':helptags '.s:plugin_dir.'doc'
- :help csupport
- endtry
-endfunction " ---------- end of function C_HelpCsupport ----------
-"
-"------------------------------------------------------------------------------
-" C_Help : lookup word under the cursor or ask {{{1
-"------------------------------------------------------------------------------
-"
-let s:C_DocBufferName = "C_HELP"
-let s:C_DocHelpBufferNumber = -1
-"
-function! C_Help( type )
-
- let cuc = getline(".")[col(".") - 1] " character under the cursor
- let item = expand("<cword>") " word under the cursor
- if cuc == '' || item == "" || match( item, cuc ) == -1
- let item=C_Input('name of the manual page : ', '' )
- endif
-
- if item == ""
- return
- endif
- "------------------------------------------------------------------------------
- " replace buffer content with bash help text
- "------------------------------------------------------------------------------
- "
- " jump to an already open bash help window or create one
- "
- if bufloaded(s:C_DocBufferName) != 0 && bufwinnr(s:C_DocHelpBufferNumber) != -1
- exe bufwinnr(s:C_DocHelpBufferNumber) . "wincmd w"
- " buffer number may have changed, e.g. after a 'save as'
- if bufnr("%") != s:C_DocHelpBufferNumber
- let s:C_DocHelpBufferNumber=bufnr(s:C_OutputBufferName)
- exe ":bn ".s:C_DocHelpBufferNumber
- endif
- else
- exe ":new ".s:C_DocBufferName
- let s:C_DocHelpBufferNumber=bufnr("%")
- setlocal buftype=nofile
- setlocal noswapfile
- setlocal bufhidden=delete
- setlocal filetype=sh " allows repeated use of <S-F1>
- setlocal syntax=OFF
- endif
- setlocal modifiable
- "
- if a:type == 'm'
- "
- " Is there more than one manual ?
- "
- let manpages = system( s:C_Man.' -k '.item )
- if v:shell_error
- echomsg "Shell command '".s:C_Man." -k ".item."' failed."
- :close
- return
- endif
- let catalogs = split( manpages, '\n', )
- let manual = {}
- "
- " Select manuals where the name exactly matches
- "
- for line in catalogs
- if line =~ '^'.item.'\s\+('
- let itempart = split( line, '\s\+' )
- let catalog = itempart[1][1:-2]
- if match( catalog, '.p$' ) == -1
- let manual[catalog] = catalog
- endif
- endif
- endfor
- "
- " Build a selection list if there are more than one manual
- "
- let catalog = ""
- if len(keys(manual)) > 1
- for key in keys(manual)
- echo ' '.item.' '.key
- endfor
- let defaultcatalog = ''
- if has_key( manual, '3' )
- let defaultcatalog = '3'
- else
- if has_key( manual, '2' )
- let defaultcatalog = '2'
- endif
- endif
- let catalog = input( 'select manual section (<Enter> cancels) : ', defaultcatalog )
- if ! has_key( manual, catalog )
- :close
- :redraw
- echomsg "no appropriate manual section '".catalog."'"
- return
- endif
- endif
-
- set filetype=man
- silent exe ":%!".s:C_Man." ".catalog." ".item
-
- endif
-
- setlocal nomodifiable
-endfunction " ---------- end of function C_Help ----------
-
-"------------------------------------------------------------------------------
-" C_CreateGuiMenus {{{1
-"------------------------------------------------------------------------------
-let s:C_MenuVisible = 0 " state variable controlling the C-menus
-"
-function! C_CreateGuiMenus ()
- if s:C_MenuVisible != 1
- aunmenu <silent> &Tools.Load\ C\ Support
- amenu <silent> 40.1000 &Tools.-SEP100- :
- amenu <silent> 40.1030 &Tools.Unload\ C\ Support <C-C>:call C_RemoveGuiMenus()<CR>
- call C_InitMenus()
- let s:C_MenuVisible = 1
- endif
-endfunction " ---------- end of function C_CreateGuiMenus ----------
-
-"------------------------------------------------------------------------------
-" C_ToolMenu {{{1
-"------------------------------------------------------------------------------
-function! C_ToolMenu ()
- amenu <silent> 40.1000 &Tools.-SEP100- :
- amenu <silent> 40.1030 &Tools.Load\ C\ Support :call C_CreateGuiMenus()<CR>
- imenu <silent> 40.1030 &Tools.Load\ C\ Support <C-C>:call C_CreateGuiMenus()<CR>
-endfunction " ---------- end of function C_ToolMenu ----------
-
-"------------------------------------------------------------------------------
-" C_RemoveGuiMenus {{{1
-"------------------------------------------------------------------------------
-function! C_RemoveGuiMenus ()
- if s:C_MenuVisible == 1
- if s:C_Root == ""
- aunmenu <silent> Comments
- aunmenu <silent> Statements
- aunmenu <silent> Preprocessor
- aunmenu <silent> Idioms
- aunmenu <silent> Snippets
- aunmenu <silent> C++
- aunmenu <silent> Run
- else
- exe "aunmenu <silent> ".s:C_Root
- endif
- "
- aunmenu <silent> &Tools.Unload\ C\ Support
- call C_ToolMenu()
- "
- let s:C_MenuVisible = 0
- endif
-endfunction " ---------- end of function C_RemoveGuiMenus ----------
-
-"------------------------------------------------------------------------------
-" C_RereadTemplates {{{1
-" rebuild commands and the menu from the (changed) template file
-"------------------------------------------------------------------------------
-function! C_RereadTemplates ()
- let s:style = 'default'
- let s:C_Template = { 'default' : {} }
- let s:C_FileVisited = []
- call C_ReadTemplates(s:C_GlobalTemplateFile)
- echomsg "templates rebuilt from '".s:C_GlobalTemplateFile."'"
- "
- if s:installation == 'system' && filereadable( s:C_LocalTemplateFile )
- call C_ReadTemplates( s:C_LocalTemplateFile )
- echomsg " and from '".s:C_LocalTemplateFile."'"
- endif
-endfunction " ---------- end of function C_RereadTemplates ----------
-
-"------------------------------------------------------------------------------
-" C_BrowseTemplateFiles {{{1
-"------------------------------------------------------------------------------
-function! C_BrowseTemplateFiles ( type )
- if filereadable( eval( 's:C_'.a:type.'TemplateFile' ) )
- if has("browse") && s:C_GuiTemplateBrowser == 'gui'
- let l:templatefile = browse(0,"edit a template file", eval('s:C_'.a:type.'TemplateDir'), "" )
- else
- let l:templatefile = ''
- if s:C_GuiTemplateBrowser == 'explorer'
- exe ':Explore '.eval('s:C_'.a:type.'TemplateDir')
- endif
- if s:C_GuiTemplateBrowser == 'commandline'
- let l:templatefile = input("edit a template file", eval('s:C_'.a:type.'TemplateDir'), "file" )
- endif
- endif
- if l:templatefile != ""
- :execute "update! | split | edit ".l:templatefile
- endif
- else
- echomsg a:type." template file not readable."
- endif
-endfunction " ---------- end of function C_BrowseTemplateFiles ----------
-
-"------------------------------------------------------------------------------
-" C_EditTemplates {{{1
-"------------------------------------------------------------------------------
-function! C_EditTemplates ( type )
- "
- if a:type == 'global'
- if s:installation == 'system'
- call C_BrowseTemplateFiles('Global')
- else
- echomsg "C/C++-Support is user installed: no global template file"
- endif
- endif
- "
- if a:type == 'local'
- if s:installation == 'system'
- call C_BrowseTemplateFiles('Local')
- else
- call C_BrowseTemplateFiles('Global')
- endif
- endif
- "
-endfunction " ---------- end of function C_EditTemplates ----------
-"
-"------------------------------------------------------------------------------
-" C_ReadTemplates {{{1
-" read the template file(s), build the macro and the template dictionary
-"
-"------------------------------------------------------------------------------
-let s:style = 'default'
-function! C_ReadTemplates ( templatefile )
-
- if !filereadable( a:templatefile )
- echohl WarningMsg
- echomsg "C/C++ template file '".a:templatefile."' does not exist or is not readable"
- echohl None
- return
- endif
-
- let skipmacros = 0
- let s:C_FileVisited += [a:templatefile]
-
- "------------------------------------------------------------------------------
- " read template file, start with an empty template dictionary
- "------------------------------------------------------------------------------
-
- let item = ''
- let skipline = 0
- for line in readfile( a:templatefile )
- " if not a comment :
- if line !~ s:C_MacroCommentRegex
- "
- "-------------------------------------------------------------------------------
- " IF |STYLE| IS ...
- "-------------------------------------------------------------------------------
- "
- let string = matchlist( line, s:C_TemplateIf )
- if !empty(string)
- if !has_key( s:C_Template, string[1] )
- " new s:style
- let s:style = string[1]
- let s:C_Template[s:style] = {}
- continue
- endif
- endif
- "
- "-------------------------------------------------------------------------------
- " ENDIF
- "-------------------------------------------------------------------------------
- "
- let string = matchlist( line, s:C_TemplateEndif )
- if !empty(string)
- let s:style = 'default'
- continue
- endif
- "
- " macros and file includes
- "
- let string = matchlist( line, s:C_MacroLineRegex )
- if !empty(string) && skipmacros == 0
- let key = '|'.string[1].'|'
- let val = string[2]
- let val = substitute( val, '\s\+$', '', '' )
- let val = substitute( val, "[\"\']$", '', '' )
- let val = substitute( val, "^[\"\']", '', '' )
- "
- if key == '|includefile|' && count( s:C_FileVisited, val ) == 0
- let path = fnamemodify( a:templatefile, ":p:h" )
- call C_ReadTemplates( path.'/'.val ) " recursive call
- else
- let s:C_Macro[key] = escape( val, '&' )
- endif
- continue " next line
- endif
- "
- " template header
- "
- let name = matchstr( line, s:C_TemplateLineRegex )
- "
- if name != ''
- let part = split( name, '\s*==\s*')
- let item = part[0]
- if has_key( s:C_Template[s:style], item ) && s:C_TemplateOverwrittenMsg == 'yes'
- echomsg "existing C/C++ template '".item."' overwritten"
- endif
- let s:C_Template[s:style][item] = ''
- let skipmacros = 1
- "
- let s:C_Attribute[item] = 'below'
- if has_key( s:Attribute, get( part, 1, 'NONE' ) )
- let s:C_Attribute[item] = part[1]
- endif
- else
- if item != ''
- let s:C_Template[s:style][item] .= line."\n"
- endif
- endif
- endif
- "
- endfor " --------- read line ---------
-
- let s:C_ActualStyle = 'default'
- if s:C_Macro['|STYLE|'] != ''
- let s:C_ActualStyle = s:C_Macro['|STYLE|']
- endif
- let s:C_ActualStyleLast = s:C_ActualStyle
-
- call C_SetSmallCommentStyle()
-endfunction " ---------- end of function C_ReadTemplates ----------
-
-"------------------------------------------------------------------------------
-" C_Style{{{1
-" ex-command CStyle : callback function
-"------------------------------------------------------------------------------
-function! C_Style ( style )
- let lstyle = substitute( a:style, '^\s\+', "", "" ) " remove leading whitespaces
- let lstyle = substitute( lstyle, '\s\+$', "", "" ) " remove trailing whitespaces
- if has_key( s:C_Template, lstyle )
- if len( s:C_Template[lstyle] ) == 0
- echomsg "style '".lstyle."' : no templates defined"
- return
- endif
- let s:C_ActualStyleLast = s:C_ActualStyle
- let s:C_ActualStyle = lstyle
- if len( s:C_ActualStyle ) > 1 && s:C_ActualStyle != s:C_ActualStyleLast
- echomsg "template style is '".lstyle."'"
- endif
- else
- echomsg "style '".lstyle."' does not exist"
- endif
-endfunction " ---------- end of function C_Style ----------
-
-"------------------------------------------------------------------------------
-" C_StyleList {{{1
-" ex-command CStyle
-"------------------------------------------------------------------------------
-function! C_StyleList ( ArgLead, CmdLine, CursorPos )
- " show all types / types beginning with a:ArgLead
- return filter( copy(keys( s:C_Template) ), 'v:val =~ "\\<'.a:ArgLead.'\\w*"' )
-endfunction " ---------- end of function C_StyleList ----------
-
-"------------------------------------------------------------------------------
-" C_OpenFold {{{1
-" Open fold and go to the first or last line of this fold.
-"------------------------------------------------------------------------------
-function! C_OpenFold ( mode )
- if foldclosed(".") >= 0
- " we are on a closed fold: get end position, open fold, jump to the
- " last line of the previously closed fold
- let foldstart = foldclosed(".")
- let foldend = foldclosedend(".")
- normal zv
- if a:mode == 'below'
- exe ":".foldend
- endif
- if a:mode == 'start'
- exe ":".foldstart
- endif
- endif
-endfunction " ---------- end of function C_OpenFold ----------
-
-"------------------------------------------------------------------------------
-" C_InsertTemplate {{{1
-" insert a template from the template dictionary
-" do macro expansion
-"------------------------------------------------------------------------------
-function! C_InsertTemplate ( key, ... )
-
- if !has_key( s:C_Template[s:C_ActualStyle], a:key ) &&
- \ !has_key( s:C_Template['default'], a:key )
- echomsg "style '".a:key."' / template '".a:key
- \ ."' not found. Please check your template file in '".s:C_GlobalTemplateDir."'"
- return
- endif
-
- if &foldenable
- let foldmethod_save = &foldmethod
- set foldmethod=manual
- endif
- "------------------------------------------------------------------------------
- " insert the user macros
- "------------------------------------------------------------------------------
-
- " use internal formatting to avoid conficts when using == below
- "
- let equalprg_save = &equalprg
- set equalprg=
-
- let mode = s:C_Attribute[a:key]
-
- " remove <SPLIT> and insert the complete macro
- "
- if a:0 == 0
- let val = C_ExpandUserMacros (a:key)
- if val == ""
- return
- endif
- let val = C_ExpandSingleMacro( val, '<SPLIT>', '' )
-
- if mode == 'below'
- call C_OpenFold('below')
- let pos1 = line(".")+1
- put =val
- let pos2 = line(".")
- " proper indenting
- exe ":".pos1
- let ins = pos2-pos1+1
- exe "normal ".ins."=="
- "
- elseif mode == 'above'
- let pos1 = line(".")
- put! =val
- let pos2 = line(".")
- " proper indenting
- exe ":".pos1
- let ins = pos2-pos1+1
- exe "normal ".ins."=="
- "
- elseif mode == 'start'
- normal gg
- call C_OpenFold('start')
- let pos1 = 1
- put! =val
- let pos2 = line(".")
- " proper indenting
- exe ":".pos1
- let ins = pos2-pos1+1
- exe "normal ".ins."=="
- "
- elseif mode == 'append'
- if &foldenable && foldclosed(".") >= 0
- echohl WarningMsg | echomsg s:MsgInsNotAvail | echohl None
- exe "set foldmethod=".foldmethod_save
- return
- else
- let pos1 = line(".")
- put =val
- let pos2 = line(".")-1
- exe ":".pos1
- :join!
- endif
- "
- elseif mode == 'insert'
- if &foldenable && foldclosed(".") >= 0
- echohl WarningMsg | echomsg s:MsgInsNotAvail | echohl None
- exe "set foldmethod=".foldmethod_save
- return
- else
- let val = substitute( val, '\n$', '', '' )
- let currentline = getline( "." )
- let pos1 = line(".")
- let pos2 = pos1 + count( split(val,'\zs'), "\n" )
- " assign to the unnamed register "" :
- let @"=val
- normal p
- " reformat only multiline inserts and previously empty lines
- if pos2-pos1 > 0 || currentline =~ ''
- exe ":".pos1
- let ins = pos2-pos1+1
- exe "normal ".ins."=="
- endif
- endif
- "
- endif
- "
- else
- "
- " ===== visual mode ===============================
- "
- if a:1 == 'v'
- let val = C_ExpandUserMacros (a:key)
- let val = C_ExpandSingleMacro( val, s:C_TemplateJumpTarget2, '' )
- if val == ""
- return
- endif
-
- if match( val, '<SPLIT>\s*\n' ) >= 0
- let part = split( val, '<SPLIT>\s*\n' )
- else
- let part = split( val, '<SPLIT>' )
- endif
-
- if len(part) < 2
- let part = [ "" ] + part
- echomsg 'SPLIT missing in template '.a:key
- endif
- "
- " 'visual' and mode 'insert':
- " <part0><marked area><part1>
- " part0 and part1 can consist of several lines
- "
- if mode == 'insert'
- let pos1 = line(".")
- let pos2 = pos1
- let string= @*
- let replacement = part[0].string.part[1]
- " remove trailing '\n'
- let replacement = substitute( replacement, '\n$', '', '' )
- exe ':s/'.string.'/'.replacement.'/'
- endif
- "
- " 'visual' and mode 'below':
- " <part0>
- " <marked area>
- " <part1>
- " part0 and part1 can consist of several lines
- "
- if mode == 'below'
-
- :'<put! =part[0]
- :'>put =part[1]
-
- let pos1 = line("'<") - len(split(part[0], '\n' ))
- let pos2 = line("'>") + len(split(part[1], '\n' ))
- "" echo part[0] part[1] pos1 pos2
- " " proper indenting
- exe ":".pos1
- let ins = pos2-pos1+1
- exe "normal ".ins."=="
- endif
- "
- endif " ---------- end visual mode
- endif
-
- " restore formatter programm
- let &equalprg = equalprg_save
-
- "------------------------------------------------------------------------------
- " position the cursor
- "------------------------------------------------------------------------------
- exe ":".pos1
- let mtch = search( '<CURSOR>', 'c', pos2 )
- if mtch != 0
- let line = getline(mtch)
- if line =~ '<CURSOR>$'
- call setline( mtch, substitute( line, '<CURSOR>', '', '' ) )
- if a:0 != 0 && a:1 == 'v' && getline(".") =~ '^\s*$'
- normal J
- else
- :startinsert!
- endif
- else
- call setline( mtch, substitute( line, '<CURSOR>', '', '' ) )
- :startinsert
- endif
- else
- " to the end of the block; needed for repeated inserts
- if mode == 'below'
- exe ":".pos2
- endif
- endif
-
- "------------------------------------------------------------------------------
- " marked words
- "------------------------------------------------------------------------------
- " define a pattern to highlight
- call C_HighlightJumpTargets ()
-
- if &foldenable
- " restore folding method
- exe "set foldmethod=".foldmethod_save
- normal zv
- endif
-
-endfunction " ---------- end of function C_InsertTemplate ----------
-
-"------------------------------------------------------------------------------
-" C_HighlightJumpTargets
-"------------------------------------------------------------------------------
-function! C_HighlightJumpTargets ()
- if s:C_Ctrl_j == 'on'
- exe 'match Search /'.s:C_TemplateJumpTarget1.'\|'.s:C_TemplateJumpTarget2.'/'
- endif
-endfunction " ---------- end of function C_HighlightJumpTargets ----------
-
-"------------------------------------------------------------------------------
-" C_JumpCtrlJ {{{1
-"------------------------------------------------------------------------------
-function! C_JumpCtrlJ ()
- let match = search( s:C_TemplateJumpTarget1.'\|'.s:C_TemplateJumpTarget2, 'c' )
- if match > 0
- " remove the target
- call setline( match, substitute( getline('.'), s:C_TemplateJumpTarget1.'\|'.s:C_TemplateJumpTarget2, '', '' ) )
- else
- " try to jump behind parenthesis or strings in the current line
- if match( getline(".")[col(".") - 1], "[\]})\"'`]" ) != 0
- call search( "[\]})\"'`]", '', line(".") )
- endif
- normal l
- endif
- return ''
-endfunction " ---------- end of function C_JumpCtrlJ ----------
-
-"------------------------------------------------------------------------------
-" C_ExpandUserMacros {{{1
-"------------------------------------------------------------------------------
-function! C_ExpandUserMacros ( key )
-
- if has_key( s:C_Template[s:C_ActualStyle], a:key )
- let template = s:C_Template[s:C_ActualStyle][ a:key ]
- else
- let template = s:C_Template['default'][ a:key ]
- endif
- let s:C_ExpansionCounter = {} " reset the expansion counter
-
- "------------------------------------------------------------------------------
- " renew the predefined macros and expand them
- " can be replaced, with e.g. |?DATE|
- "------------------------------------------------------------------------------
- let s:C_Macro['|BASENAME|'] = toupper(expand("%:t:r"))
- let s:C_Macro['|DATE|'] = C_DateAndTime('d')
- let s:C_Macro['|FILENAME|'] = expand("%:t")
- let s:C_Macro['|PATH|'] = expand("%:p:h")
- let s:C_Macro['|SUFFIX|'] = expand("%:e")
- let s:C_Macro['|TIME|'] = C_DateAndTime('t')
- let s:C_Macro['|YEAR|'] = C_DateAndTime('y')
-
- "------------------------------------------------------------------------------
- " delete jump targets if mapping for C-j is off
- "------------------------------------------------------------------------------
- if s:C_Ctrl_j == 'off'
- let template = substitute( template, s:C_TemplateJumpTarget1.'\|'.s:C_TemplateJumpTarget2, '', 'g' )
- endif
-
- "------------------------------------------------------------------------------
- " look for replacements
- "------------------------------------------------------------------------------
- while match( template, s:C_ExpansionRegex ) != -1
- let macro = matchstr( template, s:C_ExpansionRegex )
- let replacement = substitute( macro, '?', '', '' )
- let template = substitute( template, macro, replacement, "g" )
-
- let match = matchlist( macro, s:C_ExpansionRegex )
-
- if match[1] != ''
- let macroname = '|'.match[1].'|'
- "
- " notify flag action, if any
- let flagaction = ''
- if has_key( s:C_MacroFlag, match[2] )
- let flagaction = ' (-> '.s:C_MacroFlag[ match[2] ].')'
- endif
- "
- " ask for a replacement
- if has_key( s:C_Macro, macroname )
- let name = C_Input( match[1].flagaction.' : ', C_ApplyFlag( s:C_Macro[macroname], match[2] ) )
- else
- let name = C_Input( match[1].flagaction.' : ', '' )
- endif
- if name == ""
- return ""
- endif
- "
- " keep the modified name
- let s:C_Macro[macroname] = C_ApplyFlag( name, match[2] )
- endif
- endwhile
-
- "------------------------------------------------------------------------------
- " do the actual macro expansion
- " loop over the macros found in the template
- "------------------------------------------------------------------------------
- while match( template, s:C_NonExpansionRegex ) != -1
-
- let macro = matchstr( template, s:C_NonExpansionRegex )
- let match = matchlist( macro, s:C_NonExpansionRegex )
-
- if match[1] != ''
- let macroname = '|'.match[1].'|'
-
- if has_key( s:C_Macro, macroname )
- "-------------------------------------------------------------------------------
- " check for recursion
- "-------------------------------------------------------------------------------
- if has_key( s:C_ExpansionCounter, macroname )
- let s:C_ExpansionCounter[macroname] += 1
- else
- let s:C_ExpansionCounter[macroname] = 0
- endif
- if s:C_ExpansionCounter[macroname] >= s:C_ExpansionLimit
- echomsg " recursion terminated for recursive macro ".macroname
- return template
- endif
- "-------------------------------------------------------------------------------
- " replace
- "-------------------------------------------------------------------------------
- let replacement = C_ApplyFlag( s:C_Macro[macroname], match[2] )
- let template = substitute( template, macro, replacement, "g" )
- else
- "
- " macro not yet defined
- let s:C_Macro['|'.match[1].'|'] = ''
- endif
- endif
-
- endwhile
-
- return template
-endfunction " ---------- end of function C_ExpandUserMacros ----------
-
-"------------------------------------------------------------------------------
-" C_ApplyFlag {{{1
-"------------------------------------------------------------------------------
-function! C_ApplyFlag ( val, flag )
- "
- " l : lowercase
- if a:flag == ':l'
- return tolower(a:val)
- endif
- "
- " u : uppercase
- if a:flag == ':u'
- return toupper(a:val)
- endif
- "
- " c : capitalize
- if a:flag == ':c'
- return toupper(a:val[0]).a:val[1:]
- endif
- "
- " L : legalized name
- if a:flag == ':L'
- return C_LegalizeName(a:val)
- endif
- "
- " flag not valid
- return a:val
-endfunction " ---------- end of function C_ApplyFlag ----------
-"
-"------------------------------------------------------------------------------
-" C_ExpandSingleMacro {{{1
-"------------------------------------------------------------------------------
-function! C_ExpandSingleMacro ( val, macroname, replacement )
- return substitute( a:val, escape(a:macroname, '$' ), a:replacement, "g" )
-endfunction " ---------- end of function C_ExpandSingleMacro ----------
-
-"------------------------------------------------------------------------------
-" C_SetSmallCommentStyle {{{1
-"------------------------------------------------------------------------------
-function! C_SetSmallCommentStyle ()
- if has_key( s:C_Template, 'comment.end-of-line-comment' )
- if match( s:C_Template['comment.end-of-line-comment'], '^\s*/\*' ) != -1
- let s:C_Com1 = '/*' " C-style : comment start
- let s:C_Com2 = '*/' " C-style : comment end
- else
- let s:C_Com1 = '//' " C++style : comment start
- let s:C_Com2 = '' " C++style : comment end
- endif
- endif
-endfunction " ---------- end of function C_SetSmallCommentStyle ----------
-
-"------------------------------------------------------------------------------
-" C_InsertMacroValue {{{1
-"------------------------------------------------------------------------------
-function! C_InsertMacroValue ( key )
- if s:C_Macro['|'.a:key.'|'] == ''
- echomsg 'the tag |'.a:key.'| is empty'
- return
- endif
- "
- if &foldenable && foldclosed(".") >= 0
- echohl WarningMsg | echomsg s:MsgInsNotAvail | echohl None
- return
- endif
- if col(".") > 1
- exe 'normal a'.s:C_Macro['|'.a:key.'|']
- else
- exe 'normal i'.s:C_Macro['|'.a:key.'|']
- endif
-endfunction " ---------- end of function C_InsertMacroValue ----------
-
-"------------------------------------------------------------------------------
-" insert date and time {{{1
-"------------------------------------------------------------------------------
-function! C_InsertDateAndTime ( format )
- if &foldenable && foldclosed(".") >= 0
- echohl WarningMsg | echomsg s:MsgInsNotAvail | echohl None
- return ""
- endif
- if col(".") > 1
- exe 'normal a'.C_DateAndTime(a:format)
- else
- exe 'normal i'.C_DateAndTime(a:format)
- endif
-endfunction " ---------- end of function C_InsertDateAndTime ----------
-
-"------------------------------------------------------------------------------
-" generate date and time {{{1
-"------------------------------------------------------------------------------
-function! C_DateAndTime ( format )
- if a:format == 'd'
- return strftime( s:C_FormatDate )
- elseif a:format == 't'
- return strftime( s:C_FormatTime )
- elseif a:format == 'dt'
- return strftime( s:C_FormatDate ).' '.strftime( s:C_FormatTime )
- elseif a:format == 'y'
- return strftime( s:C_FormatYear )
- endif
-endfunction " ---------- end of function C_DateAndTime ----------
-
-"------------------------------------------------------------------------------
-" check for header or implementation file {{{1
-"------------------------------------------------------------------------------
-function! C_InsertTemplateWrapper ()
- if index( s:C_SourceCodeExtensionsList, expand('%:e') ) >= 0
- call C_InsertTemplate("comment.file-description")
- else
- call C_InsertTemplate("comment.file-description-header")
- endif
-endfunction " ---------- end of function C_InsertTemplateWrapper ----------
-
-"
-"-------------------------------------------------------------------------------
-" Comment : C/C++ File Sections {{{1
-"-------------------------------------------------------------------------------
-let s:CFileSection = {
- \ "Header\ File\ Includes" : "file-section-cpp-header-includes" ,
- \ "Local\ Macros" : "file-section-cpp-macros" ,
- \ "Local\ Type\ Def\." : "file-section-cpp-typedefs" ,
- \ "Local\ Data\ Types" : "file-section-cpp-data-types" ,
- \ "Local\ Variables" : "file-section-cpp-local-variables" ,
- \ "Local\ Prototypes" : "file-section-cpp-prototypes" ,
- \ "Exp\.\ Function\ Def\." : "file-section-cpp-function-defs-exported" ,
- \ "Local\ Function\ Def\." : "file-section-cpp-function-defs-local" ,
- \ "Local\ Class\ Def\." : "file-section-cpp-class-defs" ,
- \ "Exp\.\ Class\ Impl\." : "file-section-cpp-class-implementations-exported",
- \ "Local\ Class\ Impl\." : "file-section-cpp-class-implementations-local" ,
- \ "All\ sections,\ C" : "c",
- \ "All\ sections,\ C++" : "cpp",
- \ }
-
-function! C_CFileSectionList ( ArgLead, CmdLine, CursorPos )
- return filter( copy( sort(keys( s:CFileSection)) ), 'v:val =~ "\\<'.a:ArgLead.'\\w*"' )
-endfunction " ---------- end of function C_CFileSectionList ----------
-
-function! C_CFileSectionListInsert ( arg )
- if has_key( s:CFileSection, a:arg )
- if s:CFileSection[a:arg] == 'c' || s:CFileSection[a:arg] == 'cpp'
- call C_Comment_C_SectionAll( 'comment.'.s:CFileSection[a:arg] )
- return
- endif
- call C_InsertTemplate( 'comment.'.s:CFileSection[a:arg] )
- else
- echomsg "entry ".a:arg." does not exist"
- endif
-endfunction " ---------- end of function C_CFileSectionListInsert ----------
-"
-"-------------------------------------------------------------------------------
-" Comment : H File Sections {{{1
-"-------------------------------------------------------------------------------
-let s:HFileSection = {
- \ "Header\ File\ Includes" : "file-section-hpp-header-includes" ,
- \ "Exported\ Macros" : "file-section-hpp-macros" ,
- \ "Exported\ Type\ Def\." : "file-section-hpp-exported-typedefs" ,
- \ "Exported\ Data\ Types" : "file-section-hpp-exported-data-types" ,
- \ "Exported\ Variables" : "file-section-hpp-exported-variables" ,
- \ "Exported\ Funct\.\ Decl\." : "file-section-hpp-exported-function-declarations",
- \ "Exported\ Class\ Def\." : "file-section-hpp-exported-class-defs" ,
- \ "All\ sections,\ C" : "c" ,
- \ "All\ sections,\ C++" : "cpp" ,
- \ }
-
-function! C_HFileSectionList ( ArgLead, CmdLine, CursorPos )
- return filter( copy( sort(keys( s:HFileSection)) ), 'v:val =~ "\\<'.a:ArgLead.'\\w*"' )
-endfunction " ---------- end of function C_HFileSectionList ----------
-
-function! C_HFileSectionListInsert ( arg )
- if has_key( s:HFileSection, a:arg )
- if s:HFileSection[a:arg] == 'c' || s:HFileSection[a:arg] == 'cpp'
- call C_Comment_C_SectionAll( 'comment.'.s:HFileSection[a:arg] )
- return
- endif
- call C_InsertTemplate( 'comment.'.s:HFileSection[a:arg] )
- else
- echomsg "entry ".a:arg." does not exist"
- endif
-endfunction " ---------- end of function C_HFileSectionListInsert ----------
-"
-"-------------------------------------------------------------------------------
-" Comment : Keyword Comments {{{1
-"-------------------------------------------------------------------------------
-let s:KeywordComment = {
- \ 'BUG' : 'keyword-bug',
- \ 'COMPILER' : 'keyword-compiler',
- \ 'TODO' : 'keyword-todo',
- \ 'TRICKY' : 'keyword-tricky',
- \ 'WARNING' : 'keyword-warning',
- \ 'WORKAROUND' : 'keyword-workaround',
- \ 'new\ keyword' : 'keyword-keyword',
- \ }
-
-function! C_KeywordCommentList ( ArgLead, CmdLine, CursorPos )
- return filter( copy( sort(keys( s:KeywordComment)) ), 'v:val =~ "\\<'.a:ArgLead.'\\w*"' )
-endfunction " ---------- end of function C_KeywordCommentList ----------
-
-function! C_KeywordCommentListInsert ( arg )
- if has_key( s:KeywordComment, a:arg )
- if s:KeywordComment[a:arg] == 'c' || s:KeywordComment[a:arg] == 'cpp'
- call C_Comment_C_SectionAll( 'comment.'.s:KeywordComment[a:arg] )
- return
- endif
- call C_InsertTemplate( 'comment.'.s:KeywordComment[a:arg] )
- else
- echomsg "entry ".a:arg." does not exist"
- endif
-endfunction " ---------- end of function C_KeywordCommentListInsert ----------
-"
-"-------------------------------------------------------------------------------
-" Comment : Special Comments {{{1
-"-------------------------------------------------------------------------------
-let s:SpecialComment = {
- \ 'EMPTY' : 'special-empty' ,
- \ 'FALL\ THROUGH' : 'special-fall-through' ,
- \ 'IMPL\.\ TYPE\ CONV' : 'special-implicit-type-conversion")' ,
- \ 'NO\ RETURN' : 'special-no-return' ,
- \ 'NOT\ REACHED' : 'special-not-reached' ,
- \ 'TO\ BE\ IMPL\.' : 'special-remains-to-be-implemented' ,
- \ 'constant\ type\ is\ long\ (L)' : 'special-constant-type-is-long' ,
- \ 'constant\ type\ is\ unsigned\ (U)' : 'special-constant-type-is-unsigned' ,
- \ 'constant\ type\ is\ unsigned\ long\ (UL)' : 'special-constant-type-is-unsigned-long' ,
- \ }
-
-function! C_SpecialCommentList ( ArgLead, CmdLine, CursorPos )
- return filter( copy( sort(keys( s:SpecialComment)) ), 'v:val =~ "\\<'.a:ArgLead.'\\w*"' )
-endfunction " ---------- end of function C_SpecialCommentList ----------
-
-function! C_SpecialCommentListInsert ( arg )
- if has_key( s:SpecialComment, a:arg )
- if s:SpecialComment[a:arg] == 'c' || s:SpecialComment[a:arg] == 'cpp'
- call C_Comment_C_SectionAll( 'comment.'.s:SpecialComment[a:arg] )
- return
- endif
- call C_InsertTemplate( 'comment.'.s:SpecialComment[a:arg] )
- else
- echomsg "entry ".a:arg." does not exist"
- endif
-endfunction " ---------- end of function C_SpecialCommentListInsert ----------
-
-"-------------------------------------------------------------------------------
-" Standard Library Includes
-"-------------------------------------------------------------------------------
-function! C_CleanDirNameList ( list )
- let result = copy( a:list )
- let index = 0
- while index < len( result )
- let result[index] = substitute( result[index], '[&\\]', '', 'g' )
- let index = index + 1
- endwhile
- return result
-endfunction " ---------- end of function C_CleanDirNameList ----------
-
-let s:C_StandardLibsClean = C_CleanDirNameList( s:C_StandardLibs )
-let s:C_C99LibsClean = C_CleanDirNameList( s:C_C99Libs )
-let s:Cpp_StandardLibsClean = C_CleanDirNameList( s:Cpp_StandardLibs )
-let s:Cpp_CStandardLibsClean = C_CleanDirNameList( s:Cpp_CStandardLibs )
-
-"-------------------------------------------------------------------------------
-" callback functions used in the filetype plugin ftplugin/c.vim
-" callback functions
-"-------------------------------------------------------------------------------
-
-function! C_IncludesInsert ( arg, List )
- if index( a:List, a:arg ) >= 0
- let zz = "#include\t<".a:arg.'>'
- put =zz
- else
- echomsg "entry ".a:arg." does not exist"
- endif
-endfunction " ---------- end of function C_IncludesInsert
-"
-function! C_StdLibraryIncludesInsert ( arg )
- call C_IncludesInsert ( a:arg, s:C_StandardLibsClean )
-endfunction " ---------- end of function C_StdLibraryIncludesInsert
-
-function! C_C99LibraryIncludesInsert ( arg )
- call C_IncludesInsert ( a:arg, s:C_C99LibsClean )
-endfunction " ---------- end of function C_C99LibraryIncludesInsert
-
-function! C_CppLibraryIncludesInsert ( arg )
- call C_IncludesInsert ( a:arg, s:Cpp_StandardLibsClean )
-endfunction " ---------- end of function C_CppLibraryIncludesInsert
-
-function! C_CppCLibraryIncludesInsert ( arg )
- call C_IncludesInsert ( a:arg, s:Cpp_CStandardLibsClean )
-endfunction " ---------- end of function C_CppCLibraryIncludesInsert
-
-"-------------------------------------------------------------------------------
-" callback functions used in the filetype plugin ftplugin/c.vim
-" custom completion
-"-------------------------------------------------------------------------------
-
-function! C_IncludesList ( ArgLead, CmdLine, CursorPos, List )
- " show all libs
- if a:ArgLead == ''
- return a:List
- endif
- " show libs beginning with a:ArgLead
- let expansions = []
- for item in a:List
- if match( item, '\<'.a:ArgLead.'\w*' ) == 0
- call add( expansions, item )
- endif
- endfor
- return expansions
-endfunction " ---------- end of function C_IncludesList ----------
-"
-function! C_StdLibraryIncludesList ( ArgLead, CmdLine, CursorPos )
- return C_IncludesList ( a:ArgLead, a:CmdLine, a:CursorPos, s:C_StandardLibsClean )
-endfunction " ---------- end of function C_StdLibraryIncludesList ----------
-
-function! C_C99LibraryIncludesList ( ArgLead, CmdLine, CursorPos )
- return C_IncludesList ( a:ArgLead, a:CmdLine, a:CursorPos, s:C_C99LibsClean )
-endfunction " ---------- end of function C_C99LibraryIncludesList ----------
-
-function! C_CppLibraryIncludesList ( ArgLead, CmdLine, CursorPos )
- return C_IncludesList ( a:ArgLead, a:CmdLine, a:CursorPos, s:Cpp_StandardLibsClean )
-endfunction " ---------- end of function C_CppLibraryIncludesList ----------
-
-function! C_CppCLibraryIncludesList ( ArgLead, CmdLine, CursorPos )
- return C_IncludesList ( a:ArgLead, a:CmdLine, a:CursorPos, s:Cpp_CStandardLibsClean )
-endfunction " ---------- end of function C_CppCLibraryIncludesList ----------
-
-"------------------------------------------------------------------------------
-" show / hide the c-support menus
-" define key mappings (gVim only)
-"------------------------------------------------------------------------------
-"
-if has("gui_running")
- "
- call C_ToolMenu()
- "
- if s:C_LoadMenus == 'yes'
- call C_CreateGuiMenus()
- endif
- "
- nmap <unique> <silent> <Leader>lcs :call C_CreateGuiMenus()<CR>
- nmap <unique> <silent> <Leader>ucs :call C_RemoveGuiMenus()<CR>
- "
-endif
-
-"------------------------------------------------------------------------------
-" Automated header insertion
-" Local settings for the quickfix window
-"------------------------------------------------------------------------------
-
-if has("autocmd")
- "
- " Automated header insertion (suffixes from the gcc manual)
- "
- if !exists( 'g:C_Styles' )
- "-------------------------------------------------------------------------------
- " template styles are the default settings
- "-------------------------------------------------------------------------------
- autocmd BufNewFile * if (&filetype=='cpp' || &filetype=='c') |
- \ call C_InsertTemplateWrapper() | endif
- "
- " *.h has filetype 'cpp' by default; this can be changed to 'c' :
- "
- if s:C_TypeOfH=='c'
- autocmd BufNewFile,BufEnter *.h :set filetype=c
- endif
- "
- " C/C++ source code files which should not be preprocessed.
- "
- autocmd BufNewFile,BufRead *.i :set filetype=c
- autocmd BufNewFile,BufRead *.ii :set filetype=cpp
- "
- else
- "-------------------------------------------------------------------------------
- " template styles are related to file extensions
- "-------------------------------------------------------------------------------
- for [ pattern, stl ] in items( g:C_Styles )
- exe "autocmd BufNewFile,BufRead,BufEnter ".pattern." call C_Style( '".stl."' )"
- exe "autocmd BufNewFile ".pattern." call C_InsertTemplateWrapper() | :w!"
- endfor
- "
- endif
- "
- " Wrap error descriptions in the quickfix window.
- "
- autocmd BufReadPost quickfix setlocal wrap | setlocal linebreak
- "
- exe 'autocmd BufRead *.'.join( s:C_SourceCodeExtensionsList, '\|*.' )
- \ .' call C_HighlightJumpTargets()'
- "
-endif " has("autocmd")
-"
-"------------------------------------------------------------------------------
-" READ THE TEMPLATE FILES
-"------------------------------------------------------------------------------
-call C_ReadTemplates(s:C_GlobalTemplateFile)
-if s:installation == 'system' && filereadable( s:C_LocalTemplateFile )
- call C_ReadTemplates( s:C_LocalTemplateFile )
-endif
-"
-"=====================================================================================
-" vim: tabstop=2 shiftwidth=2 foldmethod=marker
diff --git a/.vimrc b/.vimrc
index 64b4dbc..c2a1da5 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,6 +1,7 @@
" bnewbold's .vimrc
-" circa 04/2006
+" circa 2006-2010
+" enable plugins
:filetype plugin on
if has('syntax') && (&t_Co > 2)
@@ -16,48 +17,59 @@ set tabstop=4
set shiftround
set expandtab
set autoindent
-set hidden
+set hidden " allows modified buffers to be hidden
" vtreeexplore
let treeExplVertical=1
let treeExplWinSize=30
let treeExplDirSort=1
-let treeExplNoList=1
-:nmap <F2> :VSTreeExplore<cr>
-let g:buftabs_in_statusline=1
-let g:buftabs_only_basename=1
+let treeExplNoList=0
+"nmap <F2> :VTreeExplore<cr>
+nmap <F2> :Explore<cr>
+"let g:buftabs_in_statusline=1
+"let g:buftabs_only_basename=1
+"let g:buftabs_active_highlight_group="Visual"
-" better vertical split style
+" a more readbly vertical split
hi VertSplit cterm=none ctermfg=LightGray term=none gui=none
-" firefox style ctrl-tabbing with buffers
+" firefox style ctrl-tabbing with buffers; doesn't work in xterm
noremap <C-tab> :bprev<CR>
noremap <C-S-tab> :bnext<CR>
" needed for in xterm with remaping... ugh.
-:nmap <Esc>[27;6;9~ :bprev<CR>
-:nmap <Esc>[27;5;9~ :bnext<CR>
-:map <Esc>[27;6;9~ :bprev<CR>
-:map <Esc>[27;5;9~ :bnext<CR>
-" and for tabbing
-:nmap <C-left> :tabN<CR>
-:nmap <C-right> :tabn<CR>
-:map <C-left> :tabN<CR>
-:map <C-right> :tabn<CR>
-
-" cscope quicklisting
-set cscopequickfix=s-,c-,d-,i-,t-,e-
+nmap <Esc>[27;6;9~ :bprev<CR>
+nmap <Esc>[27;5;9~ :bnext<CR>
+map <Esc>[27;6;9~ :bprev<CR>
+map <Esc>[27;5;9~ :bnext<CR>
+
+" and for tabbing around
+nmap <C-left> :tabN<CR>
+nmap <C-right> :tabn<CR>
+map <C-left> :tabN<CR>
+map <C-right> :tabn<CR>
+
+" and between windows
+noremap <A-h> <C-w>h<CR>
+noremap <A-j> <C-w>j<CR>
+noremap <A-k> <C-w>k<CR>
+noremap <A-l> <C-w>l<CR>
" Searching stuff
set incsearch
set ignorecase
set smartcase
+" this allows the arrow keys to do screen lines instead of file lines
+" (srapped)
+noremap <Up> gk
+noremap <Down> gj
+
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
" for Project Fortress
au BufNewFile,BufRead *.fsi,*.fss set ft=fortress
" for previewing reStructured text (.rst) in firefox
-:command Rst :!rst2html.py "%" > /tmp/rstprev.html && firefox file:///tmp/rstprev.html
+:command! Rst :!rst2html.py "%" > /tmp/rstprev.html && firefox file:///tmp/rstprev.html
:nnoremap <C-p><C-r> :Rst<CR>