aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorMatt Singleton <matthew.j.singleton@gmail.com>2010-03-31 22:12:05 -0400
committerMatt Singleton <matthew.j.singleton@gmail.com>2010-03-31 22:12:05 -0400
commit3397e42d31f9ffa5ed8a44660a7cba38a9578b04 (patch)
tree90c1db0304d83bafb456b9a77f9367e5e750b79b /vimrc
parentcf9973dcfff99a29b6db1bbf2ce7dfa257926525 (diff)
adding config files
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc62
1 files changed, 62 insertions, 0 deletions
diff --git a/vimrc b/vimrc
new file mode 100644
index 0000000..fac1e9b
--- /dev/null
+++ b/vimrc
@@ -0,0 +1,62 @@
+" .vimrc
+
+"
+" behavior
+"
+
+set nocompatible " use vim, not vi settings
+set wildmenu " command line tab completion menu
+set ruler " show the cursor position all the time
+set showcmd " display incomplete commands
+set incsearch " do incremental searching
+set ignorecase " ignore case in search
+set smartcase " respect case in search if uppercase is used
+set nowrap " do not wrap lines
+set backspace=indent,eol,start " backspace over all stuff
+
+"
+" formatting
+"
+
+set autoindent
+set tabstop=4
+set softtabstop=4
+set shiftwidth=4
+set expandtab
+set smarttab
+
+"
+" filetype-specific
+"
+
+if has("autocmd")
+ filetype plugin indent on
+
+ au!
+ au FileType text setlocal textwidth=78
+ au FileType html setlocal ts=2 sw=2 sts=2 expandtab
+ au FileType ruby setlocal ts=2 sw=2 sts=2 expandtab
+
+ " php files
+ au BufRead,BufNewFile *.module setlocal filetype=php
+ au BufRead,BufNewFile *.inc setlocal filetype=php
+ au BufRead,BufNewFile *.install setlocal filetype=php
+
+ " html templates
+ au BufRead,BufNewFile *.mako setlocal filetype=html
+
+ " When editing a file, always jump to the last known cursor position.
+ " Don't do it when the position is invalid or when inside an event handler
+ au BufReadPost *
+ \ if line("'\"") > 0 && line("'\"") <= line("$") |
+ \ exe "normal g`\"" |
+ \ endif
+endif
+
+"
+" visual
+"
+
+color desert
+syntax on
+set hlsearch