Live data from Hacker News

Ask HN: What are your favourite programming shortcuts

news.ycombinator.com

1–10 of 20 posts

Re: Ask HN: What are your favourite programming shortcuts

#2
Ctrl+[ - jump to matching paren./brace/bracket

Ctrl+w - scroll up one line

Ctrl+z - scroll down one line

These are the mappings I have set in Joe on my system, the Ctrl+w/z is originally from Wordstar, although I first encountered that mapping in Turbo Pascal 4.

Re: Ask HN: What are your favourite programming shortcuts

#5
I've recently discovered `git switch -` and `git merge -`. It switches to the previous branch you were on or merges the previous branch you were own.

No need to know the name.

So if I need to pull updates on the previous branch I was on and merge them into my current branch, I can just:

    git switch -
    git pull
    git switch -
    git merge -

Re: Ask HN: What are your favourite programming shortcuts

#7
post #5

I've recently discovered `git switch -` and `git merge -`. It switches to the previous branch you were on or merges the previous branch you were own. No need to know the name. So if I need to pull updates on the previous branch I was on and merge them into my current branch, I can just: git switch - git pull git switch - git merge -

For those who may not know, `cd -` brings you to the previous directory.
Post reply on HN