Skip to content

Instantly share code, notes, and snippets.

@mshaaban0
Created June 14, 2020 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshaaban0/c36da3e55c5af7b381cf79b8e0256baf to your computer and use it in GitHub Desktop.
Save mshaaban0/c36da3e55c5af7b381cf79b8e0256baf to your computer and use it in GitHub Desktop.
2020 Vim
set shell=/bin/bash
set incsearch
" default tab size
set tabstop=2
set shiftwidth=2
set updatetime=100
set directory^=$HOME/vimswap//
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-surround'
Plug 'sheerun/vim-polyglot'
Plug 'morhetz/gruvbox'
Plug 'preservim/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'dense-analysis/ale'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-fugitive'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'vim-airline/vim-airline'
" Initialize plugin system
call plug#end()
" Custom Config
" enable syntax highlighting
syntax on " radical
set synmaxcol=200 " arbitrary number < 3000 (default value)
set foldmethod=manual " anything other than 'syntax'
set foldmethod=indent
set noshowmatch " it's off by default but well
colorscheme gruvbox
set background=dark
" Open Nerdtree automatically when no filename specified
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Add eslint to Ale config
let b:ale_fixers = ['prettier', 'eslint']
" Fix files automatically on save
let g:ale_fix_on_save = 1
" Enable completion where available.
let g:ale_completion_enabled = 1
" Key bindings
nnoremap <C-p> :GFiles<CR>
nnoremap <Leader>b :Buffers<CR>
nnoremap <Leader>h :History<CR>
nnoremap <C-b> :NERDTreeToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment