Live data from Hacker News

Love Your Terminal

blog.andrewhays.net

41–50 of 137 posts

Re: Love Your Terminal

#41
post #4
post #2

use tmux for multiple screens and ditch that xorg garbage.

Calling Xorg garbage is naive. Even if you only use terminals, and you have to have a framebuffer that supports that native resolution of your screen, you'll find that Xorg is nearly always more performant. If you have issues with X11's security model that's a different story, I'd suggest trying http://wayland.freedesktop.org/

Using tmux in an X terminal emulator really gets you the best of all worlds. Good mouse support, performant as you mention, and if X really starts to give you hassle for some reason you can always seamlessly continue working in a VT or with putty if you really want to.

Re: Love Your Terminal

#42
post #40
post #38

"While $HISTORY is great, it only retails a certain amount of data." Unless you have HISTSIZE=100000000; SAVEHIST=100000000 or some such nonsense ( -hides- ). Using Ctrl-R for history doesn't seem to be slowed down at all by my huge histfile. There are privacy implications if you're hacked/subpoenaed, but it's hella convenient.

Mine is set _somewhat_ ridiculously large. Just not that large. And it seems like it just gets to be obscene at some point.

Every few months I wipe out all of the `ls`, `clear`, `cd` and similar entries from my history file. Usually knocks the size down by a decent double-digit percentage.

Re: Love Your Terminal

#43
post #23
post #14

Earlier quoted context omitted.

That's actually why I stopped tweaking things to hell and back, losing my config's was too painful. I usually just go for basic colour tweaks these days. It also makes me more portable and productive when I am using a new or someone else's machine.

> losing my config's was too painful. How do you lose your configs? Store them in github/dropbox and sync. > It also makes me more portable and productive when I am using a new or someone else's machine. With dedicated work and personal laptops, using a new or someone else's machine isn't a commonly occurring event. I would rather optimize for what I have 99% of the time.

Being lazy usually. Also a mixture of devices and machines long before dropbox. So I became used to the defaults before there was a good solution to sync.

You don't do much work in large corporations I guess. When issued equipment and not having to much control you find it easier to just adapt, which is what I did.

Re: Love Your Terminal

#44
post #9

Cool guide. For beginners I'd also suggest restraint with your dotfiles. It's easy to rush into installing oh-my-zsh and using vim with every plugin you can find, but I found that made for a really confusing learning experience, especially if your config ever breaks.

I went from Vim and shell beginner a couple of years ago to a serious user, and built up a nice set of dotfiles along the way.

Janus and oh-my-zsh were big for me, but I never actually installed either one.

Instead, those were my Vim and Zsh department stores.

I'd get the itch to try something new, so I'd "go shopping" at those projects, find something new to pull into my config, and I'd learn to use that plugin or make sure I knew what that shell option was now doing for me.

Then, eventually, I'd get the itch and go shopping again.

Over time, I built up my dotfiles. As I learned, I naturally found myself ditching some of the plugins I pulled in along the way, and modifying or replacing some of the shell config with my own creation. But those projects we're great sources of some early "wins".

Re: Love Your Terminal

#45
post #24
post #14

Earlier quoted context omitted.

That's actually why I stopped tweaking things to hell and back, losing my config's was too painful. I usually just go for basic colour tweaks these days. It also makes me more portable and productive when I am using a new or someone else's machine.

I used to take this approach. One day I found I had no choice but to remap CapsLock as a second Ctrl key because my little finger was in constant agony otherwise. I've never had a second's trouble from the finger since then, but you should see me try to type on other peoples' computers now. I TEND TO WRITE IN ALL-CAPS A LOT BY ACCIDENT! So for me there's no longer much point in caring about portability, and I have al…

Actually that's the only config that usually comes with me. I too suffered emacs pinkie for a while before doing this.

Re: Love Your Terminal

#46
post #32

prezto [1] is a nice alternative to oh-my-zsh. I find it to be faster and it's more modular. [1] - https://github.com/sorin-ionescu/prezto

Is it working properly now? Last time I've tried it I had to go back to oh-my-zsh because prezto screwed my terminal.

By the way, one of these days debugging the slow startup time of oh-my-zsh I found the culprit, virtualenvwrapper. Again I didn't have the time to good deep into that, so I just edited out that line from my .zshrc.

Re: Love Your Terminal

#47
post #14

Earlier quoted context omitted.

That's actually why I stopped tweaking things to hell and back, losing my config's was too painful. I usually just go for basic colour tweaks these days. It also makes me more portable and productive when I am using a new or someone else's machine.

I used to be all about portability, too. Worse, I was worried that other people needed to be able to work on my computer. So no Vim or Emacs, and always keep things simple. You know what? I don't care any more. My computer is my computer. It does not need to work for other people and I don't need to work on other people's computers much. My Emacs loads many plugins, my Visual Studio is using ViEmu, I replaced my Find…

Its not so much about others as I don't want to spend 3 hours setting up e very machine I touch, ie servers, borrowed machine etc.... I'm just as productive now (after a month of adjustment) but without the setup time.

Re: Love Your Terminal

#48
post #27

If you're using git, I suggest fixing up your prompts so it doesn't display the sign for Mercury when in a git repo. So much junk in a prompt... I clicked on the link to Steve Losh's page and had a heck of a time figuring out what commands he had actually typed. The bash defaults are pretty reasonable: show your working directory, maybe your username, and a $ to end the prompt. If you're root, you get a # instead. It…

A friend of mine has an extremely simple prompt. It just shows as $ or # (for root) and has a single field before that - the exit status of the previous command.

Re: Love Your Terminal

#49
post #38

"While $HISTORY is great, it only retails a certain amount of data." Unless you have HISTSIZE=100000000; SAVEHIST=100000000 or some such nonsense ( -hides- ). Using Ctrl-R for history doesn't seem to be slowed down at all by my huge histfile. There are privacy implications if you're hacked/subpoenaed, but it's hella convenient.

You're probably aware of it, but anyway... Put

    HISTCONTROL='ignoreboth:erasedups'
In your .bashrc - now duplicate commands (two consecutive commands that were the same) are not included in HISTFILE, and also if you type " some-sensitive-command username password host" (note the extra space at the beginning), they too won't be include in HISTFILE.

http://serverfault.com/q/48769

http://serverfault.com/q/241154

Re: Love Your Terminal

#50
I also spend most of my time in the terminal, but actually quit little in the shell.

Most of my time I'm in Vim, editing code, so most of the configuration is there (though I keep it down to ~ 50 lines), minor tweaks now and then.

my vimrc: http://ubuntuone.com/4wmrwsU64KEgj9S0zEH3Ct

My latest configuration add-on is syncing my config files when they change. I just do a hardlink (same inode) to my Ubuntu One folder (on system setup). Now if I change a configuration, it get's synced to my all my other devices when they are next online.

I found that quite useful. Syncing vimrc, gitconfig, vimprojects and some other. Basically only use my machines as cache. With this I can get up to be productive with a new installation very quickly and work with several machines without configuration miss-match headache.

For sources I use git push to a remote server (+ U1 for convenience, but it's inconsistent while syncing multiple files, so bad for push target).

Post reply on HN