Skip to content

Instantly share code, notes, and snippets.

@bitprophet
Created February 22, 2009 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bitprophet/68244 to your computer and use it in GitHub Desktop.
Save bitprophet/68244 to your computer and use it in GitHub Desktop.
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
" Uncomment the following to have Vim load indentation rules according to the
" detected filetype. Per default Debian Vim only load filetype specific
" plugins.
if has("autocmd")
filetype indent on
endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showmatch " Show matching brackets.
set incsearch " Incremental search
set ignorecase
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes) in terminals
" ## jforcier tweaks ##
" Basic options
set autoindent
set smarttab
set preserveindent
set ruler
set showcmd
set expandtab
set formatoptions=c " overridden to 't' for some files
set textwidth=80
set lbr
set foldmethod=indent
set nofoldenable " Folding off by default on file open
set shellcmdflag=-lc
colorscheme evening
set modeline
set modelines=5
set laststatus=2
set scrolloff=3
set matchtime=2
set nomore
set wildmenu
set wildmode=list:longest
set swb=useopen,usetab
nmap <CR> o<ESC>
" Ruby
autocmd FileType ruby setlocal tabstop=2 softtabstop=2 shiftwidth=2 foldmethod=syntax
" Markdown
autocmd FileType mkd setlocal ai formatoptions=tcroqn2 comments=n:>
" YAML
autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2
" Python / defaults
set tabstop=4
set softtabstop=4
set shiftwidth=4
" Taken from http://dot.kde.org/1035902091/1035955663/1035985451/1036004952/1036014424/1036342967/
" Up, Down, Home and End keys in normal and insert mode
map <up> gk
imap <up> <C-o>gk
map <down> gj
imap <down> <C-o>gj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment