Created
April 7, 2011 21:50
-
-
Save khamer/908823 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "" _ Kevin Hamer This is my .vimrc file. I primarily use GVIM, | |
| "" /_/ _____ kevin@imarc.net so you should expect it to have that kind of | |
| "" _ / / ___ __ __ style and settings. Hopefully you'll find | |
| "" / / / / / / / , / / _/ / _/ something useful in this file to use. | |
| "" /_/ /_/_/_/ /_/_/ /_/ /__/ | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| """ PLUGINS | |
| "" Color Sampler Pack | |
| "" Just a big pack with lots of colorschemes. I like colorschemes. | |
| "" From http://www.vim.org/scripts/script.php?script_id=625 | |
| "" camelcasemotion | |
| "" Not really necessary, but nice for CamelCase and underscore_notation. | |
| "" From http://www.vim.org/scripts/script.php?script_id=1905 | |
| "" FuzzyFinder | |
| "" Faster way to open files, buffers, tags. Like Command-T in TextMate. | |
| "" From http://www.vim.org/scripts/script.php?script_id=1984 | |
| "" L9 | |
| "" Library, dependency of FuzzyFinder. | |
| "" From http://www.vim.org/scripts/script.php?script_id=3252 | |
| "" SuperTab continued | |
| "" Let's you use tab to complete. | |
| "" From http://www.vim.org/scripts/script.php?script_id=1643 | |
| "" ZenCoding | |
| "" allows you to use zen-coding abbreviations to write HTML faster. | |
| "" From http://www.vim.org/scripts/script.php?script_id=2981 | |
| """" BASIC SETTINGS | |
| "" VIM's compatible mode is for people who learned on old vi and are afraid of | |
| "" change. We aren't. | |
| set nocompatible | |
| "" When entering insert mode, allow the backspace key to remove indenting, end | |
| "" of lines, and text before the place you entered insert mode. Yes, you want | |
| "" this. | |
| set backspace=indent,eol,start | |
| "" Autosave every 50 characters. | |
| set updatecount=50 | |
| """" TEXT SETTINGS | |
| "" Set the default tabwidth to 4; also, have tabs inserted automatically have a | |
| "" width of 4. | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| "" There are three main modes for indentation: cindent, autoindent, and | |
| "" smartindent. I find the last to be the most useful. | |
| set smartindent | |
| """" SEARCH SETTINGS | |
| "" Smartcase is a nice search setting, which makes case only matter if it | |
| "" includes any capitals. Need to set ignorecase first (I think.) | |
| set ignorecase | |
| set smartcase | |
| "" Make search incremental and highlight matches. | |
| set incsearch | |
| set hlsearch | |
| "" This keybinding allows you to hit space in normal mode to turn off | |
| "" highlighting. | |
| nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR> | |
| """" GVIM/UI SETTINGS | |
| "" Allow VIM to set the title of the terminal or window. | |
| set title | |
| "" Turn on line numbering. | |
| set number | |
| "" Disable the toolbar and the menubar. | |
| set guioptions-=T | |
| set guioptions-=m | |
| "" wildmode and wildmenu configure your completion behavior. My settings | |
| "" complete the longest common string and throw up the menu. | |
| set wildmode=longest:full | |
| set wildmenu | |
| "" I don't like it when my cursor is on the edge of the screen; this makes sure | |
| "" I have at least 3 lines above/below. | |
| set scrolloff=3 | |
| """" KEYBINDINGS AND FUNCTIONS | |
| "" These are simple, and protect yourself from some common typos. | |
| command -nargs=0 W w | |
| command -nargs=0 Q q | |
| command -nargs=0 WQ x | |
| command -nargs=0 Wq x | |
| "" This allows the use of ctrl-h and ctrl-l on the VIM command line as arrows. | |
| cmap <C-h> <Left> | |
| cmap <C-j> <Down> | |
| cmap <C-k> <Up> | |
| cmap <C-l> <Right> | |
| "" This allows the use of ctrl-hjkl in insert mode as arrows. | |
| imap <C-h> <Left> | |
| imap <C-j> <Down> | |
| imap <C-k> <Up> | |
| imap <C-l> <Right> | |
| "" I use panes constantly, and so I wanted a little faster access to switching | |
| "" panes. | |
| nmap <C-h> <C-w>h | |
| nmap <C-j> <C-w>j | |
| nmap <C-k> <C-w>k | |
| nmap <C-l> <C-w>l | |
| nmap <C-x> <C-w>x | |
| "" This is very unVIM of me, but this allows the Firefox-style ctrl-pageup/down | |
| "" hotkeys to switch tabs in VIM too. | |
| map <C-PageUp> :tabp<CR> | |
| map <C-PageDown> :tabn<CR> | |
| """" PLUGINS AND SCRIPTS | |
| "" FuzzyFinder is a wonderful thing. | |
| nmap <F1> :FufCoverageFile<CR> | |
| nmap <F2> :FufBuffer<CR> | |
| nmap <F3> :FufTag<CR> | |
| nmap <F5> :FufRenewCache<CR> | |
| "" We use svn; these are some maps to make use of the command line client from | |
| "" within VIM. | |
| nmap ,s :!svn | |
| nmap ,i :!svn info %<CR> | |
| nmap ,t :!svn st %:h<CR> | |
| "" ack-grep is a great version of grep. Let's make it easy to use. | |
| command -nargs=1 Ack echo system("ack-grep --nocolor <args>") | |
| """" COLORS | |
| "" Enable syntax highlighting, of course. | |
| syntax enable | |
| "" I'm pretty fickle about colorschemes, but I figured I'd include this one | |
| "" in here. | |
| colorscheme darkspectrum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment