Live data from Hacker News

Clear Your Terminal in Style

adammusciano.com

31–40 of 133 posts

Re: Clear Your Terminal in Style

#31
post #3
post #2

It may not be stylish, but I was very happy when I realised that CTRL+L will clear the screen, decent speed up if you're doing a load of demos and want the cursor at the top of the terminal

Unfortunately, Emacs uses CTRL+L to scroll the text buffer so that the caret is in the center. This collision means I often clear terminals by accident.

It does a cycle in Emacs, actually. First it centers, then it puts the caret at the bottom, then it puts it an the top (like readline, in a way)

Re: Clear Your Terminal in Style

#32

Earlier quoted context omitted.

I don’t quite understand why. With one hand or two?

Now you have Ctrl on home row, instead of two rows down.

On a standard PC keyboard, I just use my palm to hit Ctrl (part of why I detest keyboards where Left Ctrl is not at the bottom left corner.

Re: Clear Your Terminal in Style

#33
post #17

I’d just settle for macOS’ Terminal.app’s ⌘-K, that resets the terminal, and clears all the screen including scroll back window. Something so basic I have it in muscle memory but I haven’t found the equivalent in Linux terminals.

Also, Terminal.app seems to implement almost as many extensions as XTerm, and does them pretty well.

It's too bad it's so slow though (in terms of throughput, that is; latency is pretty okay).

Re: Clear Your Terminal in Style

#34

Earlier quoted context omitted.

I have mapped capslock to ctrl (esc if used without modifiers) which made ctrl+L extremely comfortable for me.

I don’t quite understand why. With one hand or two?

Some smaller keyboards (including laptops) make the control key small or add an "Fn" key to the bottom-left corner (Apple does this). I tend to hit Ctrl with my left hand, so mapping caps lock to Ctrl makes it more reliable to hit.

Re: Clear Your Terminal in Style

#35
post #22
post #17

I’d just settle for macOS’ Terminal.app’s ⌘-K, that resets the terminal, and clears all the screen including scroll back window. Something so basic I have it in muscle memory but I haven’t found the equivalent in Linux terminals.

A lot of people swear by stuff like iTerm2, but I'm almost a little ashamed to admit that even though I have iTerm configured to my taste, I often still reach for macOS' native terminal. It's not gloriously beautiful or anything (basic Zsh with powerline for the shell), but it just seems to work great without the frills. Little shortcuts that think of stuff like this without any configuration (iTerms is impressively…

The fact that Ternimal.app and iTerm2 use different keyboard shortcuts for clearing scrollback buffer (⌥⌘K vs ⇧⌘K) is a constant frustration of my spotty use of Terminal.app. I would instinctively hit the iTerm2 shortcut, which brings up a connect to server panel or something.

Re: Clear Your Terminal in Style

#36
post #3

Earlier quoted context omitted.

Unfortunately, Emacs uses CTRL+L to scroll the text buffer so that the caret is in the center. This collision means I often clear terminals by accident.

It does a cycle in Emacs, actually. First it centers, then it puts the caret at the bottom, then it puts it an the top (like readline, in a way)

Yes (actually, it's center -> top -> bottom); I just didn't want to make the comment longer. Anyway, in Emacs, it's something I frequently do without thinking.

Re: Clear Your Terminal in Style

#37
post #35
post #22

Earlier quoted context omitted.

A lot of people swear by stuff like iTerm2, but I'm almost a little ashamed to admit that even though I have iTerm configured to my taste, I often still reach for macOS' native terminal. It's not gloriously beautiful or anything (basic Zsh with powerline for the shell), but it just seems to work great without the frills. Little shortcuts that think of stuff like this without any configuration (iTerms is impressively…

The fact that Ternimal.app and iTerm2 use different keyboard shortcuts for clearing scrollback buffer (⌥⌘K vs ⇧⌘K) is a constant frustration of my spotty use of Terminal.app. I would instinctively hit the iTerm2 shortcut, which brings up a connect to server panel or something.

You can use System Preferences (Keyboard -> Shortcuts, “App Shortcuts” in the list) to change any binding in any menu item in any app. In this case you could force both apps to use the same keys for those commands.

Re: Clear Your Terminal in Style

#38
post #18
post #17

I’d just settle for macOS’ Terminal.app’s ⌘-K, that resets the terminal, and clears all the screen including scroll back window. Something so basic I have it in muscle memory but I haven’t found the equivalent in Linux terminals.

It's also super helpful when you want to run one command which spews out a bunch of errors, and then read the first error. Cmd-K, enter, and fling up the the trackpad. I think I'd have to pipe to less if I don't have cmd-K.

Cmd up and down navigates between prompts, so you don’t even have to scroll

Re: Clear Your Terminal in Style

#39
post #17

I’d just settle for macOS’ Terminal.app’s ⌘-K, that resets the terminal, and clears all the screen including scroll back window. Something so basic I have it in muscle memory but I haven’t found the equivalent in Linux terminals.

Konsole has that since forever.

Re: Clear Your Terminal in Style

#40
post #18

Earlier quoted context omitted.

It's also super helpful when you want to run one command which spews out a bunch of errors, and then read the first error. Cmd-K, enter, and fling up the the trackpad. I think I'd have to pipe to less if I don't have cmd-K.

Cmd up and down navigates between prompts, so you don’t even have to scroll

I tried this and it even worked within the sqlite3 session I have open, very nice.
Post reply on HN