Skip to content

Instantly share code, notes, and snippets.

@liuzhe0223
Created March 21, 2014 10:14
Show Gist options
  • Save liuzhe0223/9683180 to your computer and use it in GitHub Desktop.
Save liuzhe0223/9683180 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
"Bundle 'c.vim'
Bundle 'go.vim'
Bundle 'python.vim'
Bundle 'https://github.com/msanders/snipmate.vim.git'
Bundle 'vim-ruby/vim-ruby'
Bundle 'vim-coffee-script'
Bundle 'git://github.com/scrooloose/nerdtree.git'
Bundle 'https://github.com/mattn/emmet-vim.git'
Bundle 'git://github.com/kien/ctrlp.vim.git'
Bundle 'git://github.com/Yggdroot/indentLine.git'
Bundle 'https://github.com/hynek/vim-python-pep8-indent.git'
Bundle 'https://github.com/vim-scripts/Auto-Pairs.git'
Bundle 'https://github.com/davidhalter/jedi-vim.git'
Bundle 'https://github.com/Shougo/neocomplcache.git'
Bundle 'https://github.com/Lokaltog/vim-powerline.git'
"Bundle 'Valloric/YouCompleteMe'
"Bundle 'https://github.com/dart-lang/dart-vim-plugin.git'
"Bundle 'https://github.com/wting/rust.vim.git'
"Bundle 'https://github.com/derekwyatt/vim-scala.git'
"Bundle 'https://github.com/dag/vim2hs.git'
"let g:ycm_global_ycm_extra_conf = '/home/zhe/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:pymode_indent = 0
syntax enable
filetype indent on
autocmd BufRead,BufNewFile *.go set filetype=go
set nu
set enc=Chinese tenc=UTF-8
set encoding=utf-8
set colorcolumn=80 "highlight 80 cl
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set shiftwidth=2
set tabstop=2
autocmd BufNewFile,BufRead *.py set expandtab tabstop=4 shiftwidth=4
let NERDTreeIgnore = ['\.pyc$'] "忽略python的字节码文件
autocmd vimenter * if !argc() | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
inoremap jj <ESC>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" python filetype
function HeaderPython()
call setline(1, "#!/usr/bin/env python2")
call append(1, "# -*- coding: utf-8 -*-")
call append(2, "# Pw @ " . strftime('%Y-%m-%d %T', localtime()))
normal G
normal o
normal o
endf
autocmd bufnewfile *.py call HeaderPython()
"python tab
:set expandtab
:%retab!%
@defp
Copy link

defp commented Mar 21, 2014

git地址不用写那么全,直接 username/repo 就可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment