Last active
December 1, 2019 06:52
-
-
Save kapv89/4aa39fc61b2ce79f0ef256facc2017eb to your computer and use it in GitHub Desktop.
my latest vimrc
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
syntax on | |
set backupdir=.backup/,~/.backup/,/tmp// | |
set directory=.swp/,~/.swp/,/tmp// | |
set undodir=.undo/,~/.undo/,/tmp// | |
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' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'sheerun/vim-polyglot' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'w0rp/ale' | |
Plugin 'skywind3000/asyncrun.vim' | |
Plugin 'tpope/vim-commentary' | |
" Plugin 'Valloric/YouCompleteMe' | |
Plugin 'vim-ruby/vim-ruby' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'terryma/vim-multiple-cursors' | |
Plugin 'leafgarland/typescript-vim' | |
" | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
map <C-t> :NERDTreeToggle<CR> | |
map <C-o> :tabe<CR> | |
map <C-h> :tabp<cr> | |
map <C-j> :tabl<cr> | |
map <C-k> :tabr<cr> | |
map <C-l> :tabn<cr> | |
let g:user_emmet_leader_key='<Tab>' | |
let g:user_emmet_settings = { | |
\ 'javascript.jsx' : { | |
\ 'extends' : 'jsx', | |
\ }, | |
\} | |
let g:ale_sign_error = '●' " Less aggressive than the default '>>' | |
let g:ale_sign_warning = '.' | |
let g:ale_lint_on_enter = 0 " Less distracting when opening a new file | |
autocmd BufWritePost *.js AsyncRun -post=checktime ./node_modules/.bin/eslint --fix % | |
autocmd Filetype html setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype javascript setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype json setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype php setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab | |
autocmd Filetype markdown setlocal tabstop=4 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype css setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype yaml setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype python setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab | |
autocmd Filetype typescript setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype graphql setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
autocmd Filetype java setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab | |
autocmd Filetype ruby setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab | |
set number | |
set relativenumber | |
let NERDTreeShowLineNumbers=1 | |
let NERDTreeShowHidden=1 | |
autocmd FileType nerdtree setlocal relativenumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment