aboutsummaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim')
-rw-r--r--.vim/.gitignore7
-rw-r--r--.vim/.gitmodules3
-rw-r--r--.vim/colors/coderonline.vim180
-rw-r--r--.vim/doc/INSTALL42
-rw-r--r--.vim/doc/coderonline-vim.pngbin195172 -> 0 bytes
-rw-r--r--.vim/doc/readme.md8
-rw-r--r--.vim/doc/shortcuts.txt50
-rw-r--r--.vim/favicon.icobin32038 -> 0 bytes
-rw-r--r--.vim/gvim.desktop10
-rw-r--r--.vim/indent/.keep1
m---------.vim/plugins/Vundle.vim0
-rw-r--r--.vim/spell/.keep1
-rw-r--r--.vim/temp/.keep3
-rw-r--r--.vim/vimrc233
14 files changed, 0 insertions, 538 deletions
diff --git a/.vim/.gitignore b/.vim/.gitignore
deleted file mode 100644
index 93df1ba..0000000
--- a/.vim/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
1/temp/**
2!temp/.keep
3/intent/**
4!indent/.keep
5/spell/**
6!spell/.keep
7/systags
diff --git a/.vim/.gitmodules b/.vim/.gitmodules
deleted file mode 100644
index 57ae747..0000000
--- a/.vim/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
1[submodule "plugins/Vundle.vim"]
2 path = plugins/Vundle.vim
3 url = https://github.com/VundleVim/Vundle.vim.git
diff --git a/.vim/colors/coderonline.vim b/.vim/colors/coderonline.vim
deleted file mode 100644
index f842b28..0000000
--- a/.vim/colors/coderonline.vim
+++ /dev/null
@@ -1,180 +0,0 @@
1" color theme for vim
2" Maintainer: Max Christian Pohle <max@coderonline.de>
3" Last Change: 07.09.2015
4" Web: http://max.coderonline.de/
5
6set background=dark
7hi clear
8if exists("syntax_on")
9 syntax reset
10endif
11let g:colors_name="coderonline"
12
13
14"set guifont=Andale\ Mono\ 12
15set guifont=Liberation\ Mono\ Normal\ 11
16"set guifont=Meslo\ LG\ S\ DZ\ for\ Powerline\ 14
17"set guifont=Monospace\ 11
18"set guifont=DejaVu\ Sans\ Mono\ 11
19"set guifont=Liberation\ Mono\ for\ Powerline\ 11
20"set guifont=Envy\ Code\ R\ 11
21
22set number
23set hls
24
25highlight Menu gui=none cterm=none term=none guibg=white ctermbg=white guifg=black ctermfg=black
26highlight Scrollbar gui=none cterm=none term=none guibg=white ctermbg=white guifg=black ctermfg=black
27highlight Tooltip gui=none cterm=none term=none guibg=yellow ctermbg=yellow guifg=black ctermfg=black
28
29highlight Normal gui=none cterm=none term=none guibg=white ctermbg=white guifg=black ctermfg=black
30highlight! link NonText Normal
31
32highlight Statement gui=bold cterm=bold term=bold guibg=white ctermbg=white guifg=#0000ff ctermfg=21
33highlight! link Boolean Statement
34highlight! link Identifier Statement
35
36highlight Type gui=bold cterm=bold term=bold guibg=white ctermbg=white guifg=DarkBlue ctermfg=darkblue
37
38highlight Constant gui=none cterm=none term=none guibg=white ctermbg=white guifg=brown ctermfg=brown
39highlight! link String Constant
40highlight! link Number Constant
41
42highlight Comment gui=none cterm=none term=none guibg=white ctermbg=white guifg=DarkGreen ctermfg=DarkGreen
43highlight! link PreProc Comment
44
45highlight StatusLine gui=bold cterm=bold term=bold guibg=lightgray ctermbg=lightgray guifg=darkgray ctermfg=darkgrey
46highlight! link StatusLineNC StatusLine
47
48highlight LineNr gui=none cterm=none term=none guibg=lightgray ctermbg=lightgray guifg=black ctermfg=black
49highlight CursorLine gui=none cterm=none term=none guibg=lightgray ctermbg=lightgray
50" highlight! link CursorLine LineNr
51" highlight! link CursorColumn LineNr
52" highlight! link ColorColumn LineNr
53
54" Cursor the character under the cursor
55highlight Cursor gui=inverse cterm=inverse term=inverse guibg=lightgray ctermbg=lightgray guifg=black ctermfg=black
56highlight iCursor gui=underline cterm=underline term=underline
57highlight! link CursorLineNr Cursor
58highlight! link CursorIM Cursor
59highlight! link Visual Cursor
60highlight! link VirualNOS Cursor
61" highlight! link MatchParen LineNr
62highlight MatchParen guibg=yellow ctermbg=yellow
63
64" WildMenu current match in 'wildmenu' completion
65" Pmenu Popup menu: normal item.
66" PmenuSel Popup menu: selected item.
67" PmenuSbar Popup menu: scrollbar.
68" PmenuThumb Popup menu: Thumb of the scrollbar.
69highlight! link WildMenu Todo
70highlight! link Popup LineNr
71highlight! link PMenu Popup
72highlight! link PMenuSel CursorLineNr
73highlight! link PMenuSbar CursorLineNr
74highlight! link PMenuThumb CursorLineNr
75
76
77" Windows
78highlight Title gui=bold cterm=bold term=bold guibg=lightgray ctermbg=lightgray guifg=darkgray ctermfg=darkgray
79highlight! link VertSplit Title
80highlight! link StatusLine Title
81highlight! link StatusLineNC Title
82highlight! link TabLine Title
83highlight! link TabLineFill TabLine
84highlight! link TabLineSel TabLine
85highlight TabLineSel gui=inverse cterm=inverse term=inverse
86
87highlight cParen gui=none cterm=none term=none guibg=white ctermbg=white guifg=orange ctermfg=brown
88highlight cBlock gui=none cterm=none term=none guibg=white ctermbg=cyan guifg=orange ctermfg=brown
89highlight vimParenSep gui=none cterm=none term=none guibg=white ctermbg=white guifg=orange ctermfg=brown
90
91highlight Special gui=bold cterm=bold term=bold guibg=white ctermbg=white guifg=black ctermfg=178
92highlight! link SpecialKey Special
93
94highlight Todo gui=none cterm=none term=none guibg=yellow ctermbg=yellow guifg=black ctermfg=black
95highlight! link ModeMsg Todo
96highlight! link MoreMsg Todo
97highlight! link ErrorMsg Todo
98highlight! link Conceal Todo
99highlight! link Directory Todo
100
101highlight Question gui=bold cterm=bold term=bold guibg=white ctermbg=white guifg=black ctermfg=black
102highlight! link WarningMsg Question
103
104highlight SpellBad gui=underline cterm=underline term=underline ctermbg=white
105highlight! link SpellCap SpellBad
106highlight! link SpellLocal Todo
107highlight! link SpellRare Todo
108" *hl-Conceal*
109" *hl-DiffAdd*
110" DiffAdd diff mode: Added line |diff.txt|
111" *hl-DiffChange*
112" DiffChange diff mode: Changed line |diff.txt|
113" *hl-DiffDelete*
114" DiffDelete diff mode: Deleted line |diff.txt|
115" *hl-DiffText*
116" DiffText diff mode: Changed text within a changed line |diff.txt|
117" *hl-ErrorMsg*
118" Folded line used for closed folds
119" *hl-FoldColumn*
120" FoldColumn 'foldcolumn'
121" *hl-SignColumn*
122" SignColumn column where |signs| are displayed
123" *hl-IncSearch*
124" IncSearch 'incsearch' highlighting; also used for the text replaced with
125" ":s///c"
126" *hl-LineNr*
127" MatchParen The character under the cursor or just before it, if it
128" is a paired bracket, and its match. |pi_paren.txt|
129"
130" *hl-ModeMsg*
131" *hl-NonText*
132" *hl-Search*
133" Search Last search pattern highlighting (see 'hlsearch').
134" Also used for highlighting the current line in the quickfix
135" window and similar items that need to stand out.
136" *hl-SpecialKey*
137" to show unprintable characters in the text, 'listchars'.
138" Generally: text that is displayed differently from what it
139" really is.
140" *hl-SpellBad*
141
142
143" ====================== Important bits ======================
144"exe 'hi Normal guifg='.s:white .' guibg='.s:darkgrey
145"exe 'hi String guifg='.s:green .' guibg='.s:darkgrey .' gui=bold'
146"exe 'hi Function guifg='.s:violet .' guibg='.s:darkgrey .' gui=none'
147"exe 'hi Operator guifg='.s:light_orange .' guibg='.s:darkgrey .' gui=none'
148"exe 'hi Type guifg='.s:yellow .' guibg='.s:darkgrey .' gui=bold'
149"exe 'hi Number guifg='.s:orange .' guibg='.s:darkgrey .' gui=none'
150"exe 'hi Constant guifg='.s:red .' guibg='.s:darkgrey .' gui=none'
151"exe 'hi Macro guifg='.s:magenta .' guibg='.s:darkgrey .' gui=none'
152"exe 'hi PreProc guifg='.s:grey_blue .' guibg='.s:darkgrey .' gui=none'
153"exe 'hi Keyword guifg='.s:light_orange .' guibg='.s:darkgrey .' gui=none'
154"exe 'hi Comment guifg='.s:white .' guibg='.s:darkgrey .' gui=italic'
155"exe 'hi TODO guifg='.s:grey_blue .' guibg='.s:darkgrey .' gui=italic,bold'
156" Lay out our palette
157let s:grey_blue = '#8a9597'
158let s:light_grey_blue = '#a0a8b0'
159let s:dark_grey_blue = '#34383c'
160let s:mid_grey_blue = '#64686c'
161let s:beige = '#ceb67f'
162let s:light_orange = '#ebc471'
163let s:yellow = '#e3d796'
164let s:violet = '#a982c8'
165let s:magenta = '#a933ac'
166let s:green = '#e0a96f'
167let s:lightgreen = '#c2c98f'
168let s:red = '#d08356'
169let s:cyan = '#74dad9'
170let s:darkgrey = '#1a1a1a'
171let s:grey = '#303030'
172let s:lightgrey = '#605958'
173let s:white = '#fffedc'
174let s:orange = '#d08356'
175
176" ~~~ These are specific to color_coded ~~~
177exe 'hi Member guifg=#0000aa gui=italic'
178exe 'hi Variable guifg=#8800aa gui=none'
179exe 'hi Namespace guifg=#aa0000 gui=none'
180exe 'hi EnumConstant guifg=#00aaaa gui=none'
diff --git a/.vim/doc/INSTALL b/.vim/doc/INSTALL
deleted file mode 100644
index 50a2f08..0000000
--- a/.vim/doc/INSTALL
+++ /dev/null
@@ -1,42 +0,0 @@
1# INSTALL
2# this should briefly show you how to install this bundle
3#
4# step 1)
5# download the current version using git
6git clone http://git.entwicklerseite.de/vim .vim/
7
8# step 2)
9# create a symbolic link to the downloaded vim.rc in you $HOME-directory
10ln -s .vim/vimrc .vimrc
11
12# step 3)
13# get vim submodules, namely this is just vundle as this will download the rest by itsown
14git submodule update --init --recursive
15
16# step 4)
17# fix errors caused by the different vim version you might be using and define the spell checkers language. Starting Vim will show you which lines are not supported on your vim installation so that you can fix them:
18vim vimrc
19
20# step 5)
21# download plugins and spell file for your language
22vim -c ":VundleUpdate"
23vim -c ":set spell"
24# vim +set\ spell # < maybe that works as well
25
26# step 6)
27# build YouCompleteMe (if you plan to use it)
28cd plugins/YouCompleteMe
29python2 ./install.py --clang-completer
30
31
32# step 7)
33# create an entry in file managers right click menu 'open with' allowing you to open the file in a vim tab
34mkdir -p .local/share/Thunar/sendto/
35cp ~/.vim/gvim-tab.desktop ~/.local/share/Thunar/sendto/
36
37# step 8)
38# add gvim functionality to thunar, so that sendto can be used to open a file in an existing vim instance (as a tab in this case)
39cp ~/.vim/gvim-tab.desktop ~/.local/share/applications/
40update-desktop-database ~/.local/share/applications/
41
42
diff --git a/.vim/doc/coderonline-vim.png b/.vim/doc/coderonline-vim.png
deleted file mode 100644
index ac76bff..0000000
--- a/.vim/doc/coderonline-vim.png
+++ /dev/null
Binary files differ
diff --git a/.vim/doc/readme.md b/.vim/doc/readme.md
deleted file mode 100644
index 800c1a2..0000000
--- a/.vim/doc/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
1<h1>vim configuration</h1>
2This is the configuration I am using.
3
4
5<h2>coderonline.vim - colorscheme</h2>
6<a href="/vim/plain/doc/coderonline-vim.png">
7 <img src="/vim/plain/doc/coderonline-vim.png" width="720" alt="screenshot of vim" />
8</a>
diff --git a/.vim/doc/shortcuts.txt b/.vim/doc/shortcuts.txt
deleted file mode 100644
index 9c168f9..0000000
--- a/.vim/doc/shortcuts.txt
+++ /dev/null
@@ -1,50 +0,0 @@
1[normal mode]
2f{char} - move cursor to the character {char}
3
4
5[visual mode] - with selected lines
6gq - formats text so that it fits in whatever :set textwidth was set
7iB - select block between curly braces (:help object-select)
8
9
10[commands]
11:spell [word] - adds a word to the current dictionary (no mistake any more)
12:set list - display non printable characters
13:retab - replaces tabs with spaces
14:set expandtab - in insert mode: replace tab with spaces
15
16
17[navigation]
18<CTRL-]> - look up the tag under the cursor (help links as well)
19<CTRL-T> - return back from tag under the cursor
20
21
22[macros] - record and play back a series of vim commands
23qa - start (q) macro recording in register a (can be anything)
24q - stop macro recording
25@a - replay macro a
26:'<,'>normal @a - apply a to every line in the current selection
27
28
29[marker]
30ma - set marker a-z (a in this case)
31'a - go to marker a
32
33
34[hotkeys]
35<C-A>, <C-X> - increment, decrement number under the cursor
36
37
38[windows]
39<C-W>v - splits buffer vertically (screen uses |)
40<C-W>s - splits buffer horizontally (same as screen)
41<C-W>w - moves the cursor to the next window and back
42<C-W>[dir] - moves the cursor in that direction (use hjkl or arrow keys)
43
44
45[vimdiff]
46do - get changes from other window into the current
47dp - put changes from current window into the other
48]c - jump to the next change
49[c - jump to the prevous change
50zR - opens all folds (unfold all)
diff --git a/.vim/favicon.ico b/.vim/favicon.ico
deleted file mode 100644
index ca0b3c3..0000000
--- a/.vim/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/.vim/gvim.desktop b/.vim/gvim.desktop
deleted file mode 100644
index 37c6e58..0000000
--- a/.vim/gvim.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
1[Desktop Entry]
2Name=Vi IMproved Tab
3Comment=Open file in an existing instance of vi and in a new tab
4MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
5Exec=gvim f -N --remote-tab %F
6Icon=gvim
7Type=Application
8Terminal=false
9X-XClassHintResName=VIM
10Categories=Utility;TextEditor;
diff --git a/.vim/indent/.keep b/.vim/indent/.keep
deleted file mode 100644
index f8e463a..0000000
--- a/.vim/indent/.keep
+++ /dev/null
@@ -1 +0,0 @@
1this directory gets used for custom indentation rules. file naming follows the extension of the files the indentation is for and the extension .vim.
diff --git a/.vim/plugins/Vundle.vim b/.vim/plugins/Vundle.vim
deleted file mode 160000
Subproject 4984767509e3d05ca051e253c8a8b37de784be4
diff --git a/.vim/spell/.keep b/.vim/spell/.keep
deleted file mode 100644
index 6d81f6e..0000000
--- a/.vim/spell/.keep
+++ /dev/null
@@ -1 +0,0 @@
1vim will automatically download spellchecker dictionaries to this directory
diff --git a/.vim/temp/.keep b/.vim/temp/.keep
deleted file mode 100644
index 3d99c12..0000000
--- a/.vim/temp/.keep
+++ /dev/null
@@ -1,3 +0,0 @@
1this directory is meant to store backups and undo files. it improves the vim
2experience when working with fuse mounted file systems, because they can get
3really slow when doing those things remotely
diff --git a/.vim/vimrc b/.vim/vimrc
deleted file mode 100644
index e03c5e1..0000000
--- a/.vim/vimrc
+++ /dev/null
@@ -1,233 +0,0 @@
1" vi:columns=160:list:ts=2:sts=2:sw=2
2"================================================================================
3" Vundle: plugin manager...
4set nocompatible | " do not try to be vi, be vim (required by Vundle)
5filetype off | " Vundle needs this
6set rtp+=~/.vim/plugins/Vundle.vim | " set runtimepath (required by Vundle)
7call vundle#begin('~/.vim/plugins/') | " location where Vundle searches&installs plugins
8
9" Plugin dependant configurations...
10Plugin 'VundleVim/Vundle.vim' | " Vundle itself (required)
11Plugin 'cscope_plus.vim' | " run cscope -R -b in project folder then use
12Plugin 'autoload_cscope.vim' | " CTRL+\ s searches word under cursor, CTRL+T back
13Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin
14Plugin 'jeaye/color_coded' | " semantic highlighting with vim
15Plugin 'terryma/vim-multiple-cursors' | " displays visual block mode as cursors
16
17Plugin 'taglist-plus' | " quick code navigator
18Plugin 'jdonaldson/vaxe' | " code completion for haxe
19Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages
20Plugin 'loremipsum' | " Sample text generator
21let Tlist_Compact_Format = 1 | "
22let Tlist_GainFocus_On_ToggleOpen = 1 | "
23let Tlist_Close_On_Select = 1 | "
24
25Plugin 'Valloric/YouCompleteMe' | " syntax checker and code completion
26let g:ycm_global_ycm_extra_conf = '~/.vim/ycm_extra_conf.py' | " fallback, right one should be in the applications path
27let g:ycm_confirm_extra_conf = 0 | " disable 'do you really want to execute .py?'
28let g:ycm_key_select_completion = '<Tab>' | " key completion key
29let g:ycm_error_symbol = '✖' | " insert this as an error symbol in the gutter bar
30let g:ycm_warning_symbol = '➔' | " insert this as a warning symbol in the gutter bar
31let g:ycm_collect_identifiers_from_tags_files = 1 | "
32let g:ycm_autoclose_preview_window_after_insertion=1 | " close the window when leaving insert mode
33"let g:ycm_semantic_triggers = {'c' : ['(', ',']} | " add additional triggers (not recommend)
34
35let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle
36let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css
37
38call vundle#end() | " required by Vundle
39filetype plugin indent on | " required by Vundle
40"================================================================================
41" custom config
42colorscheme coderonline
43syntax enable
44
45set noswapfile | " noundofile, nobackup, nowritebackup
46set backupdir=~/.vim/temp | " using :set backup will copy current file to this directory
47set directory=~/.vim/temp | "
48set undodir=~/.vim/temp | "
49
50set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth)
51set autoindent | " always set autoindenting on
52set copyindent | " copy the previous indentation on autoindenting
53set scrolloff=2 | " always keeps at least two lines visible (when seeking)
54" set selectmode=mouse | " avoid using select mode (only with mouse)
55set mousemodel=popup_setpos | " display a default right click menu for the selection (that is c&p is possible)
56set selection=exclusive | " includes last character of the selection into following command (like x or d)
57
58set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap
59set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap
60set diffopt+=iwhite,filler | " lets diff ignore white spaces
61set spell spelllang=en,de | " enable spell checker
62set virtualedit=onemore | " one character beyond the line length should be navigatable (options: all,insert,block,onemore)
63set breakindent cpoptions+=n | " when wrapping lines indent wrapped line to align with the previews
64set linebreak | " do not wrap in the middle of words
65set showcmd | " displays status line messages while selecting (matrix size)
66set nofoldenable | " do not fold code automatically
67set tags+=~/.vim/systags | " ctags -R -f ~/.vim/systags /usr/include /usr/local/include
68set wildmenu wildmode=full | " wildmenu code completion
69
70" search...
71set ignorecase smartcase | " if search pattern contains uppercase then search is case sensitive
72set incsearch | " do incremental searching
73set showmatch matchtime=4 | " blinks matching braces
74
75set novisualbell | " don't beep
76set noerrorbells | " don't beep
77set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
78set number | " toggle line numbers
79
80if has("multi_byte")
81 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below)
82 scriptencoding utf-8 | " tell vim that we are using utf-8 here
83 set showbreak+=› | " symbol used in the beginning of a wrapped line
84 set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
85 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
86 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
87 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
88 set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars)
89endif
90
91if has("autocmd")
92 set modeline | " set variables specific to a file, like indentation by adding a comment
93 set modelines=3 | " how many lines in the beginning and end of the file can be mode lines?
94
95 augroup resCur | " make cursor appear in its previous position when reopening a file...
96 autocmd BufReadPost * call setpos(".", getpos("'\""))
97 augroup END
98
99 augroup PreviewOnBottom | " will open new windows below the current (only in insert mode, so that the preview window is drawn below)
100 autocmd InsertEnter * set splitbelow
101 autocmd InsertLeave * set splitbelow!
102 augroup END
103
104 augroup OmniFunc | " this will enable omnicomplete just in case this configuration runs somewhere, where YouCompleteMe is not compiled
105 if exists("+omnifunc")
106 autocmd Filetype *
107 \ if &omnifunc == "" |
108 \ setlocal omnifunc=syntaxcomplete#Complete |
109 \ setlocal completeopt=longest,menuone |
110 \ endif
111 endif
112 augroup END
113
114 autocmd FileType text setlocal textwidth=78 | " text files: set 'textwidth' to 78
115 autocmd FileType gitcommit set tw=72 | " longer commit messages without auto line wrapping
116 autocmd FileType LaTeX let g:tex_flavor = "latex"| set conceallevel=1| set concealcursor=
117 autocmd BufNewFile,BufReadPost *.config set filetype=xml | " visual studio config file
118 autocmd BufNewFile,BufReadPost *.csproj set filetype=xml | " visual studio project file
119 autocmd BufNewFile,BufReadPost *.sln set filetype=xml | " visual studio solution file
120endif
121
122"================================================================================
123" gui stuff and appearance
124if &t_Co > 2
125 set hlsearch | " highlight all search matches
126 set cursorline | " highlight currently selected line
127endif
128
129
130if has("gui_running")
131 set mouse=a | " use mouse in gui-mode (which is default)
132 set mouseshape+=n:beam,v:beam | " display a text input cursor even in normal and selection mode
133 set guicursor=n-v-c:ver30-Cursor-blinkon500-blinkoff500 | " how the caret looks like
134 set guitablabel=%t | " do not display full path as tabname
135 set guioptions+=m | " menu bar
136 set guioptions+=T | " toolbar
137 set guioptions+=r | " right-hand scroll bar
138 set guioptions-=c | " use console dialogs instead of popups
139 set guioptions+=a | " autoselect: copy&paste using middleclick
140 set guioptions+=e | " add tab pages
141 set guioptions+=p | " use gui pointer callback for x11
142 set toolbariconsize=large | " make the icon toolbar as big as possible
143 "set columns=80 | " set initial window width (so that it fits the terminals)
144else
145 if &term =~? 'mlterm\|xterm\|screen'
146 set t_Co=256 | " fixes incompatibilities with our color scheme
147 endif
148 set mouse=nh | " limits mouse usage to normal mode and help files, so that middle click text insertion works in insert mode
149 set title | " set the terminal caption
150 set icon | " sets the terminal icon to vim
151 set ttyfast | " modern terminals are all fast in a way
152 "set titleold="vim ended" | " set terminal title after closing vim
153 "set titlestring="VIM-CONSOLE" | " set window title
154 "if has('mouse')
155 "endif
156endif
157
158
159"================================================================================
160" custom commands...
161map <C-h> <C-w>h|map <C-j> <C-w>j| " window navigation shortcuts
162map <C-k> <C-w>k|map <C-l> <C-w>l| " window navigation shortcuts
163
164cmap w!! w !sudo tee % >/dev/null| " write :w!! to execute :w as root user
165
166" custom hotkeys...
167nnoremap <C-Tab> :tabnext<CR>| " lets one use CTRL+Tab to switch between tabs
168nnoremap <C-S-Tab> :tabprevious<CR>| " use CTRL+Shift+Tab to switch to preview tab
169
170nnoremap j gj|nnoremap k gk| " do not jump over wrapped lines
171
172nnoremap $ g$| " and make the $ key position the cursor after the last char of that line, not before
173nnoremap <End> g$| " and make the <End> key position the cursor after the last char of that line
174function ExtendedHome()
175 let column = col('.')
176 normal! ^
177 if column == col('.')
178 normal! 0
179 endif
180endfunction
181noremap <Home> ^
182noremap <silent> <Home> :call ExtendedHome()<CR>
183
184nnoremap <C-z> u
185
186
187"map <C-Right> el
188"map <C-left> hgel
189"vnoremap <C-S-Right> e
190"vnoremap <C-S-left> b
191
192
193" plugin hotkeys
194map <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L
195inoremap <buffer> ( <C-X><C-o><C-p>(| " when opening a bracket: call the OmniComplete function, display the menu, but deselect the first entry (C-p)
196
197
198set makeprg=make\ test
199nnoremap <F5> :!make<CR>| " classic key binding: press F5 to compile and execute (if you have a Makefile with make test doing that)
200
201
202"================================================================================
203" deactivated on-demand commands (just in case one needs them one day)
204"
205" code completion: http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE
206" reacts on CTRL+P, CTRL+Space
207"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
208"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
209"inoremap <expr> <Down> pumvisible() ? "\<C-n>" : "\<Down>"
210"inoremap <expr> <Up> pumvisible() ? "\<C-p>" : "\<Up>"
211"inoremap <expr> <PageDown> pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<PageDown>"
212"inoremap <expr> <PageUp> pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<PageUp>"
213" set guiheadroom=0| " do not fill non-functional area of the empty editor with gtk background
214" map shift-right to visually select and so on
215"nnoremap <C-Right> El
216"nnoremap <S-Right> vl
217"nnoremap <S-Left> vj
218"nnoremap <S-Up> vk
219"nnoremap <S-Down> vj
220" noremap % v% " jump between braces and highlight
221"nnoremap <Home> ^
222"vmap <Home> ^
223"nnoremap <End> $
224"vmap <End> $
225"nnoremap <C-Tab> <C-PageDown>
226"nnoremap <C-S-Tab> <C-PageUp>
227":inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
228"inoremap <expr> <Esc> pumvisible() ? "\<C-e>" : "\<Esc>" " breaks cursor keys!
229" binding ESC can easily break cursor key movement on the console (tricky, because gvim works)
230"inoremap <C-Space> <C-x><C-o>
231"inoremap <C-@> <C-Space>
232"
233"map <Esc>OA k|map <Esc>OB j|map <Esc>OC l|map <Esc>OD h| " allow cursor keys in insert mode
..