set ts=4 set sw=4 " autocmd FileType make setlocal noexpandtab let mapleader="," " Tab modes. map m :set expandtab ts=2 sw=2 sts=2 map t :set noexpandtab ts=4 sw=4 sts=4 map T :set expandtab ts=4 sw=4 sts=4 " Folds: map f :set fen fdn=3 fdm=indent fml=1 fdc=3 " H-L for next-prev buffer nnoremap L :bnext nnoremap H :bprev set hlsearch syntax on set bg=dark set mouse=a set number set relativenumber set smartindent set term=xterm-256color set cursorline hi CursorLine cterm=bold ctermbg=0 hi Folded ctermfg=2 ctermbg=0 hi FoldColumn ctermfg=2 ctermbg=0 let g:sclangTerm = "urxvt -e" autocmd FileType tex setlocal spell spelllang=en highlight SpellBad ctermfg=red ctermbg=none let NERDTreeIgnore=['\.o$', '\.cmo$', '\.cmx$', '\.cmi$', '\.lib$', '\.pyc$'] set wildmode=list:longest au BufRead,BufNewFile *.make set filetype=make au BufRead,BufNewFile *.md set filetype=markdown au BufRead,BufNewFile *.lus set filetype=lustre au BufRead,BufNewFile *.scade set filetype=scade " Append modeline after last line in buffer. " Use substitute() instead of printf() to handle '%%s' modeline in LaTeX " files. function! AppendModeline() let l:modeline = printf(" vim: set sts=%d ts=%d sw=%d tw=%d %set :", \ &softtabstop, &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no') let l:modeline = substitute(&commentstring, "%s", l:modeline, "") call append(line("$"), l:modeline) endfunction nnoremap ml :call AppendModeline() " indentation for long line wraps set wrap set linebreak set breakindent let &showbreak = '> ' " set completeopt=menuone,menu,longest,preview set directory=~/.vim/swp set backupdir=~/.vim/backup set undofile set undodir=~/.vim/undo