vim: Update vimrc
authorStefan Huber <shuber@sthu.org>
Mon, 13 Apr 2015 05:24:44 +0000 (07:24 +0200)
committerStefan Huber <shuber@sthu.org>
Mon, 13 Apr 2015 05:24:44 +0000 (07:24 +0200)
dotfiles/vim/.vimrc

index 62ca06d8387969cdff3a60cde0c1f02765d2448f..b657226df4f51211ed470a693f9c1c296de4fa50 100644 (file)
@@ -110,10 +110,10 @@ map <a-c> <plug>NERDCommenterToggle
 nmap <F9> :NERDTreeToggle<CR>
 nmap <F10> :TagbarToggle<CR>
 
-nmap <c-q> :q<CR>
-nmap <c-s> :w<CR>
-vmap <c-s> <Esc><c-s>gv
-imap <c-s> <c-o><c-s>
+"nmap <c-q> :q<CR>
+"nmap <c-s> :w<CR>
+"vmap <c-s> <Esc><c-s>gv
+"imap <c-s> <c-o><c-s>
 
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -129,13 +129,13 @@ au Filetype fortran     set cindent cst csto=0
 "  C, C++, C#, objc, java
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-au Filetype c,cpp,cs,objc,java map <F4> :cnext <CR>
-au Filetype c,cpp,cs,objc,java map <S-F4> :cprevious <CR>
-au Filetype c,cpp,cs,objc,java map <F11> :AS <CR>
-au Filetype c,cpp,cs,objc,java map <S-F11> :A <CR>
+au Filetype c,cpp,cs,objc,java map <buffer> <F4> :cnext <CR>
+au Filetype c,cpp,cs,objc,java map <buffer> <S-F4> :cprevious <CR>
+au Filetype c,cpp,cs,objc,java map <buffer> <F11> :AS <CR>
+au Filetype c,cpp,cs,objc,java map <buffer> <S-F11> :A <CR>
 au Filetype c,cpp,cs,objc,java set cindent cst csto=0
-au Filetype c,cpp,cs,objc map <F7> :make <CR>
-au Filetype java map <F7> :!ant -f ../build.xml <CR>
+au Filetype c,cpp,cs,objc map <buffer> <F7> :make <CR>
+au Filetype java map <buffer> <F7> :!ant -f ../build.xml <CR>
 au Filetype c,cpp,cs,objc set makeprg=make
 
 
@@ -273,8 +273,8 @@ au BufRead,BufNewFile *.cls set filetype=tex
 au Filetype tex set textwidth=80
 au Filetype tex set smartindent
 " Override Tagbar Toggle with LatexBox TOC
-au Filetype tex nmap <F10> :LatexTOCToggle<CR>
-au Filetype tex nmap <F11> :LatexLabels<CR>
+au Filetype tex nmap <buffer> <F10> :LatexTOCToggle<CR>
+au Filetype tex nmap <buffer> <F11> :LatexLabels<CR>
 
 
 "Remove Umlaute
@@ -300,7 +300,7 @@ endfunction
 "  python
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-au Filetype python map <F5> :!python % <CR>
+au Filetype python map <buffer> <F5> :!python % <CR>
 
 " vimrc file for following the coding standards specified in PEP 7 & 8.
 
@@ -318,7 +318,7 @@ au Filetype python set textwidth=79
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 "Opens the current file in ipe
-au Filetype xml map <M-o> :call OpenIn("ipe") <CR>
+au Filetype xml map <buffer> <M-o> :call OpenIn("ipe") <CR>
 
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -326,7 +326,7 @@ au Filetype xml map <M-o> :call OpenIn("ipe") <CR>
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 "Opens the current file in ipe
-au Filetype gnuplot map <M-o> :call OpenIn("gnuplot -persist") <CR>
+au Filetype gnuplot map <buffer> <M-o> :call OpenIn("gnuplot -persist") <CR>
 
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -344,6 +344,15 @@ let g:unaryTagsStack = ""
 au Filetype html,xml,xsl source /usr/share/vim/vimfiles/plugin/closetag.vim
 
 
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+"  markdown
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+let g:instant_markdown_autostart = 0
+let g:instant_markdown_slow = 1
+au Filetype markdown map <buffer> <F5> :InstantMarkdownPreview<CR>
+
+
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 "  youcompleteme
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -355,7 +364,7 @@ let g:ycm_collect_identifiers_from_tags_files = 1
 let g:ycm_autoclose_preview_window_after_completion = 1
 
 let g:ycm_key_list_select_completion = ['<Down>']
-nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
+nnoremap <buffer> <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
 
 let g:ycm_filetype_whitelist = { 'c' : 1, 'cpp' : 1, 'cs' : 1, 'objc' : 1, 'java' : 1, 'python' : 1 }