82 lines
1.7 KiB
VimL
82 lines
1.7 KiB
VimL
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 nocompatible
|
||
set smartcase
|
||
set smartindent
|
||
|
||
"Sources
|
||
source ~/.vim/supertab.vim
|
||
source ~/.vim/charm.vim
|
||
source ~/.vim/plugin/AppleT.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
|
||
au Filetype html,xml,xsl source ~/.vim/closetag.vim
|
||
|
||
set t_Co=16
|
||
set t_Sf=ESC[3%dm
|
||
set t_Sb=ESC[4%dm
|
||
"set t_kb=
|
||
|
||
"Remappings
|
||
nnoremap gc :tabnew<CR>
|
||
nnoremap gK :tabclose<CR>
|
||
nnoremap gn gt
|
||
nnoremap gp gT
|
||
nnoremap gz :pclose<CR>
|
||
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>$
|
||
|
||
" , #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
|
||
|
||
"inoremap ;a <esc>
|