vimrc

本文介绍了一种提高Vim编辑器使用效率的方法,通过自定义设置实现快速切换标签页、改进搜索功能等,使Vim操作更为流畅。此外,还分享了如何调整字体、颜色方案及界面选项来优化用户体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

" ***'s custom settings begin
map <F2> :tabnew<CR>
map <C-Left> :tabp<CR>
map <C-Right> :tabnext<CR>
" set guifont=Consolas:h11:cANSI
" let font_name = "Consolas"

"光标不闪
set gcr=a:blinkon0

"call pathogen#helptags()
"call pathogen#runtime_append_all_bundles()
" call pathogen#infect()

"filetype off
"filetype plugin on "dont know why snipMate not work

set nobackup
set noswapfile
set wrap
map <F3> *#
inoremap jj <ESC> " quciker escaping
set foldcolumn=4
" set foldmethod=syntax

"let &termencoding=&encoding
if has("win32")
    "set gfn=YaHei\ Consolas\ Hybrid:h10
    "set gfn=DejaVu\ Sans\ Mono:h10
    set gfn=Droid\ Sans\ Mono:h10
else
    set gfn=YaheiMono\ 10
endif

set guioptions-=T  " Toolbar
set guioptions-=r  " Right-hand scrollbar
set guioptions-=L  " Left-hand scrollbar
set guioptions+=i  " use a vim icon
"set guioptions-=m  " Menu bar is present
set guioptions+=c  " Use console diaglogs instead of popup dialogs for simple choices

if has("gui_running")
    colors desert
else
    set t_Co=256
    colors wombat256
endif

set cursorline
set nocursorcolumn
set undolevels=1000

" set statusline use help statusline to get more info
set laststatus=2
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]


" for global search script
" nnoremap <silent> <F5> :ExgsToggle<CR>
" nnoremap <silent> <Leader>gs :ExgsSelectToggle<CR>
" nnoremap <silent> <Leader>gq :ExgsQuickViewToggle<CR>
" nnoremap <silent> <Leader>gt :ExgsStackToggle<CR>
" map <S-f> :GS
" map <C-S-f> :GSW
let g:exGS_backto_editbuf = 0
let g:exGS_close_when_selected = 0
" case insensitive ,but if you have a pattern
" with at least one uppercase character, the search becomes
" case sensitive
set ignorecase smartcase

 

if has("multi_byte")
  if &termencoding == ""
    let &termencoding = &encoding
  endif
  set encoding=utf-8
  setglobal fileencoding=utf-8
  "setglobal bomb
  set fileencodings=ucs-bom,utf-8,latin1
endif
" #***'s custom settings end 

 

 

 

有篇文件看一下:

How I boosted my Vim

Coming Home to Vim

http://stevelosh.com/blog/2010/09/coming-home-to-vim

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值