# HG changeset patch # User zegervdv # Date 1397715394 -7200 # Node ID f79361618cac609adae7becbd809b3aab59d2043 # Parent c10e2f6b2e87bd23d9c2c01f7e38a6b1d5227219 Organize vimrc diff -r c10e2f6b2e87 -r f79361618cac vimrc --- a/vimrc Thu Apr 17 08:06:09 2014 +0200 +++ b/vimrc Thu Apr 17 08:16:34 2014 +0200 @@ -90,6 +90,11 @@ \ exe "normal g`\"" | \ endif +nnoremap :buffers:buffer + +" Set leader to , +let mapleader = "," + map d :bpspbnbd " See long lines as line breaks @@ -118,6 +123,9 @@ nmap / /\v cmap s/ s/\v +" Clear highlight +nnoremap n :nohlsearch + inoremap £ \ nnoremap % @@ -182,12 +190,11 @@ highlight IndentGuidesOdd guibg='#282a2e' " }}} -" Plugin Settings {{{ -" Vim Math plugin; make simple calculations +" Vim Math plugin; make simple calculations {{{ vmap ++ VMATH_YankAndAnalyse() nmap ++ vip++ - -" Airline configuration +" }}} +" Airline configuration {{{ let g:airline_inactive_collapse=0 let g:airline_powerline_fonts=1 @@ -197,41 +204,27 @@ let g:airline_theme = 'tomorrow' let g:airline#extensions#syntastic#enabled = 0 - -nnoremap :buffers:buffer - -" Set leader to , -let mapleader = "," - -" Custom key mappings - +" }}} +" YankRing {{{ let g:yankring_replace_n_pkey = 'cp' - -" Nerdtree +nnoremap y :YRShow +" }}} +" Nerdtree {{{ map :NERDTreeToggle map e :NERDTreeToggle let NERDTreeIgnore = ['\.aux$', '\.log$', '\.out$'] - -" Vim - Rspec +" }}} +" Vim - Rspec {{{ map t :call RunCurrentSpecFile() map s :call RunNearestSpec() map l :call RunLastSpec() map r :call RunAllSpecs() - -" Cucumber +" }}} +" Cucumber {{{ map f :call RunAllFeatures() map k :call RunCurrentFeature() - -" Autocomplete -inoremap - -" Single char insertion -" nmap i_r - -" Clear highlight -nnoremap n :nohlsearch - -" ctrl p - Fuzzy file finder +" }}} +" ctrl p - Fuzzy file finder {{{ noremap :CtrlP let g:ctrl_map = '' let g:ctrl_cmd = 'CtrlP' @@ -247,14 +240,14 @@ " ctrl p - Commands map p :CtrlPCmdPalette - -" Markdown +" }}} +" Markdown {{{ let g:vim_markdown_folding_disabled=1 - -" tComment remap +" }}} +" tComment {{{ nmap c - -" Neo Complete +" }}} +" Neo Complete {{{ let g:acp_enableAtStartup = 0 let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_smart_case = 1 @@ -307,8 +300,8 @@ endif " autocmd FileType c NeoCompleteTagMakeCache - -" Neo Snippets +" }}} +" Neo Snippets {{{ imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) @@ -327,8 +320,8 @@ let g:neocomplete#sources#omni#input_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' let g:neosnippet#snippets_directory='~/.vim/snippets' - -" Tabular +" }}} +" Tabular {{{ inoremap :call align()a function! s:align() @@ -354,16 +347,8 @@ nmap a, :Tabularize /,\zs/l0l1 vmap a, :Tabularize /,\zs/l0l1 vmap a- :Tabularize /- - - - -augroup markdown - au! - au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown -augroup END - - -" Latex plugin +" }}} +" Latex plugin {{{ au BufNewFile,BufRead,BufEnter *.tex setlocal spell spelllang=en_gb au BufNewFile,BufRead,BufEnter *.tex setlocal textwidth=0 au BufNewFile,BufRead,BufEnter *.txt setlocal spell spelllang=en_gb @@ -378,41 +363,26 @@ let g:Tex_ExecuterUNIXViewerInForeground = 1 let g:Tex_ViewRule_pdf = 'open -a Preview' let g:Tex_ViewRule_ps = 'open -a Preview' - -" Tagbar mapping +" }}} +" Tagbar {{{ nmap :TagbarToggle - -" The silver searcher -" let g:ackprg = 'ag --nogroup --nocolor --column' - -" Multiple cursor insert -let g:multi_cursor_next_key='' -let g:multi_cursor_prev_key='' -let g:multi_cursor_skip_key='' -let g:multi_cursor_quit_key='' - -" Gundo tree +" }}} +" Gundo tree {{{ nnoremap u :GundoToggle - -" Yank ring -nnoremap y :YRShow - -" Open pdf in Preview -let g:livepreview_previewer = 'open -a Preview' - - -" Smalls +" }}} +" Smalls {{{ nmap s (smalls) omap s (smalls) xmap s (smalls) - -" Textmanip +" }}} +" Textmanip {{{ xmap (textmanip-move-down) xmap (textmanip-move-up) xmap (textmanip-move-left) xmap (textmanip-move-right) xmap (textmanip-toggle-mode) - +" }}} +" Startify {{{ let g:startify_session_dir = "~/.vim/sessions" " }}}