Skip to content

Instantly share code, notes, and snippets.

@CJHwong
Last active August 29, 2015 14:00
Show Gist options
  • Save CJHwong/11248140 to your computer and use it in GitHub Desktop.
Save CJHwong/11248140 to your computer and use it in GitHub Desktop.
set shell=bash
"======Color Scheme======
"set rtp+=~/.vim/bundle/vim-colorschemes
set rtp+=~/.vim/bundle/vim-colors-solarized/
set t_Co=256
set background=dark
colorscheme solarized
"=====Vim Environment====
set tabstop=4 shiftwidth=4 expandtab
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
set relativenumber
nnoremap <F2> :set norelativenumber!<CR>
au BufRead,BufNewFile *.json setf json
"======lang setting======
autocmd FileType html setlocal shiftwidth=2
autocmd FileType css setlocal shiftwidth=2
"=========golang=========
set runtimepath+=$GOROOT/misc/vim
au FileType go au BufWritePre <buffer> Fmt
"========syntastic=======
let g:syntastic_python_python_exe='python3'
let g:syntastic_python_checkers = ['pylint']
"==========Vimux=========
autocmd FileType python nnoremap <F9> :w<CR>:call VimuxRunCommand("python " . bufname("%"))<CR>
autocmd FileType go nnoremap <F9> :w<CR>:call VimuxRunCommand("go run " . bufname("%"))<CR>
autocmd FileType html nnoremap <F9> :w<CR>:call VimuxRunCommand("python -m http.server")<CR>
"========airline=========
set laststatus=2
"==Tagbar ctags/gotags===
nnoremap <F7> :TagbarToggle<CR>
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
"========Supertab========
let g:SuperTabDefaultCompletionType = "context"
"=========Vundle=========
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
filetype plugin indent on
" Vim Interface
"Plugin 'FLAzz/vim-colorschemes'
Plugin 'altercation/vim-colors-solarized'
Plugin 'bling/vim-airline'
Plugin 'nathanaelkane/vim-indent-guides'
" Programming Tools
Plugin 'benmills/vimux'
Plugin 'majutsushi/tagbar'
Plugin 'ervandew/supertab'
Plugin 'scrooloose/syntastic'
Plugin 'michalliu/jsruntime.vim'
Plugin 'michalliu/jsoncodecs.vim'
Plugin 'michalliu/sourcebeautify.vim'
Plugin 'jiangmiao/auto-pairs'
" Language Environment
" Web
Plugin 'tpope/vim-ragtag'
Plugin 'othree/html5.vim'
Plugin 'hail2u/vim-css3-syntax'
"======End Vundle=======
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment