-
-
Save chewtoys/981c8e205592281b75465ba8b3867ebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" Plugins | |
Plugin 'posva/vim-vue' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'tpope/vim-surround' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'bling/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'zhaocai/goldenview.vim' | |
Plugin 'mattn/webapi-vim' | |
Plugin 'mattn/gist-vim' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'rking/ag.vim' | |
Plugin 'altercation/vim-colors-solarized' | |
Plugin 'tomasr/molokai' | |
Plugin 'MarcWeber/vim-addon-mw-utils' | |
Plugin 'tomtom/tlib_vim' | |
Plugin 'garbas/vim-snipmate' | |
Plugin 'isRuslan/vim-es6' | |
Plugin 'jiangmiao/auto-pairs' | |
Plugin 'shougo/deoplete.nvim' | |
Plugin 'dkprice/vim-easygrep' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'tpope/vim-repeat' | |
Plugin 'svermeulen/vim-easyclip' | |
Plugin 'ryanoasis/vim-devicons' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'iamcco/markdown-preview.vim' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
"let g:python_host_prog = '/path/to/python2.7r/local/cellar/python3/3.5.2_1' | |
let g:deoplete#enable_at_startup = 1 | |
let mapleader = "," | |
map <Leader>n :NERDTreeToggle <Esc> | |
map <Leader>s :call ToggleScheme() <Esc> | |
map <Leader>e :edit <Esc> | |
map <Leader>p :CtrlP <Esc> | |
map <Leader>a :Ag <Space> | |
map <Leader>j :call FormatJson() <Esc> | |
map <M-BS> :nohls<CR> | |
map <C-h> <C-w>h | |
map <C-j> <C-w>j | |
map <C-k> <C-w>k | |
map <C-l> <C-w>l | |
inoremap jj <ESC> | |
inoremap jk <ESC> | |
inoremap fd <ESC> | |
imap cll console.log()<Esc>==f(a | |
" Set GUI customizations | |
syntax on | |
set nowrap | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set guioptions-=L | |
set guioptions-=r | |
set guifont=Hack\ Regular | |
"set clipboard+=unnamedplus | |
set notermguicolors | |
" Ctrlp | |
set wildignore+=*/node_modules/* | |
" Markdown preview | |
let vim_markdown_preview_hotkey='<C-m>' | |
" React for js ext | |
let g:jsx_ext_required = 0 | |
" Easyclip | |
let g:EasyClipShareYanks = 1 | |
let g:EasyClipAutoFormat = 1 | |
let g:EasyClipUsePasteToggleDefaults = 0 | |
nmap <c-f> <plug>EasyClipSwapPasteForward | |
nmap <c-F> <plug>EasyClipSwapPasteBackwards | |
" Vim airline | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#branch#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
" JS syntax tweaks | |
let javascript_enable_domhtmlcss = 1 | |
" Launch colorscheme based on time of day | |
if strftime("%H") >= 7 && strftime("%H") < 17 | |
let g:solarized_termcolors=256 | |
syntax enable | |
colorscheme solarized | |
set background=dark | |
let g:airline_theme='badwolf' | |
else | |
colorscheme molokai | |
let g:airline_theme='simple' | |
endif | |
" Toggle colorscheme | |
fu! ToggleScheme() | |
if g:colors_name == 'molokai' | |
let g:solarized_termcolors=256 | |
syntax enable | |
colorscheme solarized | |
set background=dark | |
"let g:airline_theme='badwolf' | |
else | |
colorscheme molokai | |
"let g:airline_theme='simple' | |
endif | |
endfunction | |
" Format json | |
fu! FormatJson() | |
execute '%!python -m json.tool' | w | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment