Created
March 17, 2019 17:03
-
-
Save scottstanfield/e472755147e86ec68cae8e553ce2626b to your computer and use it in GitHub Desktop.
minimal .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
" 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