" Use all the cool Vim features.
set nocompatible
" Use line numbering.
set number
" Indent stuff automagically.
set autoindent
set smartindent
" How much space for indentions.
set tabstop=3
set shiftwidth=3
" Highlight matching patterns when searching.
set hls
" Search incrementaly.
set incsearch
" Don't use backup. (I hate those file~ files.)
set nobackup
" Use syntax highlightning.
syntax on
" Use mouse! (LOVE!)
set mouse=a
" Command history limit.
set history=10
" Display the current position in the lower right corner.
set ruler
"set noruler
" Display the command you are doing.
set showcmd
"set noshowcmd
" Show which mode we are in.
set showmode
"set noshowmode
" Make backspace behave normal.
set backspace=2
" Colorscheme!
colorscheme hagbard
" {{{ Mappings for (), {}, '', "" and [] around words.
map \p bi(<Esc>ea)<Esc>
map \c bi{<Esc>ea}<Esc>
map \s bi'<Esc>ea'<Esc>
map \q bi"<Esc>ea"<Esc>
map \b bi[<Esc>ea]<Esc>
" }}}
" {{{ LaTeX mappings.
au BufRead *.tex map <F5> :!pdflatex %<CR>
" }}}
" Scrolling offset.
set scrolloff=5
" {{{ Use the ~/.vim/swap as swap-directory.
set directory=~/.vim/swap
" }}}
" {{{ Autoload hagbard.vim
if filereadable("hagbard.vim")
try
silent source hagbard.vim
catch /E484:/
echo "Can't source hagbard.vim"
endtry
end
" }}}
" {{{ Folds
" Useful fold commans:
" {motion}zF Create fold for {motion} lines.
" zf Create default foldmarker.
" zd Delete a fold.
" zD Delete all folds inside the fold.
" zE Delete all folds inside the window.
set foldmethod=marker
au BufWinLeave * silent! mkview
au BufRead * silent loadview
" }}}