set nocompatible
-
-" Pathogen runtime path manipulation
-"call pathogen#infect() "Using the infect method breaks ft detection
-filetype off
-call pathogen#runtime_append_all_bundles()
-call pathogen#helptags()
-
set encoding=utf8
-
-"Activate syntax highlighting
-syntax on
-"Activate filetype plugins: syntax highlighting, indentation, and more
-filetype plugin indent on
-
set modeline
set number
set backspace=indent,eol,start
-"vim-7 and newer has vimspell (spell checker) built in
+set tagstack
+set grepprg=grep\ -nH\ $*
+set foldcolumn=1
+
+set incsearch
+set hlsearch
+
+set cursorline
+set laststatus=2
+
+set listchars=tab:»,trail:·,eol:$
+
+set autoindent
+set tabstop=4
+set shiftwidth=4
+
if version >= 703
set spelllang=de_at,en
set tabpagemax=20
- "set colorcolumn=80,+1
set colorcolumn=+1
endif
-"Set some properties for ctags, grep and the size of the
-"most-left column for foldings
-set tagstack
-set grepprg=grep\ -nH\ $*
-set foldcolumn=1
+" Pathogen runtime path manipulation
+"call pathogen#infect() "Using the infect method breaks ft detection
+filetype off
+call pathogen#runtime_append_all_bundles()
+call pathogen#helptags()
-"Set incremental search and highlighted search results
-set incsearch
-set hlsearch
+syntax on
+filetype plugin indent on
"Power saving tip: powertop-homepage
"According to vim help -- enable mouse in xterm...
set mouse=a
-
-"Open current file with a specific program
-function OpenIn(prog)
- execute ":!" . a:prog . " % &"
-endfunction
+" Use 256 colors
+set t_Co=256
+let g:CSApprox_attr_map = { 'bold' : 'bold', 'italic' : '', 'sp' : '' }
+colorscheme shuber-wombat
" Use the below highlight group when displaying bad whitespace is desired.
" Make trailing whitespace be flagged as bad.
au Filetype python,tex,c,cpp,cs,objc,java syn match BadWhitespace /\s\+$/ containedin=ALL
-set listchars=tab:»,trail:·,eol:$
-
-set autoindent
-set tabstop=4
-set shiftwidth=4
if exists(":DetectIndent")
au BufReadPost * :DetectIndent
endif
-"au Filetype python,tex,c,cpp,cs,objc,java :DetectIndent
-"let g:detectindent_preferred_expandtab = 1
-"let g:detectindent_preferred_indent = 4
let g:syntastic_mode_map = { 'mode' : 'active', 'active_filetypes' : [], 'passive_filetypes' : ['html'] }
-" Use 256 colors
-set t_Co=256
-let g:CSApprox_attr_map = { 'bold' : 'bold', 'italic' : '', 'sp' : '' }
-colorscheme shuber-wombat
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Some macros
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-set cursorline
-set laststatus=2
+"Open current file with a specific program
+function OpenIn(prog)
+ execute ":!" . a:prog . " % &"
+endfunction
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" key bindings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-map <A-c> <plug>NERDCommenterToggle
+map <a-c> <plug>NERDCommenterToggle
+
+nmap <c-q> :q<CR>
+nmap <c-s> :w<CR>
+vmap <c-s> <Esc><c-s>gv
+imap <c-s> <c-o><c-s>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
execute ":%s!^\\(\\s*[^#/].*[^:]\\)\\<" . a:id . "\\>!\\1" . a:ns . "::" . a:id . "!ge"
endfunction
-
"Adds STL prefix 'std::' to several identifiers
function AddSTLNamespaceDecl()
call AddNamespaceDeclTo("std","cin")
call AddNamespaceDeclTo("std","vector")
endfunction
-
function EscapeHexToChar()
echo 'Call "x/Nxb addr" in GDB to print N bytes at addr'
execute '%s/^.*://'
au Filetype text set textwidth=80
"According to thunderbirds settings
au Filetype mail set textwidth=72
+au Filetype mail set expandtab
"a and w reformat the paragraph automatically and a new paragraph
"is indicated by lines not ending with white-space
au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/
-
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PHP
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"au Filetype php set cindent
-
-
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" LaTeX
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
execute ':%s/²/\^2/&'
endfunction
-
function FindWordRepeatings()
execute '/\(\<\S\+\>\)\s\+\1\>'
" let pos = search('\(\<\S\+\>\)\s\+\1\>', "cw")
" call cursor(pos)
endfunction
-
let g:tex_flavor = "latex"
let g:LatexBox_viewer="okular"
let g:LatexBox_latexmk_options="-pvc"
endif
-
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" python
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
au Filetype python map <F5> :!python % <CR>
-
" vimrc file for following the coding standards specified in PEP 7 & 8.
" Number of spaces that a pre-existing tab is equal to.