mac下vim配置文件备份

let g:mapleader=','

set nocompatible

set encoding=utf-8

set termencoding=utf-8

set fileencoding=utf-8

set fileencodings=ucs-bom,utf-8,cp936

set backspace=2

set number

set history=50

set ruler

set hlsearch

set incsearch

set mouse=icrv

set showcmd

set showmode

set backspace=indent,eol,start

"set ignorecase

set tabstop=4

set shiftwidth=4

set expandtab

set formatoptions=tcqmM

set textwidth=150

set foldlevel=100

set completeopt=longest,menu

"set t_Co=16

"colo wombat256

colo ir_black

 

" for ctags

nnoremap <F2> :tnext<cr>

nnoremap <F3> :tselect<cr>

 

nnoremap <Space> o<Esc>

nnoremap <Leader>qq :q!<cr>

nnoremap <Leader>qa :qa!<cr>

nnoremap <Leader>wq :wq<cr>

nnoremap <Leader>ww :w<cr>

nnoremap <C-k>  mz:m-2<cr>`z==

nnoremap <C-j>  mz:m+<cr>`z==

vnoremap <C-k>  :m'<-2<cr>gv=gv

vnoremap <C-j>  :m'>+<cr>gv=gv

nnoremap <Tab> V>

nnoremap <S-Tab> V<

vnoremap <Tab> >gv

vnoremap <S-Tab> <gv

inoremap <C-E> <End>

inoremap <C-A> <Home>

inoremap <C-P> <Up>

inoremap <C-N> <Down>

inoremap <C-B> <Left>

inoremap <C-F> <Right>

inoremap <C-J> <cr>

inoremap <C-D> <del>

inoremap <F9> <C-x><C-o>

inoremap <F10> <C-x><C-p>

nmap <C-a> ggVG

vmap <C-c> y:call system("pbcopy", getreg("/""))<CR>

nmap <C-p> :call setreg("/"",system("pbpaste"))<CR>p

 

syntax on

if has("autocmd")

   filetype on

   filetype indent on

   filetype plugin on

   au BufReadPost * if line("'/"") > 1 && line("'/"") <= line("$") | exe "normal! g`/"" | endif

   au FileType python nnoremap <F4> :w<cr>:!python %<cr>

 

   "ctags --list-kinds=python

   "ctags -R --python-kinds=cfm --languages=python --extra=+q .

   au FileType python setlocal tags=$DJANGO_TAGS;

   "using pydiction

   au FileType python setlocal dictionary=$PYTHON_DICTION complete+=k iskeyword+=.

endif

 

"for python syntax

let python_highlight_all = 1

 

"for xptemplate

let g:xptemplate_vars = "SPop=&SParg="

let g:xptemplate_brace_complete = ''

 

"for neocomplecache

let g:neocomplcache_enable_at_startup = 1 

let g:neocomplcache_enable_auto_select = 1

inoremap <expr><Tab> pumvisible() ? "/<Down>" : "/<Tab>"

inoremap <expr><CR> pumvisible() ? "/<C-y>".neocomplcache#cancel_popup() : "<CR>"

 

"for winmanage and taglist

let Tlist_Show_File=1

let Tlist_Exit_OnlyWindow=1

let g:winManagerWindowLayout='FileExplorer|TagList'

nmap <Leader>wm :WMToggle<cr>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值