Skip to content

Commit

Permalink
C-Support: New submenu 'Preprocessor' -> 'include POSIX header'
Browse files Browse the repository at this point in the history
- Added: submenu 'Preprocessor' -> 'include POSIX header'
- Typos fixed
  • Loading branch information
Fritz Mehner committed Jul 6, 2014
1 parent b30d1dc commit 39b48f4
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 17 deletions.
13 changes: 3 additions & 10 deletions c-support/README.csupport
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for c.vim (Version 6.1.1) / March 22 2014
README for c.vim (Version 6.1.2pre) / July 06 2014

* DESCRIPTION
* INSTALLATION
Expand Down Expand Up @@ -179,16 +179,9 @@ Any problems ? See the TROUBLESHOOTING section at the end of the help file
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

================================================================================
RELEASE NOTES FOR VERSION 6.1.1
RELEASE NOTES FOR VERSION 6.1.2pre
================================================================================
- Added 'C_SetMapLeader' and 'C_ResetMapLeader'.
- Bugfix: Resetting maplocalleader in filetype plug-in after setting it to the
value of g:C_MapLeader.
- Bugfix: Setup of local templates in case of global installation.
- Bugfix: Better compatibility with custom mappings
(use "normal!" and "noremap" consistently).
- 'Help->show manual' shows man page text with appropriate width (UNIX only).
- Extended the documentation.
- Added: submenu 'Preprocessor' -> 'include POSIX header'

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

Expand Down
12 changes: 12 additions & 0 deletions c-support/doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
================================================================================
RELEASE NOTES FOR VERSION 6.1.1
================================================================================
- Added 'C_SetMapLeader' and 'C_ResetMapLeader'.
- Bugfix: Resetting maplocalleader in filetype plug-in after setting it to the
value of g:C_MapLeader.
- Bugfix: Setup of local templates in case of global installation.
- Bugfix: Better compatibility with custom mappings
(use "normal!" and "noremap" consistently).
- 'Help->show manual' shows man page text with appropriate width (UNIX only).
- Extended the documentation.

================================================================================
RELEASE NOTES FOR VERSION 6.1
================================================================================
Expand Down
3 changes: 2 additions & 1 deletion c-support/doc/c-hotkeys.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
%
\setlength\parindent{0pt}
%
\newcommand{\Pluginversion}{6.1.1}
\newcommand{\Pluginversion}{6.1.2pre}
\newcommand{\ReleaseDate}{\today}
\newcommand{\Rep}{{\tiny{[n]}}}
%
Expand Down Expand Up @@ -159,6 +159,7 @@
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{P}reprocessor}} \\
\hline \verb'\pih' & include Std. Lib. header \hfill (n,i)\\
\hline \verb'\piph' & include POSIX header \hfill (n,i)\\
\hline \verb'\pg' & \verb$#include<...>$ (global)\hfill (n,i)\\
\hline \verb'\pl' & \verb$#include"..."$ (local) \hfill (n,i)\\
\hline \verb'\pd' & \verb'#define' \hfill (n,i)\\
Expand Down
22 changes: 22 additions & 0 deletions c-support/rc/customization.cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,25 @@ inoremap <buffer> << <Space><<<Space>
inoremap <buffer> <<" <Space><< ""<Space><Left><Left>
inoremap <buffer> <<; <Space><< "\n";<Left><Left><Left><Left>
"
"-------------------------------------------------------------------------------
" set "maplocalleader" as configured using "g:C_MapLeader"
"-------------------------------------------------------------------------------
call C_SetMapLeader ()
"
"-------------------------------------------------------------------------------
" additional mapping : Make tool
"-------------------------------------------------------------------------------
noremap <buffer> <silent> <LocalLeader>rm :Make<CR>
inoremap <buffer> <silent> <LocalLeader>rm <C-C>:Make<CR>
noremap <buffer> <silent> <LocalLeader>rmc :Make clean<CR>
inoremap <buffer> <silent> <LocalLeader>rmc <C-C>:Make clean<CR>
noremap <buffer> <LocalLeader>rma :MakeCmdlineArgs<space>
inoremap <buffer> <LocalLeader>rma <C-C>:MakeCmdlineArgs<space>
noremap <buffer> <LocalLeader>rcm :MakeFile<space>
inoremap <buffer> <LocalLeader>rcm <C-C>:MakeFile<space>
"
"-------------------------------------------------------------------------------
" reset "maplocalleader"
"-------------------------------------------------------------------------------
call C_ResetMapLeader ()
"
2 changes: 1 addition & 1 deletion c-support/templates/Templates
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
§ User Macros
§ ==========================================================

