Add some plugins and vimrc tweaks

This commit is contained in:
Michael Campagnaro 2013-04-20 14:00:26 -04:00
parent 4e3964715c
commit 189952bd57
6 changed files with 27 additions and 10 deletions

View File

@ -46,4 +46,4 @@
[core]
editor = /usr/bin/vim
[push]
default = simple
default = tracking

6
.gitmodules vendored
View File

@ -13,3 +13,9 @@
[submodule ".vim/bundle/vim-monokai"]
path = .vim/bundle/vim-monokai
url = git://github.com/sickill/vim-monokai.git
[submodule ".vim/bundle/vim-obsession"]
path = .vim/bundle/vim-obsession
url = git://github.com/tpope/vim-obsession.git
[submodule ".vim/bundle/ag"]
path = .vim/bundle/ag
url = https://github.com/rking/ag.vim

1
.vim/bundle/ag Submodule

@ -0,0 +1 @@
Subproject commit f0134343434bc30a77d3ad2ca19d7e2f0a137461

@ -0,0 +1 @@
Subproject commit d342229cc1fa5ed442179269b8358b4c42b52300

21
.vimrc
View File

@ -20,17 +20,13 @@ map <leader>fl :CtrlP lib<cr>
map <leader>fp :CtrlP vendor/plugins<cr>
map <leader>fs :CtrlP spec<cr>
map <leader>ft :CtrlP test<cr>
"let g:ctrlp_prompt_mappings = {
" \ 'AcceptSelection("e")': ['<c-t>'],
" \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
" \ }
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BASIC EDITING CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
" allow unsaved background buffers and remember marks/undo for them
set hidden
" remember more commands and search history
set history=10000
set expandtab
set tabstop=2
@ -40,6 +36,7 @@ set autoindent
set laststatus=2
set showmatch
set incsearch
set dictionary+=/usr/share/dict/words
set number
set hlsearch
" make searches case-sensitive only if they contain upper-case characters
@ -111,8 +108,9 @@ imap <c-e> end
" insert a hash rocket with <c-l>
imap <c-l> <space>=><space>
" set esc to <c-c>
imap <c-c> <esc>
" Mapping ESC in insert mode and command mode to double i
imap ii <C-[>
cmap ii <C-[>
" suspend process
nmap <leader>z <c-z>
@ -137,6 +135,11 @@ map <c-j> <c-w><Down>
map <c-l> <c-w><Right>
map <c-h> <c-w><Left>
" Window splitting - couldn't figure out how to remap <c-w>v & <c-w>n to <c-m>
" & <c-n>
map <leader>m :vsplit<cr>
map <leader>mm :split<cr>
map <leader>gg :topleft 100 :split Gemfile<cr>
" Clear the search buffer (highlighting) when hitting return
@ -180,12 +183,12 @@ endfunction
map <leader>n :call RenameFile()<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GREP SEARCH
" GREP SEARCH
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! Search()
let term = input('Grep search term: ')
if term != ''
exec '!grep "' . term . '" *'
exec 'Ag "' . term . '"'
endif
endfunction
map <leader>s :call Search()<cr>

6
scripts/tmux-rails-template.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
tmux new -d -s my-awesome-app
tmux new-window -t my-awesome-app:2 -n 'server' 'bundle exec rails server'
tmux new-window -t my-awesome-app:3 -n 'vim' 'vi'
tmux attach -t my-awesome-app