Skip to content

Instantly share code, notes, and snippets.

@dariodaich
Last active January 30, 2017 09:33
Show Gist options
  • Save dariodaich/294449aaeb69d627f2eaed56312c99ac to your computer and use it in GitHub Desktop.
Save dariodaich/294449aaeb69d627f2eaed56312c99ac to your computer and use it in GitHub Desktop.

✌️im

Native features

Autocomplete

Documented in |ins-completion|.

While in Insert mode:

  • ^x^n - for current file
  • ^x^f - for filenames
  • ^x^] - for tags only
  • ^n - for anything specified by the 'complete' option

plugins by Tim Pope

Action Effect Commands
change existing delimiters "lorem ipsum" -> (lorem ipsum) cs")
change delimiters into a tag (lorem ipsum) -> <p>lorem ipsum</p> cs)<p>
switch delimiters <p>lorem ipsum</p> -> [lorem ipsum] cst]
remove delimiters [lorem ipsum] -> lorem ipsum ds]
set delimiters on one word lorem ipsum -> (lorem) ipsum ysiw)
add delimiters with whitespace lorem -> ( lorem ) ysiw(
wrap whole line in delimiters lorem ipsum sit amet -> [lorem ipsum sit amet] yss]
use it in Visual mode <p>lorem ipsum</p> -> <p class="foo"><p>lorem ipsum</p></p> VS<p class="foo">

Use opening bracket to create delimiters with whitespace and closing bracket do create delimiters without whitespace.

Action Command
open Git blame of the current file :Gblame
check Git status :Gstatus
open current file on GitHub (or any host of any upstream repo) :Gbrowse
git grep
run git grep in current working copy :Ggrep
search for ‘term’ in working copy files (excluding untracked files) :Grep [term]
search for ‘term’ in branch 'branchname' :Grep [term] [branchname]
search for ‘term’ in a tagname :Grep [term] [tagname]
search for ‘term’ all ancestral commit messages :Grep --grep=[term]
search for ‘term’ all ancestral commit messages that touch active file :Grep --grep=[term] -- %
git log
check repo history :Glog
open repo commit history :copen
check previous commit/quickfix item [q
check next commit/quickfix item ]q
go to the first commit/quickfix item [Q
go to the last commit/quickfix item ]Q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment