.vimrc Sample
set directory=~/.vim/tmp
"set tags=/home/sneroth/tags_new
set tags=/home/sneroth/tags
syntax on
"map - <C-w><C-w>
"map t g]
ab tb tabnew
set hlsearch
set incsearch
set showcmd
"set ruler
"set selectmode=mouse
"set term=xterm-color
"set autochdir"
"set backspace=indent,eol,start " make backspace a more flexible
"set clipboard+=unnamed " share windows clipboard
"set directory=~/.vim/tmp " directory to place swap files in
"set fileformats=unix,dos,mac " support all three, in this order
"set mouse=a " use mouse everywhere
"set whichwrap=b,s,h,l,<,>,~,[,] " everything wraps
" | | | | | | | | |
" | | | | | | | | +-- "]" Insert and Replace
" | | | | | | | +-- "[" Insert and Replace
" | | | | | | +-- "~" Normal
" | | | | | +-- <Right> Normal and Visual
" | | | | +-- <Left> Normal and Visual
" | | | +-- "l" Normal and Visual (not recommended)
" | | +-- "h" Normal and Visual (not recommended)
" | +-- <Space> Normal and Visual
" +-- <BS> Normal and Visual
"set wildmenu " turn on command line completion wild style
map <C-F10> <Esc>:tabnew<CR>
map <C-F5> <Esc>:tabfirst<CR>
"map <F6> <Esc>:tabp<CR>
map <C-F6> :tabp<CR>
map <C-F7> :tabn<CR>
map <C-F8> :tablast<CR>
nmap <C-Insert> :tabnew<Space>
nmap <C-Delete> :tabclose<CR>
nmap <C-q> :q!<CR>
nmap <C-w> :wq!<CR>
nmap <C-s> :w!<CR>
"map <S-Insert> <MiddleMouse>
"map! <S-Insert> <MiddleMouse>
"set cindent
"set cindent
"set smartindent
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
set number
"set ic
"set guifont=Monospace 10
let os=substitute(system('uname'), "\n", "", "")
if os == "SunOS"
set csprg=/usr/local/bin/cscope
else
set csprg=/usr/bin/cscope
endif
set cst
set csto=0
set nocsverb
if filereadable("cscope.out")
cs add cscope.out
elseif filereadable("/home/sneroth/cscope/cscope.out")
cs add /home/sneroth/cscope/cscope.out
endif
set csverb
nmap <C-\>s :cscope find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cscope find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cscope find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cscope find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cscope find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cscope find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cscope find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cscope find d <C-R>=expand("<cword>")<CR><CR>
" Using 'CTRL-spacebar' then a search type makes the vim window
" split horizontally, with search result displayed in
" the new window.
nmap <C-Space>s :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>g :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>c :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>t :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>e :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-Space>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>
" Hitting CTRL-space *twice* before the search type does a vertical
" split instead of a horizontal one
nmap <C-Space><C-Space>s
\:vert scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>g
\:vert scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>c
\:vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>t
\:vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>e
\:vert scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>i
\:vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space><C-Space>d
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
No comments:
Post a Comment