Add some plugins and vimrc tweaks
This commit is contained in:
parent
4e3964715c
commit
189952bd57
|
@ -46,4 +46,4 @@
|
||||||
[core]
|
[core]
|
||||||
editor = /usr/bin/vim
|
editor = /usr/bin/vim
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = tracking
|
||||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -13,3 +13,9 @@
|
||||||
[submodule ".vim/bundle/vim-monokai"]
|
[submodule ".vim/bundle/vim-monokai"]
|
||||||
path = .vim/bundle/vim-monokai
|
path = .vim/bundle/vim-monokai
|
||||||
url = git://github.com/sickill/vim-monokai.git
|
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
1
.vim/bundle/ag
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit f0134343434bc30a77d3ad2ca19d7e2f0a137461
|
1
.vim/bundle/vim-obsession
Submodule
1
.vim/bundle/vim-obsession
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d342229cc1fa5ed442179269b8358b4c42b52300
|
21
.vimrc
21
.vimrc
|
@ -20,17 +20,13 @@ map <leader>fl :CtrlP lib<cr>
|
||||||
map <leader>fp :CtrlP vendor/plugins<cr>
|
map <leader>fp :CtrlP vendor/plugins<cr>
|
||||||
map <leader>fs :CtrlP spec<cr>
|
map <leader>fs :CtrlP spec<cr>
|
||||||
map <leader>ft :CtrlP test<cr>
|
map <leader>ft :CtrlP test<cr>
|
||||||
"let g:ctrlp_prompt_mappings = {
|
|
||||||
" \ 'AcceptSelection("e")': ['<c-t>'],
|
|
||||||
" \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
|
|
||||||
" \ }
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" BASIC EDITING CONFIGURATION
|
" BASIC EDITING CONFIGURATION
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
set nocompatible
|
set nocompatible
|
||||||
" allow unsaved background buffers and remember marks/undo for them
|
" allow unsaved background buffers and remember marks/undo for them
|
||||||
set hidden
|
set hidden
|
||||||
" remember more commands and search history
|
|
||||||
set history=10000
|
set history=10000
|
||||||
set expandtab
|
set expandtab
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
|
@ -40,6 +36,7 @@ set autoindent
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set showmatch
|
set showmatch
|
||||||
set incsearch
|
set incsearch
|
||||||
|
set dictionary+=/usr/share/dict/words
|
||||||
set number
|
set number
|
||||||
set hlsearch
|
set hlsearch
|
||||||
" make searches case-sensitive only if they contain upper-case characters
|
" 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>
|
" insert a hash rocket with <c-l>
|
||||||
imap <c-l> <space>=><space>
|
imap <c-l> <space>=><space>
|
||||||
|
|
||||||
" set esc to <c-c>
|
" Mapping ESC in insert mode and command mode to double i
|
||||||
imap <c-c> <esc>
|
imap ii <C-[>
|
||||||
|
cmap ii <C-[>
|
||||||
|
|
||||||
" suspend process
|
" suspend process
|
||||||
nmap <leader>z <c-z>
|
nmap <leader>z <c-z>
|
||||||
|
@ -137,6 +135,11 @@ map <c-j> <c-w><Down>
|
||||||
map <c-l> <c-w><Right>
|
map <c-l> <c-w><Right>
|
||||||
map <c-h> <c-w><Left>
|
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>
|
map <leader>gg :topleft 100 :split Gemfile<cr>
|
||||||
|
|
||||||
" Clear the search buffer (highlighting) when hitting return
|
" Clear the search buffer (highlighting) when hitting return
|
||||||
|
@ -180,12 +183,12 @@ endfunction
|
||||||
map <leader>n :call RenameFile()<cr>
|
map <leader>n :call RenameFile()<cr>
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" GREP SEARCH
|
" GREP SEARCH
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
function! Search()
|
function! Search()
|
||||||
let term = input('Grep search term: ')
|
let term = input('Grep search term: ')
|
||||||
if term != ''
|
if term != ''
|
||||||
exec '!grep "' . term . '" *'
|
exec 'Ag "' . term . '"'
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
map <leader>s :call Search()<cr>
|
map <leader>s :call Search()<cr>
|
||||||
|
|
6
scripts/tmux-rails-template.sh
Executable file
6
scripts/tmux-rails-template.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user