" Must have for vim set nocompatible " Display nbsp set listchars=tab:\|\ ,nbsp:ยท set list " Remap ESC on ,, map ,, imap ,, scriptencoding utf-8 " Manage plugins call pathogen#infect() " Must be *after* pathogen filetype plugin indent on " Leader let mapleader="," nnoremap a :echo("\ works! It is set to ") " let maplocalleader = "-" " Highlighting syntax enable if has('gui_running') set background=light set guifont=Inconsolata\ 16 else set background=dark endif let g:solarized_termcolors=16 colorscheme solarized " Set line numbering set number " Don't wrap lines, it's ugly set nowrap " Deal with tabs set softtabstop=2 set tabstop=2 " 1 tab = 2 spaces set shiftwidth=2 " Indent with 2 spaces set expandtab " Insert spaces instead of tabs " Set par as default wrapper set formatprg=par\ -w80 " Set mouse on set mouse=a " Don't set timeout - this breaks the leader use set notimeout set ttimeout " Set filetype tex for tikz files au BufNewFile,BufRead *.mgs set filetype=mgs " Set filetype tex for tikz files au BufNewFile,BufRead *.tikz set filetype=tex " Set filetype Faust for DSP files au BufNewFile,BufRead *.dsp set filetype=faust " OCaml indentation let g:ocp_indent_vimfile = system("opam config var share") let g:ocp_indent_vimfile = substitute(g:ocp_indent_vimfile, '[\r\n]*$', '', '') let g:ocp_indent_vimfile = g:ocp_indent_vimfile . "/ocp-indent/vim/indent/ocaml.vim" autocmd FileType ocaml exec ":source " . g:ocp_indent_vimfile " For lusty-explorer set hidden " ack default config let g:ackprg = "ack -H --nocolor --nogroup --column" " place a marker and search nmap j mA:Ack " place a marker and search the word under the cursor nmap ja mA:Ack "=expand("")" nmap jA mA:Ack "=expand("")" map :w:make -j 5 map za " Search for selected text, forwards or backwards. vnoremap * : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy/=substitute( \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) vnoremap # : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy?=substitute( \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) let &colorcolumn=join(range(81,999),",") " vimtex options let g:vimtex_fold_enabled=1 let g:vimtex_fold_manual=1 " vim:ai:et:sw=4:ts=4:sts=4:tw=78:fenc=utf-8:foldmethod=marker