Skip to content

Instantly share code, notes, and snippets.

@gsuuon
Created October 31, 2016 18:13
Show Gist options
  • Save gsuuon/3aaace3e2badbf7bb628c8bfd9f18214 to your computer and use it in GitHub Desktop.
Save gsuuon/3aaace3e2badbf7bb628c8bfd9f18214 to your computer and use it in GitHub Desktop.
Vim config
set noeb vb t_vb=
set lines=999 columns=999
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
set guifont=Consolas:h12:cANSI
colorscheme Distinguishe
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
set nocompatible
set number
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set backupdir=~/.vim/backup//
set directory=~/.vim/swap//
set undodir=~/.vim/undo//
set formatoptions+=l
set lbr
noremap <F4> :set hlsearch! hlsearch?<CR>
autocmd BufRead *.less noremap <buffer> <F5> :w <bar> :!lessc % --autoprefix > %:p:r.css<CR>
autocmd BufRead *server.py noremap <buffer> <F5> :w <bar> :!python %<CR>
autocmd BufRead *.less setfiletype css
inoremap <silent> <C-i>d <C-R>=strftime("** %c")<CR>
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
map <silent> <tab> :tabnext<CR>
map <silent> <S-tab> :tabprevious<CR>
nnoremap ö :mksession! view
nnoremap <F6> :wa<CR>
nnoremap <F7> :!rollup -c<CR>
nmap <F8> :TagbarToggle<CR>
set encoding=utf-8
set fdm=indent
set ignorecase
set smartcase
execute pathogen#infect()
set laststatus=2 "always show status line
set statusline=%-.20f%y%m%r%=%02.l.%02.c\ \|%3.3p%%
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_enable_balloons = 0
au BufRead,BufNewFile *.json set filetype=json
let g:syntastic_filetype_map = {".cjsx":"coffee" }
let g:syntastic_filetype_map = {".jsx" :"javascript" }
let g:syntastic_javascript_checkers=["eslint"]
let g:tern_show_argument_hints="on_hold"
let g:tern_map_keys=1
autocmd BufNewFile,BufReadPost *.coffee setl foldmethod=indent
autocmd BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab
" vim-go
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
map <C-n> :NERDTreeToggle<CR>
" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Syntax highlighting messes up due to folds; use <C-L> to re-draw file
noremap <silent> <A-Right> <C-w>l
noremap <silent> <A-Left> <C-w>h
noremap <silent> <A-Up> <C-w>k
noremap <silent> <A-Down> <C-w>j
noremap <silent> <A-l> <C-w>l
noremap <silent> <A-h> <C-w>h
noremap <silent> <A-k> <C-w>k
noremap <silent> <A-j> <C-w>j
set noballooneval
setlocal balloonexpr=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment