Skip to content

Instantly share code, notes, and snippets.

@gaveen
Created November 7, 2010 19:28
Show Gist options
  • Save gaveen/666341 to your computer and use it in GitHub Desktop.
Save gaveen/666341 to your computer and use it in GitHub Desktop.
" Set the leader key
let mapleader = ","
" Map w!! to write file with sudo, when forgot to open with sudo.
cmap w!! w !sudo tee % >/dev/null
" Map F1 to Esc. Safe to remove if not desirable.
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
" Display a place holder character for tabs and trailing spaces
set list
set listchars=trail:⋅,nbsp:⋅,tab:▷⋅
" Enable plugins and indentation based on filetype
filetype plugin indent on
" Enable filetype detection
setlocal foldmethod=syntax
setlocal nofoldenable
" Remove highlighting search results
nnoremap <leader><space> :noh <CR>
" Set the keys to turn spell checking on/off
map <F8> <Esc>:setlocal spell spelllang=en_us<CR>
map <F9> <Esc>:setlocal nospell<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment