Live data from Hacker News

Using tmux properly

danielallendeutsch.com

191–200 of 218 posts

Re: Using tmux properly

#191
post #125

Earlier quoted context omitted.

> Littering config files across the datacenter just isn't an option. Er, what about an LDAP server for user profiles and an NFS server for home directories, like the university timesharing clusters of olde? Any box you'd log into would have "your config files" (in fact, your whole home directory) on it. Or, if the LDAP part is a hassle, be a hipster and pull all the 'user profile' info from GitHub ( https://github.co…

NFS is a nightmare, for many reasons. But there are similar solutions such as `pam_mkhomedir` which can be coerced into fetching dotfiles when a user logs in, etc.

Could you please share some of those reasons? I ask because I'm doing this... hasn't been a problem yet, but I'd rather know about issues now than later!

Re: Using tmux properly

#192
post #46
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

I 120% agree. I once lost my emacs dotfile and suddenly i was almost unable to use Emacs on my own pc. Since then, i've decided to apply as little customisation as possible to software I use, and read the documentation and learn the standard configuration instead. For some reasons nowadays it's trendy to add colors, bells and whistles to things but I've found out that learning the standard/default configuration lets…

Well with Emacs it's more than customisation for me. I write my scripts and programs in Elisp, and if I don't do that, there's no sense in using Emacs for me, as I use it as my "computing environment". Plain emacs might be hard to use for a customising user, but I don't value that sort of use anyways.

Re: Using tmux properly

#193
post #176
post #46

Earlier quoted context omitted.

I 120% agree. I once lost my emacs dotfile and suddenly i was almost unable to use Emacs on my own pc. Since then, i've decided to apply as little customisation as possible to software I use, and read the documentation and learn the standard configuration instead. For some reasons nowadays it's trendy to add colors, bells and whistles to things but I've found out that learning the standard/default configuration lets…

Problems with emacs: * some languages are not included by default * some very good extensions are not included by default also (ace-jump)

ace-jump was a good package.

Now it is superceded by avy (by abo-abo on GitHub) in every way + new features.

For such packages that always have room for improvement and not related to core emacs functionality, it is better that they stay in external repositories on GNU Elpa or Melpa.

That way, older packages do not have to get tied with emacs core. Currently Ido package is in that situation. I used to use Ido, but now I use the ivy package instead. Some people prefer to use helm instead. I would not be affected at all if Ido was removed from the emacs core in future and moved to GNU Elpa.

Re: Using tmux properly

#194
post #111
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

I have personally been running in to the problem of TOO many different ways to do the same thing. I am using many tools that all do a certain part better and each one of them share certain features which are accessed in all different ways (or it does something slightly different). i.e. Atom, Emacs, Neovim, and PyCharm. I try to stick to one, but switch around to get the best of each of them. It's been driving me craz…

Generally (especially with editors) I try out every new toy as it comes to my attention, but then go back home to vim and recreate whatever I liked, whether as configuration or with an extension. It helps that many of Atom's best features have inspired plugins :-)

Re: Using tmux properly

#196
post #32

Does mouse copy and paste work correctly with tmux? I find that it selects spans across multiple panes. Is there a way to fix this or Windows or Linux?

If you don't enable mouse support (set -g mouse on) then the terminal process handles mouse and does what you're describing* . When you enable mouse support tmux handles selections within panes and doesn't span.

* the other possibility also is that your term emulator is configured to grab mouse control without passing it through.

Re: Using tmux properly

#197

Earlier quoted context omitted.

What do they gain from me having to type "ls -lah" instead of "ll"?

What if their contracts with their customers state everything that deployed is from an audited source in order to leave no loopholes in the event of a data breach? And if there is a serious data breach you better be able to prove that you never installed anything malicious or dodgy on there.

> What if their contracts with their customers state everything that deployed is from an audited source in order to leave no loopholes in the event of a data breach?

Just delete the configs after you're done?

I place all my dotfiles in a directory, usually in ~/mgmnt/. Then I have a little shell script, which backs up all the dotfiles I need found in ~/ and symlinks the ones from the directory. It's .zshrc, .bashrc, .tmux.conf, .gitconfig, .emacs.d, and probably a couple of other config files. I only needed to do this a couple of times, but reverting such "installation" is as easy as a couple of rm/mv commands so I didn't even feel the need to write a script for this.

Re: Using tmux properly

#198
post #51

Earlier quoted context omitted.

I learned to give up making things exactly to my liking and learn to use the default key bindings. Now I can log into any machine and be 100% productive.

I consider myself a power Emacs user, I have a sizeable Emacs configuration, but when I connect to servers, I just use vi. Simpler, faster, less fuss.

Exactly. There's such a great difference between Emacs with half a million of lines of Elisp loaded and a vanilla version that it's easier for me to just use Vim (it's everywhere anyway, but I can work with Vi too).

Using vanilla Emacs is like writing a GUI application with nothing but the primitive X (or GDI) operations. The potential is there and is visible, and it's sometimes the right thing to do, but normally you'd use GTK or QT, right? Same is true with Emacs: in its vanilla form, it's just an API for text editing with a bunch of outdated defaults. It's superb as a platform for writing text-editing related (and sometimes others) applications in Elisp. I think that Emacs is not supposed to be used in that state at all, even. Vim, on the other hand, is pretty much designed around one UI & text-editing philosophy, which makes it less extensible, but much more usable out of the box.

Re: Using tmux properly

#199
post #68

Earlier quoted context omitted.

> Don't the screen developers ever need to go to the beginning of a line in the shell or editor? C-a a. Using emacs with screen for many years, this is almost automatic for me.

When not using tmux/screen, the complete invocation is C-a a M-x roll-eyes RET Backspace.

This is really easy to remedy: just bind send-prefix to C-a C-a. That way you'll be able to easily go to line beginning inside tmux, and outside you won't type the unnecessary 'a' character.

Moreover, I forgot if it's the default or if I set it somehow, but in Emacs a single C-a goes back to the beginning of a line, but C-a C-a goes back to the beginning of text on the line, which is almost always what I want anyway. So I press C-a twice anyway, everywhere, and I don't have the problem you described at all :)

Re: Using tmux properly

#200

Earlier quoted context omitted.

NFS is a nightmare, for many reasons. But there are similar solutions such as `pam_mkhomedir` which can be coerced into fetching dotfiles when a user logs in, etc.

Could you please share some of those reasons? I ask because I'm doing this... hasn't been a problem yet, but I'd rather know about issues now than later!

NFS can frequently cause hanging guests if the server goes away, leaving the filesystem mounted.

Locking is often a problem, for example if you've got ~ mounted on NFS and you're delivering mail to mboxes - obviously maildirs sidestep that particular problem.

Firewalling is a real pain, as is access-control and UID remapping. (These are more concerns when you have a single server sharing a tree to multiple clients.)

Finally failover & high-availablity are hard because you can't do transitions terribly easily, although hacks exist using automounter, etc.

Post reply on HN