Created
June 14, 2019 14:31
-
-
Save kenbellows/b11ae953066b89707da8b3481b417a4d to your computer and use it in GitHub Desktop.
My simple 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
if $SSH_CONNECTION | |
colo torte | |
endif | |
syntax on | |
filetype plugin on | |
" stop trying to be vi; you're vim, goddammit, start acting like it! | |
set nocompatible | |
" show line numbers and don't word wrap by default | |
set nu nowrap | |
" tabs => 2 spaces | |
set ts=2 sts=2 sw=2 expandtab smarttab | |
" indet for me, C-style (since I usually write JavaScript, which is C-style) | |
set autoindent cindent | |
" search as I type, highlight all matches, and ignore case in searches | |
set incsearch hlsearch ignorecase | |
" use a sane behavior for backspacing | |
set backspace=indent,eol,start | |
" use , as the leader character | |
let mapleader="," | |
""" Handy normal-mode shortcuts | |
" I hate using the shift key to end commands | |
nmap ; : | |
" clear current search highlighting | |
nmap <leader>/ :noh<cr> | |
" add a line above/below and return to normal mode | |
nmap <leader>o o<esc> | |
nmap <leader>O O<esc> | |
""" Autocorrect common misspellings | |
iab teh the | |
iab hte the | |
iab oyu you | |
iab verison version | |
iab funciton function | |
iab functoin function | |
""" Statusline | |
set laststatus=2 | |
set statusline=%f%m%r\ %y%h%w%q%=%-32(\ Row:\ %l/%L,\ Col:\ %v%)\ %{strftime('%c',\ getftime(expand('%')))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment