Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
162 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.netrwhist |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ nbproject | |
vendor/bundle | ||
.rbx | ||
.DS_Store | ||
bundle |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
" No audible bell | ||
set vb | ||
|
||
" No toolbar | ||
set guioptions-=T | ||
|
||
" Use console dialogs | ||
set guioptions+=c | ||
|
||
" Local config | ||
if filereadable($HOME . "/.gvimrc.local") | ||
source ~/.gvimrc.local | ||
endif |
Submodule ctags.vim
added at
a438a4
Submodule ctrlp.vim
added at
287b9c
Submodule greplace.vim
added at
993631
Submodule html.vim
added at
dc0dcc
Submodule rename.vim
added at
a3e5a3
Submodule tComment
added at
84af41
Submodule textile.vim
added at
02687a
Submodule treetop.vim
added at
9ba73a
Submodule vim-bundler
added at
385010
Submodule vim-coffee-script
added at
089506
Submodule vim-colors-github
added at
e5bc56
Submodule vim-cucumber
added at
932aa1
Submodule vim-endwise
added at
9f05e4
Submodule vim-fugitive
added at
f6d93b
Submodule vim-haml
added at
ce0cfe
Submodule vim-markdown
added at
ec0abb
Submodule vim-matchit
added at
8f8665
Submodule vim-rails
added at
74f407
Submodule vim-rspec
added at
147725
Submodule vim-surround
added at
02199e
Submodule vundle
added at
3dcb0c
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,140 @@ | ||
" based on https://github.com/gabebw/dotfiles/blob/master/vimrc. | ||
|
||
" Use Vim settings, rather then Vi settings (much better!). | ||
" This must be first, because it changes other options as a side effect. | ||
set nocompatible | ||
set nocompatible " Use Vim settings, rather then Vi settings | ||
set nobackup | ||
set nowritebackup | ||
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287 | ||
set history=50 | ||
set ruler " show the cursor position all the time | ||
set showcmd " display incomplete commands | ||
set incsearch " do incremental searching | ||
set laststatus=2 " Always display the status line | ||
|
||
" Leader | ||
let mapleader=" " | ||
" Switch syntax highlighting on, when the terminal has colors | ||
" Also switch on highlighting the last used search pattern. | ||
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") | ||
syntax on | ||
endif | ||
|
||
" Declare bundles are handled via Vundle | ||
filetype off " required! | ||
set rtp+=~/.vim/bundle/vundle/ | ||
call vundle#rc() | ||
|
||
" Let Vundle manage Vundle | ||
Bundle 'gmarik/vundle' | ||
|
||
" Define bundles via Github repos | ||
Bundle 'croaky/vim-colors-github' | ||
Bundle 'danro/rename.vim' | ||
Bundle 'kchmck/vim-coffee-script' | ||
Bundle 'kien/ctrlp.vim' | ||
Bundle 'nanki/treetop.vim' | ||
Bundle 'thoughtbot/vim-rspec' | ||
Bundle 'timcharper/textile.vim' | ||
Bundle 'tpope/vim-bundler' | ||
Bundle 'tpope/vim-cucumber' | ||
Bundle 'tpope/vim-endwise' | ||
Bundle 'tpope/vim-fugitive' | ||
Bundle 'tpope/vim-haml' | ||
Bundle 'tpope/vim-markdown' | ||
Bundle 'tpope/vim-rails' | ||
Bundle 'tpope/vim-surround' | ||
Bundle 'tsaleh/vim-matchit' | ||
Bundle 'vim-scripts/ctags.vim' | ||
Bundle 'vim-scripts/greplace.vim' | ||
Bundle 'vim-scripts/tComment' | ||
Bundle 'xenoterracide/html.vim' | ||
|
||
filetype plugin indent on | ||
|
||
augroup vimrcEx | ||
au! | ||
|
||
" For all text files set 'textwidth' to 78 characters. | ||
autocmd FileType text setlocal textwidth=78 | ||
|
||
" 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 | ||
" (happens when dropping a file on gvim). | ||
autocmd BufReadPost * | ||
\ if line("'\"") > 0 && line("'\"") <= line("$") | | ||
\ exe "normal g`\"" | | ||
\ endif | ||
augroup END | ||
|
||
" Softtabs, 2 spaces | ||
set tabstop=2 | ||
set shiftwidth=2 | ||
set expandtab | ||
|
||
" Allows % to switch between if/elsif/else/end, open/close XML tags, and | ||
" more. | ||
runtime macros/matchit.vim | ||
" Display extra whitespace | ||
set list listchars=tab:»·,trail:· | ||
|
||
" Use Ag (https://github.com/ggreer/the_silver_searcher) instead of Grep when | ||
" available | ||
if executable("ag") | ||
set grepprg=ag\ --nogroup\ --nocolor | ||
endif | ||
|
||
" Color scheme | ||
colorscheme github | ||
highlight NonText guibg=#060606 | ||
highlight Folded guibg=#0A0A0A guifg=#9090D0 | ||
|
||
" Numbers | ||
set number | ||
set numberwidth=5 | ||
|
||
" Snippets are activated by Shift+Tab | ||
let g:snippetsEmu_key = "<S-Tab>" | ||
|
||
" Tab completion | ||
" will insert tab at beginning of line, | ||
" will use completion if not at beginning | ||
set wildmode=list:longest,list:full | ||
set complete=.,w,t | ||
function! InsertTabWrapper() | ||
let col = col('.') - 1 | ||
if !col || getline('.')[col - 1] !~ '\k' | ||
return "\<tab>" | ||
else | ||
return "\<c-p>" | ||
endif | ||
endfunction | ||
inoremap <Tab> <c-r>=InsertTabWrapper()<cr> | ||
" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing | ||
let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'" | ||
|
||
" Index ctags from any project, including those outside Rails | ||
map <Leader>ct :!ctags -R .<CR> | ||
" Cucumber navigation commands | ||
autocmd User Rails Rnavcommand step features/step_definitions -glob=**/* -suffix=_steps.rb | ||
autocmd User Rails Rnavcommand config config -glob=**/* -suffix=.rb -default=routes | ||
|
||
" Switch between the last two files | ||
nnoremap <leader><leader> <c-^> | ||
" Get off my lawn | ||
nnoremap <Left> :echoe "Use h"<CR> | ||
nnoremap <Right> :echoe "Use l"<CR> | ||
nnoremap <Up> :echoe "Use k"<CR> | ||
nnoremap <Down> :echoe "Use j"<CR> | ||
source ~/.vim/ack.vim | ||
source ~/.vim/vundle.vim | ||
source ~/.vim/options.vim | ||
source ~/.vim/mapping.vim | ||
source ~/.vim/completion.vim | ||
source ~/.vim/tabularizing.vim | ||
source ~/.vim/test_runners.vim | ||
source ~/.vim/rails_shortcuts.vim | ||
source ~/.vim/statusline.vim | ||
source ~/.vim/autocommand.vim | ||
" Treat <li> and <p> tags like the block tags they are | ||
let g:html_indent_tags = 'li\|p' | ||
|
||
let g:ackprg = 'ag --nogroup --nocolor --column' | ||
" Markdown files end in .md | ||
au BufRead,BufNewFile *.md set filetype=markdown | ||
|
||
" Colorscheme | ||
colorscheme jellybeans | ||
" Enable spellchecking for Markdown | ||
au BufRead,BufNewFile *.md setlocal spell | ||
|
||
" Automatically wrap at 80 characters for Markdown | ||
au BufRead,BufNewFile *.md setlocal textwidth=80 | ||
|
||
" Local config | ||
if filereadable($HOME . "/.vimrc.local") | ||
source ~/.vimrc.local | ||
endif |