diff --git a/git.md b/git.md index 424f8228f..ccdcb30b8 100644 --- a/git.md +++ b/git.md @@ -100,28 +100,21 @@ Misc ## Bisect + git bisect start HEAD HEAD~6 + git bisect run npm test + git checkout refs/bisect/bad # this is where it screwed up + git bisect reset + +### Manual bisection + git bisect start - git bisect bad # current version is bad + git bisect good # current version is good git checkout HEAD~8 npm test # see if it's good - git bisect good # current version is good + git bisect bad # current version is bad - git bisect run npm test - - git bisect reset # abort - -### Quicker - - git bisect start - git bisect bad # mark commit as bad - git checkout HEAD~10 - git bisect good # mark commit as good - git bisect reset # stop - git bisect start HEAD HEAD~10 # same as bad HEAD, good HEAD~10 - - git bisect run make - git bisect reset + git bisect reset # abort ## Searching diff --git a/travis-gh-pages.md b/travis-gh-pages.md index cb602517c..9fe17e09f 100644 --- a/travis-gh-pages.md +++ b/travis-gh-pages.md @@ -12,7 +12,7 @@ Use https://github.com/settings/tokens/new ```sh # via ruby gem install travis -travis encrypt -r user/repo GH_TOKEN=[the token here] +travis encrypt -r user/repo GITHUB_TOKEN=[the token here] ``` ### Make it run the deploy script on deploy @@ -23,7 +23,7 @@ script: - bash ./scripts/deploy-to-gh-pages.sh env: global: - - GH_REF: "github.com/user/repo.git" + - GITHUB_REPO: "user/repo" - secure: "nlnXJW/imf/w..." # <-- from travis-encrypt ``` @@ -51,7 +51,7 @@ cd public git init git add . git commit -m "Deploy to Github Pages" -git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 +git push --force --quiet "https://${GITHUB_TOKEN}@$github.com/${GITHUB_REPO}.git" master:gh-pages > /dev/null 2>&1 ``` From Ractive, this might be useful in certain cases: diff --git a/vimscript-functions.md b/vimscript-functions.md index 7d9544ac0..050264c25 100644 --- a/vimscript-functions.md +++ b/vimscript-functions.md @@ -148,7 +148,7 @@ Functions ### Strings if a =~ '\s*' - subst(str, '.', 'x', 'g') + substitute(str, '.', 'x', 'g') strpart("abcdef", 3, 2) " == "de" (substring) strpart("abcdef", 3) " == "def" stridx("abcdef", "e") " == "e" @@ -166,6 +166,10 @@ Functions strwidth() " accounts for ambig characters strdisplaywidth() " accounts for tab stops + toupper(str) + tolower(str) + tr('foo', '_-', ' ') + ### Syntax synstack(line('.'),col('.')) " returns many @@ -187,6 +191,17 @@ Functions getreg('*') getregtype('*') " v(char), V(line) (block) +Comparisons +----------- + + if name ==# 'John' " case-sensitive + if name ==? 'John' " case-insensitive + if name == 'John' " depends on :set ignorecase + " also: is#, is?, >=#, >=?, and so on + + if "hello" =~ '.*' + if "hello" !~ '.*' + Executing --------- diff --git a/vimscript-snippets.md b/vimscript-snippets.md index fa0e578ac..884938e35 100644 --- a/vimscript-snippets.md +++ b/vimscript-snippets.md @@ -11,7 +11,7 @@ title: Vimscript snippets ### Call a function in insert mode - inoremap X =script#myfunction() + inoremap X =script#myfunction() inoremap =MyVimFunc()?'':'' ### Checking plugins