Skip to content

Instantly share code, notes, and snippets.

@AndySum
Last active December 22, 2015 06:59
Show Gist options
  • Save AndySum/6435009 to your computer and use it in GitHub Desktop.
Save AndySum/6435009 to your computer and use it in GitHub Desktop.
my .vimrc
" Use spaces instead of tabs
set expandtab
"show line numbers
set nu
:highlight LineNr ctermfg=grey
"Be smart when using tabs
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
set background=dark
syntax enable
set history=700 "remember 700 lines of history
set ruler
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
"set whichwrap+=<,>,h,l
" Remap VIM 0 to first non-blank character
map 0 ^
" bind CTRL-S Save - requires passthrough in terminal
" type in terminal to activate:
" stty -ixon -ixoff
noremap <silent> <C-S> :update<CR>
vnoremap <silent> <C-S> <C-C>:update<CR>
inoremap <silent> <C-S> <C-O>:update<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment