summaryrefslogtreecommitdiff
path: root/etc/vimrc
blob: 2203961fe7d345680940eb38b170c1203768bf6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
"" vim:ft=vim

set nocompatible
set number
set title
set ttyfast
set ruler

" Tabbing (mainly)
set tabstop=5
set shiftwidth=5
set shiftround
set autoindent
set smartindent
autocmd FileType c,cpp set cindent comments=sr:/*,mb:*,ex:*/,://
inoremap # X#
set list
set listchars=tab:│\ ,trail:·,extends:…,precedes:…,nbsp:␠
set formatoptions=coqrt

set t_Co=256

if version >= 703
	set colorcolumn=80
endif

" Folding
set foldmethod=marker

" Swapfiles
set backupdir=~/.vim-backup
set dir=~/.vim-backup

" Searching
set smartcase
set ignorecase
set hlsearch
set incsearch
set redrawtime=500

syntax enable
colorscheme darkblue

" Chaosdorf
autocmd BufRead ~/var/svn/intern.chaosdorf.de/admin/log.mdwn nnoremap <F5> :6<CR>O### <C-R>=strftime("%Y-%m-%d")<CR> derf<CR>-

autocmd BufNewFile,BufRead *.py setlocal tabstop=4 softtabstop=4 shiftwidth=4 textwidth=160 smarttab expandtab

map <F6> :if exists("g:colors_name") && g:colors_name == "darkblue" <Bar>
	\   colorscheme default <Bar>
	\ else <Bar>
	\   colorscheme darkblue <Bar>
	\ endif <CR>

map <F7> :if exists("g:syntax_on") <Bar>
	\   syntax off <Bar>
	\   colorscheme default <Bar>
	\ else <Bar>
	\   syntax enable <Bar>
	\   colorscheme darkblue <Bar>
	\ endif <CR>

command! TV :w | :!texv %
command! TVb :w | :!texvb %
command! TVbt :w | :!texvbt %
command! TVn :w | :!texvn %
command! TVp :w | :!texvp %

nnoremap <C-t> :tabnew<CR>
nnoremap <C-w> :tabclose<CR>
nnoremap <C-p> :tabprevious<CR>
nnoremap <C-n> :tabnext<CR>

" Greedy remaps (TODO: Add more keys)
noremap - :
noremap n h
noremap t j
noremap h k
noremap s l
noremap N H
noremap T <C-F>
noremap H <C-B>
noremap S L
noremap c n
noremap f p