Live data from Hacker News

Love Your Terminal

blog.andrewhays.net

51–60 of 137 posts

Re: Love Your Terminal

#51
post #26

Earlier quoted context omitted.

> using only tmux to manage them is painful and ugly: How is using tmux to manage them is painful?

If say I have 2 topics with 3 tabs each, and I want to switch to different topic, I need to move to the 4th tab either by switching tab few times, or knowing the index of the tab to get a faster shortcut. Both, in my opinion, are not simple. If I combine tmux with urxvt, I can have 3 tmux tabs in a urxvt tab, and another 3 tmux tabs in second urxvt tab, and I can switch context just by pressit shift+left/right, I can…

> If I combine tmux with urxvt, I can have 3 tmux tabs in a urxvt tab, and another 3 tmux tabs in second urxvt tab, and I can switch context just by pressit shift+left/right, I can also easily realign context with ctrl+left/right.

I see what you mean. Generally I open a new urxvt/terminator for a new grouping. A rails project is in its own terminal, a django project in another.

> I need to move to the 4th tab either by switching tab few times, or knowing the index of the tab to get a faster shortcut. Both, in my opinion, are not simple.

I have this in my conf:

unbind '"' bind '"' choose-window

I generally have more than 10 tmux windows open. Either I know which index is which(rails project - 0 is vim, 1 is server, 2 is console, 3 is dbconsole, 4 is tail logs, 5 is for running tests...), or I select the windows. Switching tabs few times isn't an ideal way to switch to the desired window.

> which is why I combined it with urxvt.

urxvt has tabs? Mine doesn't. Anyway I have moved to terminator. I find it easier to configure(the pains I took to configure urxvt for copy-paste), performant and standard compliant.

Re: Love Your Terminal

#53
post #47

Earlier quoted context omitted.

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.

> Its not so much about others as I don't want to spend 3 hours setting up e very machine I touch,

Most of the configurations just need to be copied. Just copy your .vim folder and you are setup with everything. Copy your .screenrc and that's that. I sync my dotfiles and then run a small script to set symlinks. That hardly takes 2 minutes.

Re: Love Your Terminal

#54
post #43
post #23

Earlier quoted context omitted.

> 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.

> You don't do much work in large corporations I guess.

I used to work for one. I still do but now I use my own laptop. But that's not the point. The point is if you have a machine, you don't need special privileges to write to your own home directory. If your org stops you from pulling things from the internet, well, that's a different story.

Re: Love Your Terminal

#55
post #42
post #40

Earlier quoted context omitted.

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.

the history size becomes a bit smaller if you add: export HISTCONTROL="ignoredups"

Re: Love Your Terminal

#56
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…

> 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 point of configuring your prompt is it has to be easy for you to read. Whether someone else finds it readable or not is a non issue. Though not as verbose as Steve Losh's, I use a similar prompt which looks like this:

    rahul@mean-machine: ~/musings (git::master)
    ± $
There is nothing in that prompt which I would remove. I login on different hosts with different usernames(rahul@mean-machine); working directory is obvious; I use git, svn, hg and switch branches a lot(git::master).

Of course why do I need rahul@mean-machine - I can run 'who' and 'hostname', why do I need working directory - it's not like 'pwd' hasn't been invented yet; why would I need the branch name - 'git branch' is where it is at. But "if there is this painful long way you can do it, why would you do it the easy way" doesn't make sense to me.

> These days, I even turn off ls's colorizing half the time;

I am curious. What purpose that solves? Colorizing it helps me differentiate directories, files, executables, broken links.

> then again, I always thought wibbley-wobbley 3d windows with glowing buttons were a little silly compared to, say, FVWM or i3.

I don't think 'ls --color=auto' is comparable to woobly window.

Re: Love Your Terminal

#57
Nice guide.

For those on Windows, just move to Powershell if you are still using the plain old terminal.

Sure it can be a bit verbose, but it is surely way better, specially for the cases when doing Windows specific projects.

Re: Love Your Terminal

#58

Yet another article proclaiming bash as garbage and zsh as the best thing since sliced bread.

Meh. I use bash on my laptop and zsh on my VM, and barely notice a difference between the two other than my different prompt. That tells me I'm not getting the most out of it, but it also tells me that the out-of-the-box improvements are pretty minimal. Given how many machines I need to attempt to keep my customizations in sync across (git is barely an option, let alone something like dropbox - this is inside a PCI Level 1 environment), stuff that requires a ton of plugins to really be useful is typically more trouble than its worth. Simply managing my SSH keys is bad enough.

Re: Love Your Terminal

#60
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.

+1 for this. I tend to leave everything as vanilla as possible. My .vimrc has 3 lines, .profile pulls in a local JDK and that is about it.
Post reply on HN