Skip to content

Instantly share code, notes, and snippets.

@thijzert
Created February 29, 2012 21:21
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 thijzert/1944496 to your computer and use it in GitHub Desktop.
Save thijzert/1944496 to your computer and use it in GitHub Desktop.
My vimrc
" This is my personal .vimrc file.
"
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
if has("syntax")
syntax on
endif
" I'm using a dark background within the editing area
set background=dark
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
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)
set tabstop=3
set shiftwidth=3
set softtabstop=3
set noexpandtab
if has("autocmd")
" Enable file type detection.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
endif
" Map previous/next tab to F7/F8
map <F7> <ESC>:tabp<CR>
map <F8> <ESC>:tabn<CR>
" Search for project-specific vimrc
if filereadable("../../../../../../project.vim")
source ../../../../../../project.vim
endif
if filereadable("../../../../../project.vim")
source ../../../../../project.vim
endif
if filereadable("../../../../project.vim")
source ../../../../project.vim
endif
if filereadable("../../../project.vim")
source ../../../project.vim
endif
if filereadable("../../project.vim")
source ../../project.vim
endif
if filereadable("../project.vim")
source ../project.vim
endif
if filereadable("./project.vim")
source ./project.vim
endif
" If the projectrc is more than 6 levels below, one might want to reconsider
" the project's file structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment