136 lines
2.8 KiB
VimL
136 lines
2.8 KiB
VimL
set nocompatible
|
||
syntax on
|
||
"colorscheme slate
|
||
"colorscheme dante
|
||
colorscheme barak
|
||
"set gfn=Monaco:h12:a
|
||
set ts=4
|
||
set softtabstop=4
|
||
set shiftwidth=4
|
||
"set expandtab
|
||
set smartcase
|
||
set autoindent
|
||
set smartindent
|
||
set hidden
|
||
|
||
set history=1000
|
||
set wildmenu
|
||
set wildmode=list:longest
|
||
set ruler
|
||
|
||
"Sources
|
||
source ~/.vim/supertab.vim
|
||
source ~/.vim/charm.vim
|
||
source ~/.vim/plugin/AppleT.vim
|
||
runtime macros/matchit.vim
|
||
"source ~/.vim/syntax/motd.vim
|
||
|
||
|
||
au BufNewFile,BufRead motd.public,/tmp/motd.public.r.* setf motd
|
||
"Highlighting features
|
||
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
|
||
autocmd FileType python set tags+=$HOME/.vim/tags/python.ctags
|
||
autocmd FileType python set omnifunc=pythoncomplete#Complete
|
||
"autocmd FileType python call SuperTabSetCompletionType("<C-X><C-O>")
|
||
let python_highlight_all = 1
|
||
let g:Tb_MaxSize=0
|
||
au Filetype html,xml,xsl source ~/.vim/closetag.vim
|
||
|
||
|
||
"MiniBufExplore Options
|
||
"let g:miniBufExplMapWindowNavVim = 1
|
||
"let g:miniBufExplMapWindowNavArrows = 1
|
||
"let g:miniBufExplMapCTabSwitchBufs = 1
|
||
"let g:miniBufExplModSelTarget = 1
|
||
"let g:miniBufExplForceSyntaxEnable = 1
|
||
|
||
|
||
set t_Co=16
|
||
set t_Sf=ESC[3%dm
|
||
set t_Sb=ESC[4%dm
|
||
"set t_kb=
|
||
|
||
"Remappings
|
||
"Open in tabs...
|
||
"nnoremap gc :tabnew<CR>
|
||
"nnoremap gK :tabclose<CR>
|
||
"nnoremap gn gt
|
||
"nnoremap gp gT
|
||
nnoremap gK :bdelete<CR>
|
||
nnoremap gn :bn<CR>
|
||
nnoremap gp :bp<CR>
|
||
nnoremap gz :pclose<CR>
|
||
nnoremap gw g*
|
||
nmap P o<Esc>p
|
||
nnoremap j gj
|
||
nnoremap k gk
|
||
vnoremap j gj
|
||
vnoremap k gk
|
||
nnoremap <Down> gj
|
||
nnoremap <Up> gk
|
||
vnoremap <Down> gj
|
||
vnoremap <Up> gk
|
||
inoremap <Down> <C-o>gj
|
||
inoremap <Up> <C-o>gk
|
||
"nnoremap <C-i> <C-a>
|
||
nnoremap <C-a> ^
|
||
nnoremap <C-e> $
|
||
vnoremap <C-a> ^
|
||
vnoremap <C-e> $
|
||
inoremap <C-a> <C-O>^
|
||
inoremap <C-e> <C-O>$
|
||
imap <C-c> <Esc>
|
||
|
||
" , #perl # comments
|
||
map ,# :s/^/#/<CR>
|
||
" , #mako ## comments
|
||
map ,% :s/^/##/<CR>
|
||
|
||
" ,/ C/C++/C#/Java // comments
|
||
map ,/ :s/^/\/\//<CR>
|
||
|
||
" ,< HTML comment
|
||
map ,< :s/^\(.*\)$/<!-- \1 -->/<CR><Esc>:nohlsearch<CR>
|
||
|
||
" c++ java style comments
|
||
map ,* :s/^\(.*\)$/\/\* \1 \*\//<CR><Esc>:nohlsearch<CR>
|
||
|
||
|
||
if !exists(":W")
|
||
command W :w
|
||
endif
|
||
|
||
command SaveSession :mksession! ~/.vim_last_session
|
||
command LoadSession :source ~/.vim_last_session
|
||
command ScratchOpen :e scp://barak@barakmich.com//home/barak/notes/scratch
|
||
|
||
function! s:DiffWithSaved()
|
||
let filetype=&ft
|
||
diffthis
|
||
vnew | r # | normal! 1Gdd
|
||
diffthis
|
||
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
|
||
endfunction
|
||
com! DiffSaved call s:DiffWithSaved()
|
||
|
||
"cd ~/work/gd/trunk
|
||
|
||
"if has("cscope")
|
||
" set csto=0
|
||
" set cst
|
||
" set nocsverb
|
||
" " add any database in current directory
|
||
"if filereadable("~/work/gd/trunk/cscope.out")
|
||
" " cs add ~/work/gd/trunk/cscope.out
|
||
" if filereadable("cscope.out")
|
||
" cs add cscope.out
|
||
" " else add database pointed to by environment
|
||
" elseif $CSCOPE_DB != ""
|
||
" cs add $CSCOPE_DB
|
||
" endif
|
||
" set csverb
|
||
"endif
|
||
|
||
"inoremap ;a <esc>
|
||
|
||
"cd /mw/barak/gd-es-bug
|