Chinaunix首页 | 论坛 | 博客
  • 博客访问: 63671
  • 博文数量: 25
  • 博客积分: 1899
  • 博客等级: 上尉
  • 技术积分: 250
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-29 23:45
文章分类

全部博文(25)

文章存档

2012年(22)

2010年(3)

我的朋友

分类: LINUX

2012-02-17 22:06:13

"从此cscope与基本的要分离

syntax on
syntax enable
filetype plugin on
set background=light
set showcmd
set encoding=utf-8

"When .vimrc is edited, reload it
autocmd! bufwritepost .vimrc source ~/.vimrc
source ~/.cscope.vimrc
set textwidth=100
set splitbelow splitright
set matchpairs+=<:>
set et sta sw=4 tabstop=4 sts=4 " expandtab, smarttab, shiftwidth, tabstop, softtabstop
set hls
set cursorline
hi CursorColumn term=underline cterm=underline ctermbg=NONE ctermfg=NONE
set wildmenu
set wildmode=longest,full
set wrap
set ru
set nu
set is
set scroll=10 "default is half screen when ;
set scrolloff=3
set noshowmatch "when type (),the cursor jump
set tabpagemax=20
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

nnoremap ffp :set fileencoding=cp936:w:set fileencoding
nnoremap ffu :set fileencoding=utf-8:w:set fileencoding

"Taglist==========================================================
let Tlist_Inc_Winwidth=0
let Tlist_WinWidth=28
let Tlist_Show_One_File=1 "on dfl, show all tags in the buf
let Tlist_Exit_OnlyWindow=1 "on dfl, if only the Tlist is open, can't close the window

" autocmd and autoindent
if has("autocmd")
filetype plugin indent on "to turn on when 'on', the auto indent, or off
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=80
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
else
endif

"
" nnoremap include nmap vmap omap
"
nnoremap tta :execute Cs_add_file()

noremap ttd :r!date +\%Y-\%m-\%dE
noremap ttf O%V"fyddu0:!rm -f /dev/shm/xm:sp /dev/shm/xmAfdd:wq!
noremap ttF :cd /O%V"fyddu0:!rm -f /dev/shm/xm:sp /dev/shm/xmAfdd:wq!:cd -
noremap ttp mA:sp /dev/shm/xmggVGy:q!P`A
vmap tty y:!echo > /dev/shm/xm:sp /dev/shm/xmPGdd:wq!

"Set mapleader
let mapleader=','
noremap ` :tabe /root/.maintaince.txt
noremap 1 :tabfirst
noremap 2 :tablast
noremap 3 :grep -R --exclude="all-wcprops" "" *
noremap 4 :set et sta ts=8 sw=8 sts=8
noremap 5 :e %
noremap q :q!
noremap a :set noai nocin nosmartindent indentkeys=
noremap c :botright copen 11
noremap d :cex system(' ')
noremap e :tabe ~/.vimrc
noremap f :set winwidth=28:NERDTreeToggle
noremap g gF
noremap h :sh
noremap n :cnewer
noremap o :colder
noremap r :cclose:make:bo copen 11G
noremap s :source ~/.vimrc
noremap t :tabedit
noremap x :tabonly
noremap w :w
noremap z :cs kill cscope.out:cs add cscope.out

" vi means inner, and va menas all of the block;
nnoremap vi{zf
nnoremap va{zf
nnoremap 9
nnoremap 9
nnoremap *

nnoremap b :!man bash
nnoremap w :set winwidth=30
nnoremap u :e ++ff=unix %

" Function keys
nnoremap :set mouse=a
nnoremap :set mouse=

" in insert mode, can scroll the screen; I think, the below 2 is no need
inoremap
inoremap
inoremap
inoremap
inoremap
inoremap i
inoremap
inoremap
inoremap
inoremap
inoremap
inoremap x
inoremap v0di
inoremap vbda
inoremap
inoremap
inoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap
:cnoremap

nmap :tabp
nmap :tabn
vmap "hy
vmap "jy
vmap "ky
vmap "ly
" diff
hi DiffChange ctermbg=0
set diffopt=context:1
map u : diffupdate

阅读(748) | 评论(0) | 转发(0) |
0

上一篇:Week 3 in Review--C++ 21 days

下一篇:vimrc.cs

给主人留下些什么吧!~~