vimrc

" ~/.vimrc (configuration file for vim only)

" skeletons

function! SKEL_spec()

0r /usr/share/vim/current/skeletons/skeleton.spec

language time en_US

if $USER != ''

   let login = $USER

elseif $LOGNAME != ''

   let login = $LOGNAME

else

   let login = 'unknown'

endif

let newline = stridx(login, "/n")

if newline != -1

   let login = strpart(login, 0, newline)

endif

if $HOSTNAME != ''

   let hostname = $HOSTNAME

else

   let hostname = system('hostname -f')

   if v:shell_error

let hostname = 'localhost'

   endif

endif

let newline = stridx(hostname, "/n")

if newline != -1

   let hostname = strpart(hostname, 0, newline)

endif

exe "%s/specRPM_CREATION_DATE/" . strftime("%a/ %b/ %d/ %Y") . "/ge"

exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"

exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"

setf spec

endfunction

"autocmd BufNewFile *.spec call SKEL_spec()

 

" filetypes

filetype plugin on

filetype indent on

 

if has("cscope")

set csprg=/usr/bin/cscope

set csto=0

set cst

set nocsverb

" add any database in current directory

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

set cscopetag

set cscopequickfix=s-,g-,c-,d-,t-,e-,f-,i-

endif

 

" self config

set nocompatible

set number

set ruler

set incsearch

set hlsearch

set tabstop=4

set shiftwidth=4

set mouse=a

"set fo-=r

set showmatch

set matchtime=2

set fileencodings=utf-8,gbk

set cursorline

 

set list

"set listchars=tab:/|/,trail:.,extends:>,precedes:<,eol:$

"set listchars=tab:/|.

 

" tags set

let Tlist_File_Fold_Auto_Close=1

let Tlist_Auto_Open=1

let Tlist_Exit_OnlyWindow=1

nmap <F2> :TlistToggle<CR>

 

set tags=/home/how/work/cStudy/thinking/trunk/tags,./tags,../tags,../../tags

 

" NERD

let NERDTreeWinPos='Right'

let NERDTreeMouseMode=2

nmap <F3> :NERDTreeToggle<CR>

 

" TAB

nmap <F5> :tabprevious<CR>

nmap <F6> :tabnext<CR>

 

menu 10.340 &File.&Save<Tab>:w :confirm w<CR>

 

" ~/.vimrc ends here

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值