summaryrefslogtreecommitdiffstats
path: root/.vim/c-support/rc
diff options
context:
space:
mode:
Diffstat (limited to '.vim/c-support/rc')
-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
4 files changed, 295 insertions, 0 deletions
diff --git a/.vim/c-support/rc/customization.ctags b/.vim/c-support/rc/customization.ctags
new file mode 100644
index 0000000..323cbbc
--- /dev/null
+++ b/.vim/c-support/rc/customization.ctags
@@ -0,0 +1,8 @@
+
+--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
new file mode 100644
index 0000000..31befe7
--- /dev/null
+++ b/.vim/c-support/rc/customization.gvimrc
@@ -0,0 +1,57 @@
+"===================================================================================
+" 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
new file mode 100644
index 0000000..95f6081
--- /dev/null
+++ b/.vim/c-support/rc/customization.indent.pro
@@ -0,0 +1,8 @@
+--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
new file mode 100644
index 0000000..917018a
--- /dev/null
+++ b/.vim/c-support/rc/customization.vimrc
@@ -0,0 +1,222 @@
+"===================================================================================
+" 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")
+