Skip to content

Instantly share code, notes, and snippets.

@scottstanfield
Created March 17, 2019 17:03
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 scottstanfield/e472755147e86ec68cae8e553ce2626b to your computer and use it in GitHub Desktop.
Save scottstanfield/e472755147e86ec68cae8e553ce2626b to your computer and use it in GitHub Desktop.
minimal .vimrc
" vim 8.1
filetype plugin indent on
syntax on " turn on color if possible
colorscheme desert
" Use :help 'option' to see the documentation for the given option.
" second line
set nowrap " don't wrap long lines (>80 is ok)
set smartindent " indent based on the file extension
set autoindent " indent based on the previous line
set backspace=indent,eol,start
set complete-=i
set smarttab
set ignorecase smartcase
set number
inoremap jk <Esc>l " for Mac's without an ESC key, type jk
nnoremap Y y$ " for consistency with other cap commands (D, C)
set hlsearch " highlight search terms
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
set laststatus=2
set ruler
set wildmenu
set display+=lastline
set encoding=utf-8
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
set formatoptions+=j " Delete comment character when joining commented lines
set autoread " auto reload file if changed outside of vim
" Indenting blocks of text
vnoremap > >gv
vnoremap < <gv
vnoremap <Tab> >gv
vnoremap <S-Tab> <gv
set viminfo^=!
set sessionoptions-=options
" Allow color schemes to do bright colors without forcing bold.
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
set t_Co=16
endif
inoremap <C-U> <C-G>u<C-U>
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')
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'tpope/vim-commentary' " smarter commenting with gc
call plug#end()
colo seoul256
" vim:set ft=vim et sw=2:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment