Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 6.0 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,568 changes: 3,568 additions & 0 deletions autoload/mmtemplates/core.vim

Large diffs are not rendered by default.

44 changes: 28 additions & 16 deletions README.csupport → c-support/README.csupport
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for c.vim (Version 5.18) / March 03 2012
README for c.vim (Version 6.0) / August 17 2012

* DESCRIPTION
* INSTALLATION
Expand Down Expand Up @@ -52,11 +52,11 @@ value of $HOME with ":echo $HOME" from inside Vim).
'$HOME/.vim/c-support/templates/Templates'
Here is the minimal personalization (my settings as an example):

|AUTHOR| = Dr. Fritz Mehner
|AUTHORREF| = fgm
|EMAIL| = [email protected]
|COMPANY| = FH Südwestfalen, Iserlohn
|COPYRIGHT| = Copyright (c) |YEAR|, |AUTHOR|
SetMacro( 'AUTHOR', 'Dr. Fritz Mehner' )
SetMacro( 'AUTHORREF', 'fgm' )
SetMacro( 'EMAIL', 'mehner.fritz@fh-swf.de' )
SetMacro( 'ORGANIZATION','FH Südwestfalen, Iserlohn' )
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )

(Read more about the template system in the plugin documentation)

Expand All @@ -70,7 +70,6 @@ value of $HOME with ":echo $HOME" from inside Vim).
for your .vimrc and .gvimrc. You may want to use parts of them. The files
are documented.


(2) WINDOWS
------------

Expand Down Expand Up @@ -102,15 +101,15 @@ the value of $HOME with ":echo $HOME" from inside Vim).
'$HOME/vimfiles/c-support/templates/Templates'
Here is the minimal personalization (my settings as an example):

|AUTHOR| = Dr. Fritz Mehner
|AUTHORREF| = fgm
|EMAIL| = [email protected]
|COMPANY| = FH Südwestfalen, Iserlohn
|COPYRIGHT| = Copyright (c) |YEAR|, |AUTHOR|
SetMacro( 'AUTHOR', 'Dr. Fritz Mehner' )
SetMacro( 'AUTHORREF', 'fgm' )
SetMacro( 'EMAIL', 'mehner.fritz@fh-swf.de' )
SetMacro( 'ORGANIZATION','FH Südwestfalen, Iserlohn' )
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )

(Read more about the template system in the plugin documentation)

(2.4) Make the plugin help accessable by typing the following command on the
(2.4) Make the plugin help accessible by typing the following command on the
Vim command line:

:helptags $HOME\vimfiles\doc\
Expand Down Expand Up @@ -149,9 +148,19 @@ Any problems ? See the TROUBLESHOOTING section at the end of the help file
================================================================================
RELEASE NOTES
================================================================================
- Hotkeys \lcs, \ucs removed.
- Bugfix: delayed template initialization missing correct style.
- Wrong cursor position when inserting some templates at the end of a line.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ The plug-in version 6.0+ is a rewriting of version 5.19. ++
++ The versions 6.0+ are based on a new and more powerful template system ++
++ (please see |template-support|for more information). ++
++ The template syntax has changed! ++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

- New template system (many thanks to Wolfgang Mehner)
- A few new hotkeys and menu item.
- A few hotkeys and menu items renamed.

Please see file ./c-support/doc/ChangeLog .

Expand All @@ -161,6 +170,8 @@ Any problems ? See the TROUBLESHOOTING section at the end of the help file

README.csupport This file.

autoload/mmtemplates/core.vim The template system.

doc/csupport.txt The help file for the local on-line help.

ftplugin/c.vim A file type plug-in. Define hotkeys, creates a
Expand All @@ -187,6 +198,7 @@ c-support/wordlists/stl_index.list STL: method and type names.
c-support/doc/c-hotkeys.pdf Hotkey reference card.
c-support/doc/ChangeLog The change log.

rc/customization.cpp.vim Additional mappings for C++.
rc/customization.ctags Additional settings I use in .ctags to enable
navigation through makefiles ans qmake files with
the plug-in taglist.vim.
Expand Down
37 changes: 19 additions & 18 deletions c-support/codesnippets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Prerequisites are generated automatically; makedepend is not
# needed (see documentation for GNU make Version 3.81, April 2006,
# section 4.13). The utility sed is used.
#========================================== makefile template version 1.9 ======
#========================================== makefile template version 1.10 =====

# DEBUG can be set to YES to include debugging info, or NO otherwise
DEBUG := YES
Expand All @@ -49,22 +49,6 @@ RELEASE_CFLAGS := -Wall -ansi -pedantic -O3
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 =

Expand Down Expand Up @@ -99,6 +83,22 @@ EXE_CMDLINE =
# The following statements usually need not to be changed
#===============================================================================

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

C_SOURCES = $(filter %.c, $(SOURCES))
CPP_SOURCES = $(filter-out %.c, $(SOURCES))
ALL_INC_DIR = $(addprefix -I, $(LOCAL_INC_DIR) $(GLOBAL_INC_DIR))
Expand Down Expand Up @@ -188,6 +188,7 @@ tarball:
@lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
rm --force $$lokaldir.tar.gz; \
tar --exclude=$(TARBALL_EXCLUDE) \
--exclude=$(EXECUTABLE) \
--create \
--gzip \
--verbose \
Expand All @@ -196,7 +197,7 @@ tarball:
# ------------ zip -------------------------------------------------------------
zip:
@lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
zip -r $$lokaldir.zip * -x $(ZIP_EXCLUDE)
zip -r $$lokaldir.zip * -x $(ZIP_EXCLUDE) -x ${EXECUTABLE}

.PHONY: clean tarball zip

Expand Down
43 changes: 19 additions & 24 deletions c-support/codesnippets/Makefile.multi-target.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
# File: Makefile
# Description:
#
# Usage: make (generate executable(s) )
# make clean (remove objects, executables, prerequisits )
# make tarball (generate compressed archive )
# make zip (generate compressed archive )
# Usage: make (generate executable(s) )
# make clean (remove objects, executables )
# make tarball (generate compressed archive )
# make zip (generate compressed archive )
#
# Author: Dr.-Ing. Fritz Mehner
# Email: [email protected]
# Created:
# Created: 03.04.2012
#
#===============================================================================

TARGETS = target1 target2

CC = gcc
CCP = g++
CFLAGS = -c -g -Wall
LFLAGS = -g
SYS_LIBS = -lm
TARBALL_EXCLUDE = "*.{o,gz,zip}"
ZIP_EXCLUDE = *.o *.gz *.zip
TARBALL_INCLUDE = *.{c,h,cc,hh} Makefile
ZIP_INCLUDE = $(TARBALL_INCLUDE)

TARGETS = target_1 target_2

#---------- targets --------------------------------------
all: $(TARGETS)
Expand All @@ -35,36 +35,31 @@ all: $(TARGETS)
$(CCP) $(CFLAGS) $*.cc

#---------- target 1 -------------------------------------
# C target
target_1: target_1.o
# ----- C target
target1: target1.o
$(CC) $(LFLAGS) -o $@ [email protected] $(SYS_LIBS)

#---------- target 2 -------------------------------------
# C++ target
target_2: target_2.o
# ----- C++ target
target2: target2.o
$(CCP) $(LFLAGS) -o $@ [email protected] $(SYS_LIBS)


#---------- target 3 -------------------------------------



#---------- tarball --------------------------------------
tarball:
lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
@lokaldir=`pwd`; lokaldir=$${lokaldir##*/};\
rm --force $$lokaldir.tar.gz; \
tar --exclude=$(TARBALL_EXCLUDE) \
--create \
tar --create \
--gzip \
--verbose \
--file $$lokaldir.tar.gz *
--file $$lokaldir.tar.gz \
$(TARBALL_INCLUDE)

#---------- zip ------------------------------------------
zip:
lokaldir=`pwd`; lokaldir=$${lokaldir##*/}; \
zip -r $$lokaldir.zip * -x $(ZIP_EXCLUDE)
@lokaldir=`pwd`; lokaldir=$${lokaldir##*/};\
zip -r $$lokaldir.zip $(ZIP_INCLUDE)

#---------- clear up -------------------------------------
clean:
rm --force $(EXECUTABLE) $(OBJECTS) $(PREREQUISITES)
rm --force $(TARGETS) *.o

21 changes: 21 additions & 0 deletions c-support/codesnippets/Makefile.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#=======================================================================================
#
# Filename: Makefile.pro
# Description: qmake project file
#
# Usage: qmake
#
# Version: 1.0
# Created:
# Revision: ---
# Author:
# Company:
# Email:
#=======================================================================================

TEMPLATE = app
CONFIG = debug warn_on
SOURCES +=
HEADERS +=
TARGET =

Loading