:let $USER = "zhajio"
""""""""""""""""""""""""""""""""""source file""""""""""""""""""""""""
"source /usr/share/vim/vim70/colors/slate.vim
source /usr/share/vim/vim70/colors/desert.vim
"source /usr/share/vim/vim70/colors/pablo.vim
"source /usr/share/vim/vim70/colors/evening.vim
"source /usr/share/vim/vim70/colors/murphy.vim
"source /usr/share/vim/vim70/syntax/perl.vim
"source /usr/share/vim/vim70/syntax/csh.vim
"source /usr/share/vim/vim70/syntax/awk.vim
"source /usr/share/vim/vim70/syntax/sed.vim
"source /usr/share/vim/vim70/syntax/vim.vim
"source /usr/share/vim/vim70/syntax/verilog.vim
"source /usr/share/vim/vim70/syntax/asm68k.vim
"source /usr/share/vim/vim70/syntax/java.vim
"source /usr/share/vim/vim70/syntax/tcl.vim
"source /usr/share/vim/vim70/synmenu.vim
"source /usr/share/vim/vim70/syntax/syncolor.vim
"source /usr/share/vim/vim70/syntax/synload.vim
"source /usr/share/vim/vim70/syntax/syntax.vim
""""""""""""""""""some useful plugins"""""""""""""""""""""""
"source /users/$USER/plugin/color_sample_pack.vim
"source /users/$USER/plugin/ScrollColor.vim "usage :COLOR <- ->
"source /users/$USER/plugin/ack.vim
source /users/$USER/plugin/taglist.vim "usage:Tlist
""""""""""""""""""""""""<tag_list>""""""""""""""""""""""""""
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nmap <silent> <F4> :TlistToggle<CR>
"source /users/$USER/plugin/supertab.vim
""""""""""""""""""""""""<win_manager>""""""""""""""""""""""""""
source /users/$USER/plugin/bufexplorer.vim
source /users/$USER/plugin/winfileexplorer.vim
source /users/$USER/plugin/wintagexplorer.vim
source /users/$USER/plugin/winmanager.vim
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
""""""""""""""""""""""<screen saver>"""""""""""""""""""""""""""
source /users/$USER/plugin/matrix.vim
""""""""""""""""""""""""""<minibuf>""""""""""""""""""""""""""""
source /users/$USER/plugin/minibufexpl.vim
let g:miniBufExplMapCTabSwitchBufs=1
let g:miniBufExplMapWindowsNavVim=1
let g:miniBufExplMapWindowNavArrows=1
"source /users/$USER/plugin/JavaRun.vim
""""""press <F5> to run the program without arguments or :Run [args...]<CR>
""""""run the Java, Python, Perl, Ruby, Tcltk or CLisp source program
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
:let $VIMRUNTIME = "/usr/share/vim/vim70"
:let $SYNTAX = "/usr/share/vim/vim70/syntax"
"Vim calls this "prefix" key the "leader".set your leader key to whatever you like
:let mapleader = "-"
:ab //b //**********************************************************
:ab #b ***************************************
:ab -b #-----------------------------------------------------------
:nnoremap add" viw<ESC>a"<ESC>hbi"<ESC>lel
:nmap <F5> i{<Esc>ea}<Esc>
"delete words in () use d( command
:onoremap ( i(
"set nocp "different from vi
"set backspace=indent,eol,start
"colorscheme desert
"colorscheme murphy
":highlight Normal guibg=LightGray guifg=Black
filetype on
filetype indent on
"set clipboard+=unnamed
"filetype plugin on
"set cursorline
set wildmenu
"set showmatch
set incsearch
set showcmd
set shiftwidth=4
set tabstop=4
set expandtab
autocmd FileType make set noexpandtab
set formatoptions=croautocmd FileType c,cpp :set cindent
set smartindent
set cindent shiftwidth=4
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
set undolevels=5000
set infercase
""""""""""""""""""Auto complete"""""""""""""""""""""""""""
set complete=d,.,w,i,k
set dictionary=/usr/share/dict/words,/users/$USER/VIM/asm.kwd,/users/$USER/VIM/shell.kwd
"set background=dark
set hls
syntax on
set nu
set ru
set iskeyword+=_,$,@,%,#,-
"map all selected
":nmap <c-a> ggVG
"""""""""""""""""""""status columbar""""""""""""""""""""""""
set laststatus =2
"highlight StatusLine guifg=SlateBlue guibg=Yellow
highlight StatusLine guifg=SlateBlue guibg=Gray
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""auto_complete""""""""""""""""""""""""""""
:inoremap ( ()i
:inoremap ) =ClosePair(')')
:inoremap < <>i
:inoremap > =ClosePair('>')
:inoremap { {}i
:inoremap } =ClosePair('}')
:inoremap [ []i
:inoremap ] =ClosePair(']')
:inoremap " ""
":inoremap ' ''
function ClosePair(char)
if getline('.')[col('.')-1]==a:char
return "\<Right>"
else
return a:char
endif
endf
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set mousemodel=popup
set mouse=a
"set nocompatible
set nobackup
setlocal noswapfile
set bufhidden=hide
set cmdheight=1
set backspace=2
set whichwrap+=<,>,h,l
"""""""""""""""""""""""< menu and item >"""""""""""""""""""""""
:set guioptions-=m
:set guioptions-=T
:set guioptions+=b
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<Indent line>""""""""""""""""""""""""""
"set list
"set listchars=tab:\.\
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<gui_font>""""""""""""""""""""""""""
:set linespace=1
if has("gui_running")
if has("gui_gtk2")
:set guifont=Bitstream\ Vera\ Sans\ Mono\ 11
":set guifont=Courier\ 14,mendium\ 14
":set guifont=Courier\ 12,fixed\ 12,\ 7x13
elseif has("x11")
"also for GTK 1
:set guifont=-Courier_10_Pitch-Medium-R-Normal--14-110-70-70-C-75-ISO8859-1
elseif has("gui_win32")
:set guifont=Luxi_mono:h12:cANSI
endif
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<ignoer case>""""""""""""""""""""""""""
"Override the 'ignorecase' option if the search pattern contains upper
"case characters. Only used when the search pattern is typed and
"'ignorecase' option is on.
set ignorecase
set ignorecase smartcase
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<color comment>""""""""""""""""""""""""""
hi comment guifg=gray50
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<command_line mapping>""""""""""""""""""""""""""
:cnoremap vim :source $SYNTAX/vim.vim
:cnoremap csh :source $SYNTAX/csh.vim
:cnoremap tcl :source $SYNTAX/tcl.vim
:cnoremap perl :source $SYNTAX/perl.vim
:cnoremap verilog :source $SYNTAX/verilog.vim
:cnoremap asm :source $SYNTAX/asm.vim
:cnoremap asm68k :source $SYNTAX/asm68k.vim
:cnoremap java :source $SYNTAX/java.vim
:cnoremap python :source $SYNTAX/python.vim
:cnoremap ruby :source $SYNTAX/ruby.vim
:cnoremap awk :source $SYNTAX/awk.vim
:cnoremap sed :source $SYNTAX/sed.vim
":cnoremap c :source $SYNTAX/c.vim
:cnoremap sv source /users/$USER/VIM/systemverilog.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""execute command in args deal with all files in buffer""""""""""
function Allargs(command)
let i = 0
while i < argc()
if filereadable(argv(i))
execute "e " . argv(i)
execute a:command
endif
let i = i + 1
endwhile
endfunction
command -nargs=* ALL :call Allargs(<q-args>)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<color Keyword>""""""""""""""""""""""""""
""hi Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=NONE guifg=#ffff60 guibg=NONE
""hi Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=NONE guifg=#60ff60 guibg=NONE
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""<color cursor and blink control>""""""""
"hi Cursor guibg=purple guifg=slategrey
hi Cursor guibg=Green guifg=Black
"set guicursor=n:block-blinkoff0
"""""""""""""<set for chinese support>""""""""""""""""""""""""""
":language ja_JP.eucJP
":let &termencoding = &encoding
":set termencoding=euc-jp
:set fileencodings=utf-8,gbk,big5,euc-jp,gb2312
:function DateInsert()
: $read !date
:
:endfunction
"""""""""""""""""""""""""""""""""
" GUI SET !!
"""""""""""""""""""""""""""""""""
":if has("gui_running")
": set guioptions-=T
": let psc_style='cool'
":endif
":set guioptions+=b
"""""""""FOLD SET""""""""""""""""
:set foldcolumn=2
:highlight Folded guibg=grey guifg=blue
:highlight FoldColumn guibg=black guifg=white
":syn region myFold start="{" end="}" transparent fold
":syn sync fromstart
":set foldmethod=syntax
""""""""SET MATCH PAIRS""""""""""
set showmatch
"How many tenths of a second to blink
:set matchtime=5
autocmd! bufwritepost vimrc source ~/.vimrc
"autocmd BufReadPost * |
" if line("'\"") > 0 && line ("'\"") <= line("$") |
" exe "normal! g'\"" |
" endif
:nmap <Up> gk
:nmap <Down> gj
"Set to auto read when a file is changed from the outside
set autoread
:set fileformats=unix,dos