mac下vim設定檔備份

來源:互聯網
上載者:User

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>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.