SetMacro( 'AUTHOR', 'Dr. Fritz mehner' )
SetMacro( 'AUTHOR', 'Dr. Fritz Mehner' )
SetMacro( 'AUTHORREF', 'fgm' )
SetMacro( 'COMPANY', '' )
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )
Expand Down
90 changes: 90 additions & 0 deletions c-support/templates/c.preprocessor.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,96 @@
#include <|PICK|><CURSOR>
== ENDTEMPLATE ==

== LIST: C_PosixHeader == list ==
'aio.h' ,
'arpa/inet.h' ,
'assert.h' ,
'complex.h' ,
'cpio.h' ,
'ctype.h' ,
'dirent.h' ,
'dlfcn.h' ,
'errno.h' ,
'fcntl.h' ,
'fenv.h' ,
'float.h' ,
'fmtmsg.h' ,
'fnmatch.h' ,
'ftw.h' ,
'glob.h' ,
'grp.h' ,
'iconv.h' ,
'inttypes.h' ,
'iso646.h' ,
'langinfo.h' ,
'libgen.h' ,
'limits.h' ,
'locale.h' ,
'math.h' ,
'monetary.h' ,
'mqueue.h' ,
'ndbm.h' ,
'net/if.h' ,
'netdb.h' ,
'netinet/in.h' ,
'netinet/tcp.h' ,
'nl_types.h' ,
'poll.h' ,
'pthread.h' ,
'pwd.h' ,
'regex.h' ,
'sched.h' ,
'search.h' ,
'semaphore.h' ,
'setjmp.h' ,
'signal.h' ,
'spawn.h' ,
'stdarg.h' ,
'stdbool.h' ,
'stddef.h' ,
'stdint.h' ,
'stdio.h' ,
'stdlib.h' ,
'string.h' ,
'strings.h' ,
'stropts.h' ,
'sys/ipc.h' ,
'sys/mman.h' ,
'sys/msg.h' ,
'sys/resource.h' ,
'sys/select.h' ,
'sys/sem.h' ,
'sys/shm.h' ,
'sys/socket.h' ,
'sys/stat.h' ,
'sys/statvfs.h' ,
'sys/time.h' ,
'sys/times.h' ,
'sys/types.h' ,
'sys/uio.h' ,
'sys/un.h' ,
'sys/utsname.h' ,
'sys/wait.h' ,
'syslog.h' ,
'tar.h' ,
'termios.h' ,
'tgmath.h' ,
'time.h' ,
'trace.h' ,
'ulimit.h' ,
'unistd.h' ,
'utime.h' ,
'utmpx.h' ,
'wchar.h' ,
'wctype.h' ,
'wordexp.h' ,
== ENDLIST ==

== Preprocessor.include POSIX header == expandmenu, append, map:piph, shortcut:p ==
|PickList( 'Std. Libs', 'C_PosixHeader' )|
#include <|PICK|><CURSOR>
== ENDTEMPLATE ==

§-------------------------------------------------------------------------
== Preprocessor.include-global == map:pg, shortcut:g, insert ==
#include <<CURSOR>>
Expand Down
91 changes: 90 additions & 1 deletion c-support/templates/cpp.preprocessor.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
'threads.h' ,
'time.h' ,
'uchar.h' ,
'unistd.h' ,
'wchar.h' ,
'wctype.h' ,
== ENDLIST ==
Expand All @@ -36,6 +35,96 @@
#include <|PICK|><CURSOR>
== ENDTEMPLATE ==

== LIST: C_PosixHeader == list ==
'aio.h' ,
'arpa/inet.h' ,
'assert.h' ,
'complex.h' ,
'cpio.h' ,
'ctype.h' ,
'dirent.h' ,
'dlfcn.h' ,
'errno.h' ,
'fcntl.h' ,
'fenv.h' ,
'float.h' ,
'fmtmsg.h' ,
'fnmatch.h' ,
'ftw.h' ,
'glob.h' ,
'grp.h' ,
'iconv.h' ,
'inttypes.h' ,
'iso646.h' ,
'langinfo.h' ,
'libgen.h' ,
'limits.h' ,
'locale.h' ,
'math.h' ,
'monetary.h' ,
'mqueue.h' ,
'ndbm.h' ,
'net/if.h' ,
'netdb.h' ,
'netinet/in.h' ,
'netinet/tcp.h' ,
'nl_types.h' ,
'poll.h' ,
'pthread.h' ,
'pwd.h' ,
'regex.h' ,
'sched.h' ,
'search.h' ,
'semaphore.h' ,
'setjmp.h' ,
'signal.h' ,
'spawn.h' ,
'stdarg.h' ,
'stdbool.h' ,
'stddef.h' ,
'stdint.h' ,
'stdio.h' ,
'stdlib.h' ,
'string.h' ,
'strings.h' ,
'stropts.h' ,
'sys/ipc.h' ,
'sys/mman.h' ,
'sys/msg.h' ,
'sys/resource.h' ,
'sys/select.h' ,
'sys/sem.h' ,
'sys/shm.h' ,
'sys/socket.h' ,
'sys/stat.h' ,
'sys/statvfs.h' ,
'sys/time.h' ,
'sys/times.h' ,
'sys/types.h' ,
'sys/uio.h' ,
'sys/un.h' ,
'sys/utsname.h' ,
'sys/wait.h' ,
'syslog.h' ,
'tar.h' ,
'termios.h' ,
'tgmath.h' ,
'time.h' ,
'trace.h' ,
'ulimit.h' ,
'unistd.h' ,
'utime.h' ,
'utmpx.h' ,
'wchar.h' ,
'wctype.h' ,
'wordexp.h' ,
== ENDLIST ==

== Preprocessor.include POSIX header == expandmenu, append, map:piph, shortcut:p ==
|PickList( 'Std. Libs', 'C_PosixHeader' )|
#include <|PICK|><CURSOR>
== ENDTEMPLATE ==

§-------------------------------------------------------------------------
== Preprocessor.include-global == map:pg, shortcut:g, insert ==
#include <<CURSOR>>
Expand Down
5 changes: 3 additions & 2 deletions doc/csupport.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*csupport.txt* C/C++ Support March 22 2014
*csupport.txt* C/C++ Support July 06 2014

C/C++ Support *c-support* *csupport*
Plugin version 6.1.1
Plugin version 6.1.2pre
for Vim version 7.0 and above
Fritz Mehner <mehner@fh-swf.de>

Expand Down Expand Up @@ -1277,6 +1277,7 @@ Legend: (i) insert mode, (n) normal mode, (v) visual mode
-- Preprocessor -------------------------------------------------------

\pih include standard library header (n,i)
\piph include POSIX header (n,i)
\pg #include <> (global) (n,i)
\pl #include "" (local) (n,i)
\pd #define (n,i)
Expand Down
4 changes: 2 additions & 2 deletions ftplugin/c.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"
" Vim filetype plugin file
"
" Language : C / C++
" Language : C
" Plugin : c.vim
" Maintainer : Fritz Mehner <mehner@fh-swf.de>
" Maintainer : Fritz Mehner <mehner.fritz@fh-swf.de>
"
" ------------------------------------------------------------------------------
"
Expand Down

0 comments on commit 39b48f4

Please sign in to comment.