Skip to content

Instantly share code, notes, and snippets.

@dkordik
Forked from roykolak/gist:1025131
Created June 14, 2011 21:00
Show Gist options
  • Save dkordik/1025871 to your computer and use it in GitHub Desktop.
Save dkordik/1025871 to your computer and use it in GitHub Desktop.
VIM config
syntax on
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab
set number
set nofoldenable
set showmatch
set hlsearch
set vb
set smartindent
set nocompatible
set backspace=indent,eol,start
colorscheme elflord
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
filetype off
filetype plugin on
filetype plugin indent on
au BufRead,BufNewFile *.less set filetype=less
" Javascript uses 4 spaces, says Crockford!
autocmd FileType javascript setlocal shiftwidth=4 tabstop=4
" Re-source vimrc automatically
autocmd! BufWritePost .vimrc source %
" clears whitespace
autocmd BufWritePre * :%s/\s\+$//e
"Switch to the next "higher" windows with <C-K>
noremap <C-J> <C-W>j<C-W>_
"Switch to the next "higher" windows with <C-J>
noremap <C-K> <C-W>k<C-W>_
"Hide the highlighted search results with "?"
noremap ? :nohlsearch<CR>
set ignorecase "The case of normal letters is ignored when searching
set smartcase "Override the 'ignorecase' option if the search pattern contains upper
" case characters. Essentially, this makes searches with
" capital letters case-sensitive. If you're going to go
" to all the effort of hitting both <Shift> AND a
" letter, your search tool better take it into
" consideration.
set list "Display unprintable characters, such as
" trailing spaces and tabs (Depends on
" "listchars" settings).
set listchars=tab:>-,trail:. "Strings to use in 'list' mode.
" trail:c Character to show for trailing spaces. When omitted,
" trailing spaces are blank. In this
" case, a trailing "." will be added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment