Skip to content

Instantly share code, notes, and snippets.

@finchd
Last active March 3, 2023 20:29
Show Gist options
  • Save finchd/a94764676bb13f429bdb3329cc5dab9d to your computer and use it in GitHub Desktop.
Save finchd/a94764676bb13f429bdb3329cc5dab9d to your computer and use it in GitHub Desktop.
.vimrc
set nocompatible
" because we don't need vi compatibility, and want our backspace key to work
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" because we want the defaults, until we don't
" install vim-plug first https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
" below are some vim plugin for demonstration purpose
Plug 'joshdick/onedark.vim'
Plug 'iCyMind/NeoSolarized'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'vim-syntastic/syntastic'
Plug 'ynkdir/vim-vimlparser'
Plug 'syngan/vim-vimlint'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
call plug#end()
" https://jdhao.github.io/2018/11/15/neovim_configuration_windows/
" remember to call :plugInstall when editting the above
" I actually like slate more than the 2 colorschemes above
colorscheme slate
" line numbers
set number
" let backspace delete left of insert mode start-point
set bs=2
" tabs!
" `:set list` makes tab characters visible
" fix a file with `:retab!`
set expandtab shiftwidth=2 smarttab softtabstop=0 tabstop=8
" Makefile must be \t not spaces
autocmd FileType Makefile setlocal noexpandtab
" do I need to specify, I think this is on already
filetype plugin on
" assuming vim-airline and vim-airline-themes
let g:airline_theme='simple'
" syntastic recommended settings
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 = 1
let g:syntastic_check_on_wq = 0
" end syntastic recommended settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment