Created
December 16, 2014 22:28
-
-
Save beenhere4hours/33f273e24130a6e92440 to your computer and use it in GitHub Desktop.
vim initialization commands
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
set background=dark | |
syntax on | |
set ruler " show the line number on the bar | |
set more " use more prompt | |
set autoread " watch for file changes | |
set number " line numbers | |
set hidden | |
set noautowrite " don't automagically write on :next | |
set lazyredraw " don't redraw when don't have to | |
set showmode | |
set showcmd | |
set nocompatible " vim, not vi | |
set autoindent smartindent " auto/smart indent | |
set smarttab " tab and backspace are smart | |
set tabstop=2 " 6 spaces | |
set shiftwidth=2 | |
set scrolloff=5 " keep at least 5 lines above/below | |
set sidescrolloff=5 " keep at least 5 lines left/right | |
set history=200 | |
set backspace=indent,eol,start | |
set linebreak | |
set cmdheight=2 " command line two lines high | |
set undolevels=1000 " 1000 undos | |
set updatecount=100 " switch every 100 chars | |
set complete=.,w,b,u,U,t,i,d " do lots of scanning on tab completion | |
set ttyfast " we have a fast terminal | |
set noerrorbells " No error bells please | |
set shell=bash | |
set fileformats=unix | |
set ff=unix | |
filetype on " Enable filetype detection | |
filetype indent on " Enable filetype-specific indenting | |
filetype plugin on " Enable filetype-specific plugins | |
set wildmode=longest:full | |
set wildmenu " menu has tab completion | |
let maplocalleader=',' " all my macros start with , | |
set laststatus=2 " show the status line | |
set nowrap | |
" searching | |
set incsearch " incremental search | |
set ignorecase " search ignoring case | |
set hlsearch " highlight the search | |
set showmatch " show matching bracket | |
set diffopt=filler,iwhite " ignore all whitespace and sync | |
" highlight characters after 120 | |
" \%> match after column number 120, the v is magic, .\+ match one or more of any character | |
":match ErrorMsg /\%>120v.\+/ | |
" mark tabs that are not at the beginning of line as an error | |
" [^ begin a group of chars not to be matched, \t tab char, ] end of char | |
" group, \zs place the matching at beginning of line ignoring white space, | |
" \t\+ one or more tabs in a row | |
":match ErrorMsg /[^\t]\zs\t\+/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment