Skip to content

Instantly share code, notes, and snippets.

@wtfc0d3
Created June 18, 2021 20: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 wtfc0d3/360a25341d57c0952ddd6632de8ba887 to your computer and use it in GitHub Desktop.
Save wtfc0d3/360a25341d57c0952ddd6632de8ba887 to your computer and use it in GitHub Desktop.
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source ~/.vimrc
\| endif
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree'
Plug 'joshdick/onedark.vim'
Plug 'itchyny/lightline.vim'
let g:lightline = {
\ 'colorscheme': 'onedark',
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" },
\ }
Plug 'frazrepo/vim-rainbow'
let g:rainbow_active = 1
Plug 'nathanaelkane/vim-indent-guides'
let g:indent_guides_enable_on_vim_startup = 1
Plug 'dense-analysis/ale'
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\ 'python': ['black', 'isort'],
\}
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'python': ['pyls'],
\}
let g:ale_fix_on_save = 1
let g:ale_completion_enabled = 1
set omnifunc=ale#completion#OmniFunc
let g:ale_completion_autoimport = 1
call plug#end()
set ai et ts=2 sts=2 sw=2 cindent
set hls ignorecase incsearch smartcase
set rnu
set cul
set showmatch
set laststatus=2
set noshowmode
set lazyredraw
set ttyfast
set hidden
set nobackup noswapfile nowritebackup
if !has('gui_running')
set t_Co=256
endif
set background=dark
colorscheme onedark
" restore cursor position
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
let mapleader=" "
nnoremap <Space> <Nop>
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment