parisyee / vim-bootstrap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-bootsrap

Configuration files for vim

Installation

Clone repo:

git clone git@github.com:parisyee/vim-bootstrap.git

using brew + rcm (preferred)

Install brewdler

brew tap Homebrew/brewdler

Install rcm

From within the vim-bootstrap directory

brew brewdle

Install dotfiles:

rcup -d vim-bootstrap -x README.md -x install -x Brewfile

using install script

Run install:

bash vim-bootstrap/install

Updating

Update Repo:

cd <your-vim-bootstrap-location>
git pull

Then just re-run the install steps, as they update as well.

Make your own cuctomizations

Put your project sharable customizations in dotfiles appended with .shared:

  • ~/.vimrc.shared
  • ~/.vimrc.bundles.shared

Put your customizations in dotfiles appended with .local:

  • ~/.gvimrc.local
  • ~/.vimrc.local
  • ~/.vimrc.bundles.local

Credits

Heavy influence from vimified

Vim Command CheatSheet

Rails

,p = promote assignment to let

Discovery

:Ag <search_term> = project pattern search (use Ag, install via brew)
,a = call Ag using the current work under the cursor (or visually selected)
,f = fuzzy file find (via CTRL-P)
,b = fuzzy open buffer find (via CTRL-P)
,F = fuzzy file find after resetign cache
<f5> = while in fuzzy finder, refresh cache

General

<space> = clear search higlighting
,v = veritical split
,h = horizontal split
,o = close all other windows in tab, except current
,n = rename file
,qo = open quickfix
,qc = close quickfix
[<space> = addline above
]<space> = addline below
<tab> = autocomplete (except when prefixed with whitespace)
<tab> = <tab> (only when prefixed with whitespace)
tt = toggle fullscreen mode on
ty = toggle fullscreen mode off
,rv = reload vimrc
,e = open edit command with current path filled in

Visual mode specific

<tab> = add indent level
<shift><tab> = remove indent level

MacVim only

<shift><command>c = copy current file path to clipboard
,C = copy current file + line number path to clipboard
<shift><command><down> = open next quickfix file listing (ie search result)
<shift><command><up> = open previous quickfix file listing (ie search result)

Plugins

Fugative

,g = git blame

Nerd Tree

\ = toggle tree
<shift>\ = toggle tree and focus on current file

Commentary

,/ = toggle comment

regreplop

<ctrl>k = paste over, keep original buffer

Splitjoin

Ss = split a one liner into multiple lines
Sj = join multiple lines into a one liner

Vim Rspec + dispatch

using vim-dispatch Dispatch: this will capture results and display in quickfix

<leader>t = run current spec + line in iTerm
<leader>s = run current spec file in iTerm
<leader>l = run last spec in iTerm

using vim-dispatch Start: this will not capture results

<leader>dt = run current spec + line in iTerm
<leader>ds = run current spec file in iTerm
<leader>dl = run last spec in iTerm

ctags

requires ctags installed recommend use of gem-ctags for ruby

<ctrl>] = find first tag match
<ctrl>\ = find next tag match
,rt = regenerate tags file

text object expansion

+ (multiple times) = expand text object selection
_ (multiple times) = collapse text object selection

About


Languages

Language:Vim Script 98.6%Language:Shell 1.2%Language:Ruby 0.2%