Skip to content

Instantly share code, notes, and snippets.

@chadjemmett
Created April 24, 2013 18:54
Show Gist options
  • Save chadjemmett/5454585 to your computer and use it in GitHub Desktop.
Save chadjemmett/5454585 to your computer and use it in GitHub Desktop.
My simple vim settings.
" Configuration file for vim
set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
set backspace=2 " more powerful backspacing
set ai " auto indenting
set smartindent " smart indents after something?
set history=100 " keep 100 lines of history
set ruler " show cursor position
syntax on " syntax highlighting on
set number " shows line numbers
set wrap " does not break up words between lines
set linebreak " Not sure what this does.
set nolist " Not sure what this does, either.
set textwidth=0
set wrapmargin=0
set title "title in the status bar
set laststatus=2
set hidden "remember undo
imap jj <Esc>
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment