Vimrc备份信息(For Mac)

Vimrc备份(for Mac)

execute pathogen#infect()
syntax on
filetype plugin indent on
""set cursorcolumn
""set cursorline
"setting below will disable set cursorline
autocmd InsertLeave * se nocul
autocmd InsertEnter * se cul
autocmd! bufwritepost ~/.vimrc source %
set guicursor=i:ver1
set nocompatible
set cmdheight=1
set smarttab
""set runtimepath=~/.vim,/Applications/MacVim.app/Contents/Resources/vim/runtime
""set runtimepath=~/.vim, /Applications/MacVim.app/Contents/MacOS
"set runtimepath=~/.vim,/usr/local/Cellar/vim/7.4.1941/share/vim/vim74
set runtimepath=~/.vim,/usr/local/Cellar/vim/
set t_Co=256
set langmenu=none
"  auto reload file when changed outside current vim
set autoread
""space to toggle fold open or close

"nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zO')<CR>

"set foldmethod=indent
set foldmethod=manual
if line("$")>200
    set foldenable
    set foldmethod=syntax
endif
"set foldmethod=marker
"set fdm=syntax
set confirm
set mouse=a
set cindent
set autoindent
set smartindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set ignorecase
set number
set relativenumber
set history=50
set hlsearch
set incsearch
set showmatch
set matchtime=5
set autowrite
set autoread
set wildmenu
set nowrap
set gdefault
""encodings
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
"80 per line
""h23=>vertival
""h18=>horizonal
set guifont=Source\ Code\ Pro\ ExtraLight:h20
""set guifont=Monaco:h22
""set ruler
set laststatus=2
set showcmd
set magic
set nobackup
set noswapfile
set completeopt=longest,menu

if has("autocmd")
   au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
      \| exe "normal g'\"" | endif
endif

"Disable event-handler attributes support:
let g:html5_event_handler_attributes_complete = 0
"Disable RDFa attributes support:
let g:html5_rdfa_attributes_complete = 0
"Disable microdata attributes support:
let g:html5_microdata_attributes_complete = 0
"Disable WAI-ARIA attribute support:
let g:html5_aria_attributes_complete = 0
""set title
""set scrolloff=8
set clipboard+=unnamed
"set no error bells
set vb t_vb=
let mapleader=","

nmap <tab> V>
nmap <s-tab> V<
nmap vw bve
""nmap ; :
nmap <leader>a A
nmap <leader>b <c-r>b
nmap <leader>c :source ~/.vimrc<cr>
nmap <leader>d D
nmap <leader>e :e<space>
""nmap <leader>f w<cr>
nmap <leader>g G
nmap <leader>h H
nmap <leader>i I
nmap <leader>j J
""nmap <leader>k :e \$VIM/vimrc<cr>
nmap <leader>k :e ~/.vimrc<cr>
nmap <leader>l L
nmap <leader>m M
nmap <leader>o O
nmap <leader>p P
nmap <leader>q :q<cr>
nmap <leader>r R
nmap <leader>s :Sexplore<cr>
nmap <leader>x :x<cr>
nmap <leader>v :Sex!<cr>
""nmap <leader>/ :Sex!<cr>
nmap <leader>w :w<cr>
nmap <leader>1 !
nmap <leader>2 @
nmap <leader>3 #
nmap <leader>4 $
nmap <leader>5 %
nmap <leader>6 ^
nmap <leader>7 &
nmap <leader>8 *
nmap <leader>9 (
nmap <leader>0 )
nmap <leader>[ {
nmap <leader>] }
nmap gv `[v`]
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l
nmap snp set nopaste
nmap sps set paste

vmap <leader>a A
vmap <leader>i I
vmap <leader>g G
vmap <leader>u U
vmap <leader>1 !
vmap <leader>2 @
vmap <leader>3 #
vmap <leader>4 $
vmap <leader>5 %
vmap <leader>6 ^
vmap <leader>7 &
vmap <leader>8 *
vmap <leader>9 (
vmap <leader>0 )
vmap <leader>[ {
vmap <leader>] }
""vmap <leader>b :w !coffee -b %<cr>
""vmap <leader>c :w !coffee<cr>
""vmap <leader>p :w !coffee -p %<cr>
vmap <leader>r :w !node<cr>

imap ;; <esc>
imap jj <esc>
imap <C-h> <left>
imap <C-l> <right>
imap <C-j> <C-o>gj
imap <C-k> <C-o>gk
imap <C-j> <esc>ja
imap <C-k> <esc>ka
imap <leader>a A
imap <leader>b B
imap <leader>c C
imap <leader>d D
imap <leader>e E
imap <leader>f F
imap <leader>g G
imap <leader>h H
imap <leader>i I
imap <leader>j J
imap <leader>k K
imap <leader>l L
imap <leader>m M
imap <leader>n N
imap <leader>o O
imap <leader>p P
imap <leader>q Q
imap <leader>r R
imap <leader>s S
imap <leader>t T
imap <leader>u U
imap <leader>v V
imap <leader>w W
imap <leader>x X
imap <leader>y Y
imap <leader>z Z
imap <leader>0 )
imap <leader>1 !
imap <leader>2 @
imap <leader>3 #
imap <leader>4 $
imap <leader>5 %
imap <leader>6 ^
imap <leader>7 &
imap <leader>8 *
imap <leader>9 (
imap <leader>` ~
imap <leader>= +
imap <leader>- _
imap <leader>; :
imap <leader>' "
imap <leader>[ {
imap <leader>, <
imap <leader>. >
imap --- <esc>I<!--<esc>$a--><esc>jI

inoremap ( ()<ESC>i
inoremap { {<cr>}<ESC>O
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i

iabbr as async.<C-R>=EatChar('\s')<CR>
iabbr ca catch<space>;<esc>i(function<space>(error<c-l><space>{return<space>utils.sendError;<esc>i(res,<space>error.message<esc><C-R>=EatChar('\s')<CR>
iabbr cas console.assert;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr cd console.debug;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr ce console.error;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr ci console.info;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr cl console.log;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr ct console.time;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr cte console.timeEnd;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr ctr console.trace;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr da data:<space><c-r>=EatChar('\s')<cr>
iabbr del delete<space><c-r>=EatChar('\s')<cr>
iabbr done done;<esc>i(<esc><c-r>=EatChar('\s')<cr>
iabbr dq db.query(<c-r>=EatChar('\s')<cr>
iabbr dre d.reject(error<esc>la;<esc><c-r>=EatChar('\s')<cr>
iabbr drs d.resolve(<c-r>=EatChar('\s')<cr>
iabbr elf elseif<space>(<esc>la<space>{<esc>ddk$6hi<space><esc>$2hi<C-R>=EatChar('\s')<CR>
iabbr els else<space>{<c-r>=EatChar('\s')<cr>
iabbr em error.message<esc><c-r>=EatChar('\s')<cr>
iabbr er error<c-l>{<c-r>=EatChar('\s')<cr>
iabbr expo exports.<c-r>=EatChar('\s')<cr>
iabbr expc expect(<c-r>=EatChar('\s')<cr>
iabbr fori for<space>(var<space>i<space>=<space>0, leni<space>=<space>ttarray.length;<space>i<space><<space>leni;<space>i++<c-l><space>{<esc>ddkV:s/ttarray/<C-R>=EatChar('\s')<CR>
iabbr forj for<space>(var<space>j<space>=<space>0, lenj<space>=<space>ttarray.length;<space>j<space><<space>lenj;<space>j++<c-l><space>{<esc>ddkV:s/ttarray/<C-R>=EatChar('\s')<CR>
iabbr forx for (var x in ttarray<c-l><space>{<esc>ddkV:s/ttarray/<C-R>=EatChar('\s')<CR>
iabbr fory for (var y in ttarray<c-l><space>{<esc>ddkV:s/ttarray/<C-R>=EatChar('\s')<CR>
iabbr fn function<space>(<esc>la<space>{<esc>ddk$2hi<c-r>=EatChar('\s')<cr>
""iabbr func function<space>=EatChar('\s')<cr>
iabbr fwfs fs.writeFileSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr fexs fs.existsSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr feds fs.ensureDirSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr frns fs.renameSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr frms fs.removeSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr frfs fs.readFileSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr fafs fs.appendFileSync(<esc>a<c-r>=EatChar('\s')<cr>
iabbr fcws fs.createWriteStream(<esc>a<c-r>=EatChar('\s')<cr>
iabbr fcrs fs.createReadStream(<esc>a<c-r>=EatChar('\s')<cr>
iabbr hte the
iabbr ifc if<space>(<esc>la<space>{<esc>ddk$2hi<C-R>=EatChar('\s')<CR>
iabbr jsp JSON.parse(<C-R>=EatChar('\s')<CR>
iabbr jsf JSON.stringify(<C-R>=EatChar('\s')<CR>
iabbr ld logger.debug;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr le logger.error;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr len length;
iabbr li logger.info;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr mod module<space>= fn<c-r>=EatChar('\s')<cr>
iabbr msg message: {<c-r>=EatChar('\s')<cr>
iabbr nr new<space>RegExp(<c-r>=EatChar('\s')<cr>
iabbr na new<space>Array(<c-r>=EatChar('\s')<cr>
iabbr ns new<space>String(<c-r>=EatChar('\s')<cr>
iabbr nn new<space>Number(<c-r>=EatChar('\s')<cr>
iabbr optc Object.prototype.toString.call(<c-r>=EatChar('\s')<cr>
iabbr r return;<esc>i
iabbr rdp return<space>d.promise;<esc><c-r>=EatChar('\s')<cr>
iabbr reqi require(<c-r>=EatChar('\s')<cr>
iabbr reqt request<c-r>=EatChar('\s')<cr>
iabbr re return<space><c-r>=EatChar('\s')<cr>
iabbr rqb req.body.<c-r>=EatChar('\s')<cr>
iabbr rqh req.headers.<c-r>=EatChar('\s')<cr>
iabbr rqf req.files.<c-r>=EatChar('\s')<cr>
iabbr rqp req.params.<c-r>=EatChar('\s')<cr>
iabbr rqq req.query.<c-r>=EatChar('\s')<cr>
iabbr rqr req.redirect(<c-r>=EatChar('\s')<cr>
iabbr rqs req, res<c-l><space>{<esc>ja;<esc>kddO<c-r>=EatChar('\s')<cr>
iabbr rqu req.user.<c-r>=EatChar('\s')<cr>
iabbr rrsj return<space>res.json;<esc>i({status:<space><c-r>=EatChar('\s')<cr>
iabbr rue return<space>utils.sendError;<esc>i(res,<space><c-r>=EatChar('\s')<cr>
iabbr rus return<space>utils.sendSuccess;<esc>i(res,<space><c-r>=EatChar('\s')<cr>
iabbr rsj res.json;<esc>i({status:<space><c-r>=EatChar('\s')<cr>
iabbr rss res.send;<esc>i(<c-r>=EatChar('\s')<cr>
iabbr rst result<c-r>=EatChar('\s')<cr>
iabbr sta status:<space><c-r>=EatChar('\s')<cr>
iabbr tc try<space>{<esc>dda<space>catch<space>(<esc>aerror<c-l><space>{<esc>dd2ko<c-r>=EatChar('\s')<cr>
iabbr tehn then<c-r>=EatChar('\s')<cr>
iabbr then then(function<space>(<esc>la<space>{<esc>ddk$2hi<c-r>=EatChar('\s')<cr>
iabbr spread spread(function<space>(<esc>la<space>{<esc>ddk$2hi<c-r>=EatChar('\s')<cr>
iabbr lodash var<space>utils<space>=<space>require;<esc>i('lodash<esc><c-r>=EatChar('\s')<cr>
iabbr tne throw<space>new<space>Error;<esc>i(<C-R>=EatChar('\s')<CR>
iabbr uf utils.filter;<esc>i(yes, function(item<c-l><space>{<esc>ddkV:s/yes/<c-r>=EatChar('\s')<CR>
iabbr v var;<esc>i
iabbr va var <esc>i
iabbr var var<space>module<space>=<space>require('<esc>amodule<esc>2la;<esc>V:s/module/<c-r>=EatChar('\s')<cr>
iabbr vdq var<space>d<space>=<space>Q.defer(<esc>la;<cr><c-r>=EatChar('\s')<cr>

cabbr fjson %!python -m json.tool
cabbr cdph cd<space>%:p:h
cabbr dbl %s/\s\+$//
cabbr ss 20 Sex!

":smap - Display select mode maps
":xmap - Display visual mode maps
":omap - Display operator pending mode maps

syntax on
""colorscheme zenburn
""colorscheme combat256
colorscheme dracula
""colorscheme solarized
""set background=dark
""set term=builtin_ansi
func EatChar(pat)
    let c = nr2char(getchar(0))
    return (c =~ a:pat) ? '' : c
endfunc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值