Skip to content

Instantly share code, notes, and snippets.

@chrismarksus
chrismarksus / vim_commands.md
Created February 7, 2019 20:09
vim command cheat sheet

Cursor movement

* h - move left
* j - move down
* k - move up
* l - move right
* w - jump by start of words (punctuation considered words)
* W - jump by words (spaces separate words)
* e - jump to end of words (punctuation considered words)
  • E - jump to end of words (no punctuation)
@chrismarksus
chrismarksus / build-json-from-git-log.sh
Created February 7, 2019 20:27
build json from git log shell commands
{name:'$R',hash:'%H',commitrelative:'%cr',commitdate:'%cd',subject:'%s'}
{name:"$R",hash:"%H",commitrelative:"%cr",commitdate:"%cd",subject:"%f"}
{$R %H %cr %cd %s}
$R %H %cr %cd %s
echo "{ results: [" && for R in `git branch -r`; do git log -100 ${R} --merges --since='6 months ago' --grep="Merge branch 'master' into" --pretty='{name:"$R",hash:"%H",commitrelative:"%cr",commitdate:"%cd",subject:"%f"},'; done | sed '$s/\,//g'&& echo "]}"
echo "{ results: [" && for R in `git branch -r`; do git log -100 ${R} --merges --since='6 months ago' --grep="Merge branch 'master' into" --pretty='{%n "remote": "$R",%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},'; done | sed '$s/\,//g'&& echo "]}"