set autoindent set ignorecase set ruler set showmatch set showmode set background=dark "set tabstop=2 set number "set shiftwidth=2 set hlsearch set incsearch syntax on set wmnu set nocompatible " JAVA Macros: autocmd BufEnter *.java map! /* DEBUG: */hhhi autocmd BufEnter *.java map I/* DEBUG: A */ autocmd BufEnter *.java map! /** */hhi autocmd BufEnter *.java map! /** **/kA autocmd FileType java source /root/tools/cvs.vim ab {sys} System.out.println(""); ab {catch} } catch (Exception ex) {} ab {imp} import com.ibm.zurich.loganalyzer.*; */kAi/** "map :.,+10s/^/ /g " HTML/XML: :au Filetype html,xml,xsl source /root/tools/closetag.vim " LaTex Macros: http://www.vim.org/howto/latex.html " ,rl = run latex (on current file) autocmd BufEnter *.tex map ,rl :!latex % " ,cps = create ps file (from dvi file of current file) autocmd BufEnter *.tex map ,cps :!dvips %<.dvi -o %<.ps:!ghostview %<.ps " ,cp = create ps file (from dvi file of current file) but don't invoke gv autocmd BufEnter *.tex map ,cp :!dvips %<.dvi -o %<.ps " ,vdvi = view dvi file autocmd BufEnter *.tex map ,vdvi :!xdvi %<.dvi & autocmd BufEnter *.tex ab ... \ldots autocmd BufEnter *.tex imap  \emph{}i autocmd BufEnter *.tex imap  \textbf{}i autocmd BufEnter *.tex map! ]s1 \chapter{}i autocmd BufEnter *.tex map! ]s2 \section{}i autocmd BufEnter *.tex map! ]s3 \subsection{}i autocmd BufEnter *.tex map! ]s4 \subsubsection{}i autocmd BufEnter *.tex map! ]bi \begin{itemize}\item \end{itemize}kA autocmd BufEnter *.tex map! ]be \begin{enumerate}\item \end{enumerate}kA " cleaning .tex up autocmd BufLeave *.tex unmap ,rl autocmd BufLeave *.tex unmap ,cps autocmd BufLeave *.tex unmap ,vdvi autocmd BufLeave *.tex iunmap  autocmd BufLeave *.tex iunmap  autocmd BufLeave *.tex unmap! ]s1 autocmd BufLeave *.tex unmap! ]s2 autocmd BufLeave *.tex unmap! ]s3 autocmd BufLeave *.tex unmap! ]s4 autocmd BufLeave *.tex unmap! ]bi autocmd BufLeave *.tex unmap! ]be augroup TeX "autocmd FileType tex source $VIM/TeX/texmacro.vim autocmd FileType tex :set nonumber augroup END " C-S saves the file. " If C-S is not assigned to anything, some terminals will hang " when pressing those keys. noremap :w inoremap :w " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif noremap K :call RunLatex() noremap :call RunLatex() inoremap :call RunLatex() function! s:RunLatex() write " q! " ! xterm -bg ivory -fn 7x14 -e latex % & ! latex % split %<.log endfunction " Errorformat for jikes when invoked with +E :set efm=%f:%l:%v:%*\\d:%*\\d:%*\\s%m noremap :so `/root/thor/thesis/vimspell.sh %` noremap :syntax clear SpellErrors