1 set nocompatible
  2 """"""""""""""""""""""""""""""""""""""""""""""""""
  3 "
  4 
  5 function! Hm()
  6     cursor(1,1)
  7     while search('^>')
  8        normal ma
  9        let pos = search('^>')
 10        cursor(pos,1)
 11        normal k
 12        normal mb
 13        normal 'agq'b
 14        normal j
 15        let pos = search('^[^>]')
 16        cursor(pos,1)
 17     endwhile
 18 endf
 19 
 20 function! Dd()
 21     echo "dfsdaf"
 22     getchar()
 23     echo "DFSDAF"
 24     let c = getchar()
 25 endf
 26 
 27 
 28 function! Site()
 29     normal /.php<^M/0\..000^Mllr8
 30 endfunc
 31 au! BufRead sitemap.xml*  map ,p :call Site()<CR>
 32 
 33 "func! Foobar()
 34 "    let char = getline(".")[col(".")-1]
 35 "    if char == "("
 36 "        normal la
 37 "    else
 38 "        normal a^V)
 39 "    endif
 40 "endfunc
 41 
 42 "inoremap ) <esc>:call Foobar()<cr>
 43 "inoremap ( ()<esc>i
 44 
 45 """"""""""""""""""""""""""""""""""""""""""""""""""
 46 "map <F5> :!echo % <CR>
 47 "
 48 map <F10> :update<CR>:colorscheme calmar256<CR>
 49 
 50 map <F3> vaw"py^W^W/^Rp<CR>
 51 
 52 set spelllang=de_ch
 53 "set spellfile=de_ch.add
 54 "set sps=fast,20
 55 
 56 set laststatus=0
 57 set writebackup
 58 set backup backupdir=$HOME/.vim/backup
 59 
 60 set number ruler
 61 set viminfo=!,'50,\"1000,:150,n~/.vim/viminfo
 62 set fileformat=unix history=50
 63 set digraph
 64 
 65 set hlsearch
 66 set incsearch
 67 set ignorecase
 68 set smartcase
 69 set cursorline
 70 set nocursorcolumn
 71 set virtualedit=block
 72 
 73 set magic
 74 set wildmenu
 75 set wildmode=longest,list " bash like completion
 76 "set showmatch
 77 
 78 set tabstop=4       " number of space <tab> counts for
 79 set expandtab
 80 set shiftwidth=4
 81 set smartindent
 82 
 83 set backspace=2     " allow backspacing over everything in insert mode
 84 set mouse=a " allows marking/pasting with the mouse also on 'not gui vim'
 85 "set grepprg=grep\ -nH\ $* " latex-suite wants that
 86 set foldmethod=manual
 87 set foldcolumn=2
 88 
 89 let xml_use_xhtml = 1   " xml.vim option
 90 let g:calendar_monday = 1  " calendar option
 91 syntax on    " syntax highlighting       
 92 syntax sync fromstart
 93 filetype on             " try to set the filetype automatically
 94 filetype plugin on      " try loading plugins automatically
 95 filetype indent on      " indent
 96 
 97 " for the command-line
 98 cnoremap <C-A> <Home>
 99 cnoremap <C-F> <Right>
100 cnoremap <C-B> <Left>
101 cnoremap <Esc>b <S-Left>
102 cnoremap <Esc>f <S-Right>
103 
104 
105 " map F12 to change the pwd of vim to the cwd of the current file
106 " noremap <F12> :cd <C-R>=expand("%:p:h")<CR><CR> " 
107 
108 set t_Co=256
109 set background=dark
110 if $DISPLAY != ''
111     colorscheme calmar256
112 else
113     colorscheme default
114 endif
115 
116 autocmd FileType c,cpp,slang set cindent expandtab
117 autocmd FileType tex set tw=80 autoindent
118 autocmd BufNewFile,BufRead /tmp/mutt-* set filetype=mail
119 
120 " au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"" | endif
121 
122 autocmd FileType python set nosmartindent autoindent
123 autocmd FileType python nmap <F9> :wall<CR>:!LANG=de_DE ./cal_pixresizer.py<CR>
124 "autocmd FileType python nmap <F9> :wall<CR>:!./%<CR>
125 "autocmd FileType python nmap <F9> :wall<CR>:!/home/calmar/bin/mkcalmgallery.py<CR>
126 autocmd FileType python,c,javascript nmap <F8> :Tlist<CR>^W^W
127 "autocmd FileType python set foldmethod=marker foldnestmax=1
128 
129 au FileType mail set tw=66 autoindent expandtab formatoptions=tcqn
130 au FileType mail set list listchars=tab:»·,trail:·
131 au FileType mail set comments=nb:>
132 au FileType mail vmap D dO[...]^[
133 " go to a good starting point
134 au FileType mail silent normal /--\s*$^MO^[gg/^$^Mj
135 
136 "au! BufRead,BufNewFile *.php  set ft=xhtml
137 au! BufRead,BufNewFile *.html  set ft=xhtml
138 au! BufRead,BufNewFile *.part  set ft=xhtml
139 
140 au BufWinLeave *.tex,*.c,*.h mkview
141 au BufWinEnter *.tex,*.c,*.h silent loadview
142 au BufWinEnter *.tex,*.c,*.h set foldmethod=manual
143 
144 "au BufWinLeave *vimrc,*gvimrc set nolist
145 au BufWinEnter *vimrc,*gvimrc set list
146 
147 
148 au FileType xhtml,html,php,css nmap <F9> :update<CR>:!aap<CR>
149 au FileType xhtml,html,php,css nmap ,a :update<CR>:!aap<CR>
150 au FileType xhtml,html,php nmap <F8> mz:%!tidy -iq -asxhtml -latin1<CR>
151 au FileType xhtml,html,php nmap ,v mz:%!tidy -iq -asxhtml -latin1<CR>
152 au FileType xhtml,html,php vmap <F8> mz:!tidy -iq -asxhtml -latin1<CR>
153 au FileType xhtml,html,php vmap ,v mz:!tidy -iq -asxhtml -latin1<CR>
154 au FileType xhtml,html,php nmap ,d 1GV/<body><CR>dGV?body<CR>d:w<CR>'z<CR>
155 au FileType xhtml,html,php set tw=80 wrapmargin=64
156 "au FileType tex,plaintex setlocal spell
157 
158 "au VimLeave * echo "bye bye" | sleep 1
159 
160 
161 function! Ffox()
162     let s:corrected=substitute(expand("%:p"),"\\","/","g")
163     execute "silent! !ffox file://" . s:corrected
164 endfunc
165 function! Opera()
166     let s:corrected=substitute(expand("%:p"),"\\","/","g")
167     execute "silent! !opera file://" . s:corrected
168 endfunc
169 "map <F8> :call Opera()<CR>
170 "ap <F9> :call Ffox()<CR>
171 
172 nmap <F12> :update<CR> :source /home/calmar/.vimrc<CR>
173 nmap <F11> :sp ~/.vimrc<CR>
174 
175 
176 " map <Leader>c :CMiniBufExplorer<CR>
177 map <Leader>u :UMiniBufExplorer<CR>
178 map <Leader>t :TMiniBufExplorer<CR>
179 
180 " some showmarks plugin settings
181 let g:showmarks_textlower="\t"
182 let g:showmarks_textupper="\t"
183 let g:showmarks_textother="\t"
184 " let g:showmarks_hlline_lower=1
185 "
186 "highlight ShowMarksHLl guifg=red guibg=green cterm=bold ctermfg=yellow ctermbg=black
187 "ighlight ShowMarksHLu guifg=red guibg=green cterm=bold ctermfg=yellow ctermbg=black
188 "ighlight ShowMarksHLo guifg=red guibg=green cterm=bold ctermfg=yellow ctermbg=black
189 "ighlight ShowMarksHLm guifg=red guibg=green cterm=bold ctermfg=yellow ctermbg=black
190 
191 
192 " see the file in Firefox (ffox is a scripts what itself starts firefox)
193 
194 function! Indent()
195     let oldLine=line('.')
196     normal gg=G
197     execute ':' . oldLine
198 endfun
199 map -- :call Indent()<cr>
200 
201 " an  /home/calmar/vim/firefox.xpm ToolBar.Ffox :call Ffox()<CR>
202 "
203 map <LEADER>b1 :!boxes  -d ca--tl-n<CR>
204 map <LEADER>b2 :!boxes  -d ca--tlb-n<CR>
205 map <LEADER>g2 :!boxes  -d ca--tlb-t<CR>f[llR
206 map <LEADER>b3 :!boxes  -d ca--tlbr-n<CR>
207 map <LEADER>g3 :!boxes  -d ca--tlbr-t<CR>f[llR
208 map <LEADER>b4 :!boxes  -d ca-3tl-n<CR>
209 map <LEADER>b5 :!boxes  -d ca-3tlb-n<CR>
210 map <LEADER>g5 :!boxes  -d ca-3tlb-t<CR>f[llR
211 map <LEADER>b6 :!boxes  -d ca-3tlbr-n<CR>
212 map <LEADER>g6 :!boxes  -d ca-3tlbr-t<CR>f[llR
213 
214 map <LEADER>b7 :!boxes  -d ada-box<CR>
215 map <LEADER>b8 :!boxes  -d html<CR>
216 map <LEADER>b9 :!boxes  -d html-cmt<CR>
217 map <LEADER>b0 :!boxes  -d vim-cmt<CR>
218 map <LEADER>bq :!boxes  -d peek<CR>
219 map <LEADER>bw :!boxes  -d c-cmt2<CR>
220 map <LEADER>be :!boxes  -d java-cmt<CR>
221 map <LEADER>br :!boxes  -d pount-cmt<CR>
222 map <LEADER>gt :!boxes  -d parchment<CR>
223 map <LEADER>g7 :!boxes  -d columns<CR>
224 map <LEADER>g8 :!boxes  -d whirly<CR>
225 map <LEADER>g9 :!boxes  -d scroll<CR>
226 map <LEADER>g0 :!boxes  -d nuke<CR>
227 map <LEADER>gq :!boxes  -d mouse<CR>
228 map <LEADER>gw :!boxes  -d boy<CR>
229 map <LEADER>ge :!boxes  -d cat<CR>
230 map <LEADER>gr :!boxes  -d ca-congrats<CR>
231 map <LEADER>gt :!boxes  -d ca-bigtux<CR>
232 map <LEADER>gt :!boxes  -d ca-diamonds<CR>
233 
234 "map <LEADER>b1 vip:!boxes  -d ca-half-left-nt<CR>f[llR
235 
236 "highlight CursorLine  ctermbg=16
237 
238