Skip to content

Instantly share code, notes, and snippets.

@sandal-china
Created November 27, 2011 20:47
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 sandal-china/1398117 to your computer and use it in GitHub Desktop.
Save sandal-china/1398117 to your computer and use it in GitHub Desktop.
set nobackup
set nowritebackup
set noswapfile
set backspace=indent,eol,start
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set autoindent " always set autoindenting on
set shiftwidth=2
set tabstop=2
set expandtab
set tw=80
set nohlsearch
set undodir=~/.vim/undodir
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
map <silent> <C-N> :se invhlsearch<CR>
map <C-Tab> :NERDTreeToggle<CR>
filetype on
filetype indent on
filetype plugin on
syntax on
noremap <F5> :set invpaste paste?<Enter>
set pastetoggle=<F5>
map <C-K> :!ruby %<CR>
map <C-A> :!rake<CR>
map <C-I> :!irb -Ilib --simple-prompt<CR>
noremap <F8> :set wrap linebreak textwidth=0 syntax=off<Enter>
noremap <F7> :set wrap linebreak textwidth=70 syntax=off<Enter>
set nocompatible
set fileencoding=utf8
set fileencodings=usc-born,utf8,prc
set visualbell t_vb=
set number
imap <F6> <ESC>:w!<CR>:!markdown % > %.html && open %.html<CR><CR>a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment