set enc=utf-8
set fencs=utf-8,euc-kr
set tenc=utf-8
set nu
set ts=4
set sw=4
set smarttab
set expandtab
set softtabstop=4
set ai
set cin
syntax on
hi Comment ctermfg=lightblue
filetype plugin indent on
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
map <F5> <ESC>:w<CR>:make opt<CR>
nnoremap <S-C-d> "=DateTimeMarker()<CR>PjjO
inoremap <S-C-d> <C-R>=DateTimeMarker()<CR>
inoremap jj <Esc>
function! DateTimeMarker()
let ret = strftime("%c") . "\n" . "===============================\n"
return ret
endfunction
set laststatus=2
set statusline=%F%m%r%h%w\ (%{&ff}){%Y}\ [%l,%v][%p%%]
set smartcase
set ignorecase
set hlsearch
set incsearch
set spl=en spell
set nospell
" Automatically cd into the directory that the file is in
autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ')
" Remove any trailing whitespace that is in the file
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
" Necesary for lots of cool vim things
set nocompatible
" use ghc functionality for haskell files
au Bufenter *.hs compiler ghc
" configure browser for haskell_doc.vim
let g:haddock_browser = "/usr/bin/firefox"
"{{{ Paste Toggle
let paste_mode = 0 " 0 = normal, 1 = paste
func! Paste_on_off()
if g:paste_mode == 0
set paste
let g:paste_mode = 1
echo "== PASTE =="
else
set nopaste
let g:paste_mode = 0
echo "== NOPASTE =="
endif
return
endfunc
"}}}
" Paste Mode! Dang! <F10>
nnoremap <silent> <F11> :call Paste_on_off()<CR>
set pastetoggle=<F11>
" Folding Stuffs
set foldmethod=syntax
set foldlevelstart=99
set foldnestmax=1
nnoremap <silent> k gk
nnoremap <silent> j gj
inoremap <silent> <Up> <Esc>gka
inoremap <silent> <Down> <Esc>gja
nnoremap <silent> <C-PageUp> <C-w><Left>
nnoremap <silent> <C-PageDown> <C-w><Right>
nnoremap <space> za
" Search mappings: These will make it so that going to the next one in a
" search will center on the line it's found in.
map N Nzz
map n nzz