Skip to content

Commit

Permalink
more love to submodules.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunagw committed Apr 11, 2013
1 parent e87d0b2 commit c22e9a4
Show file tree
Hide file tree
Showing 25 changed files with 162 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.netrwhist
1 change: 0 additions & 1 deletion git_ignore
Expand Up @@ -9,4 +9,3 @@ nbproject
vendor/bundle
.rbx
.DS_Store
bundle
13 changes: 13 additions & 0 deletions gvimrc
@@ -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
1 change: 1 addition & 0 deletions vim/bundle/ctags.vim
Submodule ctags.vim added at a438a4
1 change: 1 addition & 0 deletions vim/bundle/ctrlp.vim
Submodule ctrlp.vim added at 287b9c
1 change: 1 addition & 0 deletions vim/bundle/greplace.vim
Submodule greplace.vim added at 993631
1 change: 1 addition & 0 deletions vim/bundle/html.vim
Submodule html.vim added at dc0dcc
1 change: 1 addition & 0 deletions vim/bundle/rename.vim
Submodule rename.vim added at a3e5a3
1 change: 1 addition & 0 deletions vim/bundle/tComment
Submodule tComment added at 84af41
1 change: 1 addition & 0 deletions vim/bundle/textile.vim
Submodule textile.vim added at 02687a
1 change: 1 addition & 0 deletions vim/bundle/treetop.vim
Submodule treetop.vim added at 9ba73a
1 change: 1 addition & 0 deletions vim/bundle/vim-bundler
Submodule vim-bundler added at 385010
1 change: 1 addition & 0 deletions vim/bundle/vim-coffee-script
Submodule vim-coffee-script added at 089506
1 change: 1 addition & 0 deletions vim/bundle/vim-colors-github
Submodule vim-colors-github added at e5bc56
1 change: 1 addition & 0 deletions vim/bundle/vim-cucumber
Submodule vim-cucumber added at 932aa1
1 change: 1 addition & 0 deletions vim/bundle/vim-endwise
Submodule vim-endwise added at 9f05e4
1 change: 1 addition & 0 deletions vim/bundle/vim-fugitive
Submodule vim-fugitive added at f6d93b
1 change: 1 addition & 0 deletions vim/bundle/vim-haml
Submodule vim-haml added at ce0cfe
1 change: 1 addition & 0 deletions vim/bundle/vim-markdown
Submodule vim-markdown added at ec0abb
1 change: 1 addition & 0 deletions vim/bundle/vim-matchit
Submodule vim-matchit added at 8f8665
1 change: 1 addition & 0 deletions vim/bundle/vim-rails
Submodule vim-rails added at 74f407
1 change: 1 addition & 0 deletions vim/bundle/vim-rspec
Submodule vim-rspec added at 147725
1 change: 1 addition & 0 deletions vim/bundle/vim-surround
Submodule vim-surround added at 02199e
1 change: 1 addition & 0 deletions vim/bundle/vundle
Submodule vundle added at 3dcb0c
149 changes: 127 additions & 22 deletions vimrc
@@ -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

0 comments on commit c22e9a4

Please sign in to comment.