Skip to content

Instantly share code, notes, and snippets.

@stingh711
Created June 24, 2014 08:19
Show Gist options
  • Save stingh711/5910f13915ca6575a336 to your computer and use it in GitHub Desktop.
Save stingh711/5910f13915ca6575a336 to your computer and use it in GitHub Desktop.
My vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#begin()
Plugin 'gmarik/vundle'
"Plugin 'ervandew/supertab'
Plugin 'nanotech/jellybeans.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'mattn/emmet-vim'
Plugin 'tpope/vim-ragtag'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-liquid'
Plugin 'tpope/vim-haml'
"Plugin 'tpope/sensible'
Plugin 'tpope/vim-fugitive'
Plugin 'chriskempson/vim-tomorrow-theme'
Plugin 'jpo/vim-railscasts-theme'
Plugin 'vim-scripts/mru.vim'
Plugin 'vim-scripts/matchit.zip'
"Plugin 'msanders/snipmate.vim'
Plugin 'jeetsukumaran/vim-buffergator'
Plugin 'kien/ctrlp.vim'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'Raimondi/delimitMate'
"Plugin 'vim-scripts/HTML-AutoCloseTag'
"Plugin 'sjbach/lusty'
Plugin 'skammer/vim-css-color'
Plugin 'miripiruni/vim-better-css-indent'
Plugin 'Shougo/unite.vim'
Plugin 'vim-scripts/vimwiki'
"Plugin 'emezeske/paredit.vim'
Plugin 'vim-scripts/groovyindent'
Plugin 'Shougo/neocomplete.vim'
Plugin 'Shougo/neosnippet.vim'
Plugin 'honza/vim-snippets'
Plugin 'Shougo/context_filetype.vim'
Plugin 'Yggdroot/indentLine'
Plugin 'tpope/vim-fireplace'
Plugin 'tpope/vim-classpath'
Plugin 'guns/vim-clojure-static'
Plugin 'majutsushi/tagbar'
Plugin 'mileszs/ack.vim'
Plugin 'tpope/vim-vinegar'
Plugin 'terryma/vim-multiple-cursors'
call vundle#end()
filetype plugin indent on
set encoding=utf-8
set fencs=ucs-bom,utf-8,default,chinese
if has("win32")
"set fenc=chinese
set fenc=utf-8
else
set fenc=utf-8
endif
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
language messages zh_CN.UTF-8
syntax on
"let &termencoding=&encoding
"set fileencodings=utf-8,gbk,ucs-bom,cp936
"set fileencodings=utf-8,chinese,latin-1
"set termencoding=chinese
"set encoding=utf-8
"set fileencoding=chinese
"language messages zh_CN.utf-8
"set guifont=DejaVu\ Sans\ Mono
"set guifont=Monaco
set guifont=Lucida\ Console:h12
colors Tomorrow
if has('gui_running')
set guioptions-=T
"set guioptions-=m
set guioptions-=r
endif
set nobackup
set expandtab
set shiftwidth=4
set smarttab
set tabstop=4
set softtabstop=4
set number
set numberwidth=1
set shiftround
set copyindent
set smartcase
autocmd BufEnter * silent! lcd %:p:h
set autowrite
set autoread
set backspace=2
set noswapfile
set hlsearch
let mapleader=','
let g:mapleader=','
let maplocalleader=','
let html_use_css=1
let html_number_lines=0
let html_no_pre=1
"key mappings
"inoremap <M-o> <Esc>o
"inoremap <C-j> <Down>
"let g:ragtag_global_maps = 1
"HTML, XML keys
inoremap <C-o> <cr><Esc>O
"General keys
inoremap <f1> <Esc>:w<cr>a
inoremap ;; <Esc>A;
nnoremap <f1> :w<cr>
nnoremap <Leader>ev :e $MYVIMRC<cr>
nnoremap <Leader>sv :source $MYVIMRC<cr>
nnoremap <Leader>bd :bd<cr>
nnoremap <Leader>b :Unite buffer<cr>
vnoremap <Leader>c "+y
nnoremap <Leader>p "+gP
nnoremap <Leader>n :NERDTreeToggle<cr>
let g:user_zen_leader_key = '<c-e>'
"Vimwiki settings
let g:vimwiki_list = [{'path': 'e:/Dropbox/vim/wiki/', 'path_html': 'e:/Dropbox/vim/public_html/'}]
"End Vimwiki settings
"Paredit settings
"au BufNewFile,BufRead *.html call PareditInitBuffer()
"End paredit settings
"let g:neocomplcache_enable_at_startup = 1
let g:neocomplete#enable_at_startup = 1
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
let g:neosnippet#enable_snipmate_compatibility = 1
" Tell Neosnippet about the other snippets
let g:neosnippet#snippets_directory='~/.vim/Plugin/vim-snippets/snippets'
imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: pumvisible() ? "\<C-n>" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: "\<TAB>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment