Skip to content

Instantly share code, notes, and snippets.

@tonyseek
Last active March 31, 2018 04:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyseek/3225280 to your computer and use it in GitHub Desktop.
Save tonyseek/3225280 to your computer and use it in GitHub Desktop.
[DEPRECATED] My Configuration of VIM
syntax on
filetype off
" format and user interface
set nocompatible
set number
set softtabstop=4 tabstop=4 shiftwidth=4
set expandtab
set autoindent
set hlsearch
set mouse=a
set cursorline
set laststatus=2
set backspace=2
" initialize vundle
if !isdirectory(expand("~/.vim/bundle/vundle/.git"))
!git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" feature bundles
Bundle 'gmarik/vundle'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/nerdcommenter'
Bundle 'jistr/vim-nerdtree-tabs'
Bundle 'kien/ctrlp.vim'
Bundle 'majutsushi/tagbar'
Bundle 'ervandew/supertab'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-surround'
Bundle 'scrooloose/syntastic'
Bundle 'bling/vim-airline'
Bundle 'editorconfig/editorconfig-vim'
Bundle 'mattn/emmet-vim'
" file type bundles
Bundle 'kchmck/vim-coffee-script'
Bundle 'derekwyatt/vim-scala'
Bundle 'Glench/Vim-Jinja2-Syntax'
Bundle 'sophacles/vim-bundle-mako'
Bundle 'othree/html5.vim'
Bundle 'sprsquish/thrift.vim'
Bundle 'tonyseek/rust.vim'
Bundle 'cakebaker/scss-syntax.vim'
Bundle 'wavded/vim-stylus'
Bundle 'jansenm/vim-cmake'
Bundle 'vim-ruby/vim-ruby'
Bundle 'tfnico/vim-gradle'
Bundle 'cespare/vim-toml'
Bundle 'evanmiller/nginx-vim-syntax'
" theme bundles
Bundle 'chriskempson/base16-vim'
" key mapping
let mapleader=","
imap jk <ESC>
imap Jk <ESC>
imap JK <ESC>
imap jK <ESC>
imap <C-L> <RIGHT>
nmap 1 ^
nmap <Leader>tb :TagbarToggle<CR>
nmap <Leader>tt :NERDTreeToggle<CR>
nmap <Leader>nt :tabnew<CR>
nmap <TAB> :tabn<CR>
nmap <C-J> <C-W>j<C-W>_
nmap <C-K> <C-W>k<C-W>_
nmap <C-L> <C-W>l<C-W>_
nmap <C-H> <C-W>h<C-W>_
" custom commands
com! FormatJSON %!python -m json.tool
" configurations of plugins
let g:nerdtree_tabs_open_on_console_startup = 0
let g:nerdtree_tabs_open_on_gui_startup = 0
let g:airline_powerline_fonts = 1
let g:airline_theme = 'jellybeans'
let NERDTreeIgnore = ['\.py[oc]$', '__pycache__', '\.egg-info']
let g:ctrlp_custom_ignore = 'node_modules\|pyc\|git\|__pycache__'
let g:tagbar_ctags_bin='/usr/bin/ctags'
let g:ctrlp_use_caching = 1
let g:ctrlp_working_path_mode = 0
let g:syntastic_cpp_compiler_options = ' -std=c++11'
let g:syntastic_java_javac_config_file_enabled = 1
let g:loaded_syntastic_rst_rst2pseudoxml_checker = 1
let g:jinja_syntax_html = 1
if filereadable('/usr/local/bin/ctags')
let g:tagbar_ctags_bin = '/usr/local/bin/ctags'
endif
function! FiletypeHook(config)
if has_key(a:config, 'language')
let &filetype = a:config['language']
endif
return 0 " Return 0 to show no error happened
endfunction
call editorconfig#AddNewHook(function('FiletypeHook'))
" display style
if exists('+colorcolumn')
set colorcolumn=80
endif
if &term == 'linux' || &term == 'ansi'
set t_Co=8
else
set t_Co=256
endif
let base16colorspace=256
set background=dark
colorscheme base16-monokai
" indent
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
autocmd Filetype coffee setlocal ts=2 sts=2 sw=2
autocmd Filetype stylus setlocal ts=2 sts=2 sw=2
filetype plugin on
filetype indent on
@bcho
Copy link

bcho commented Aug 13, 2012

赶紧填充 map 的行数@@

@tonyseek
Copy link
Author

@bcho 不填 = =~ 够用就好

@bcho
Copy link

bcho commented Aug 16, 2012

@tonyseek 等你要够用时候,就肯定填了不少了……

@tonyseek
Copy link
Author

@bcho 悲伤地发现你居然注销了 (:з」∠)

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