Live data from Hacker News

GNU Screen: an introduction and beginner's tutorial

kuro5hin.org

11–20 of 44 posts

Re: GNU Screen: an introduction and beginner's tutorial

#11
post #10

While we are talking about screen - I'd really like to be able to highlight text in VIM (using the visual mode) and then be able to paste that into another screen. Does anyone know how to do this?

I don't know off hand how to do it using a vim selection, but you can use screen selections. ^a, [, then navigation keys and space to select, ^a, ] to paste.

Re: GNU Screen: an introduction and beginner's tutorial

#12

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

I wish someone would write an actual article on tmux and post it here, every time screen comes up I just here statements about the vague superiority of tmux.

Re: GNU Screen: an introduction and beginner's tutorial

#13

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

Tmux solves a problem for me. Previously I was using a combination of Screen and dvtm (http://www.brain-dump.org/projects/dvtm/) to get the equivalent of multiple screens, each with their own splits. Screen can do splits but you can't maintain splits in one screen/tab and move to another screen with independent splits. It's hard to describe, but if you've used screen or dvtm you probably know what I mean. Tmux seems to have that built in. Awesome, thanks.

Re: GNU Screen: an introduction and beginner's tutorial

#14

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

For emacs users Tmux is far more intuitive, what with the bindings you expect doing what you expect. Binding C-space for begin selection in screen seemed to be impossible.

Re: GNU Screen: an introduction and beginner's tutorial

#15

The day I learned about Screen...It was pure bliss..it solved so many problems I didn't know I had. Copy/pasting, Switching between workstations while working remotely all without losing your spot. Collaboration. If you don't know about screen, and you find yourself using a CLI even just a little bit, you should take the time to learn it.

First thing I install on solaris, probably my favorite unix tool also ;) Can't imagine doing giant database imports without it.

Re: GNU Screen: an introduction and beginner's tutorial

#16
post #12

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

I wish someone would write an actual article on tmux and post it here, every time screen comes up I just here statements about the vague superiority of tmux.

No promises, but I might get around to it this weekend. I've been meaning to write something for a while. The tmux man page is quite thorough, but there are a few things that might be confusing if you expect it to behave like screen, such as layouts.

Re: GNU Screen: an introduction and beginner's tutorial

#17

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

Care to clarify "screen is voodoo. tmux isn't."? That's pretty meaningless. The overall design to tmux is quite a bit cleaner, and (having poked around in their respective sources), I know which I'd be more likely to contribute patches to. It took screen forever to get vertical splits (are they still an unofficial patch?), whereas tmux already has dwm/XMonad-style layouts. tmux is also included in the standard OpenBS…

Compare my tmux.conf (http://pastebin.com/m2394d7a2) and my screenrc (http://pastebin.com/d7bb649a5).

Granted, my screenrc is a hotchpotch of cut-and-paste and default stuff from lots of places, but that's actually the point: I could read through the tmux manpage and set up tmux the way I wanted, without cobbling a conf file together from the blog posts and mailing list emails of wiser people.

Re: GNU Screen: an introduction and beginner's tutorial

#18

Stop using Screen. Switch to Tmux ( http://tmux.sourceforge.net/ ). Screen is voodoo. Tmux isn't. EDIT: Compare my tmux.conf ( http://pastebin.com/m2394d7a2 ) and my screenrc ( http://pastebin.com/d7bb649a5 ). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never real…

Tmux uses some non-standard escape sequences, e.g. ctrl- and ctrl-shift- arrow keys. In version 1.0 it's impossible to distinguish between ctrl-left and ctrl-shift-left.

Re: GNU Screen: an introduction and beginner's tutorial

#19
post #10

While we are talking about screen - I'd really like to be able to highlight text in VIM (using the visual mode) and then be able to paste that into another screen. Does anyone know how to do this?

ScreenShell. It leverages screen to create a viable REPL-buffer for vim, for any language that has an interactive interpreter.

http://www.vim.org/scripts/script.php?script_id=2711

Here's an article describing how to use it with lisp:

http://www.ktaylor.name/2009/11/vim-screen-lisp-programming-...

And finally, some key mappings to bind to sending the current paragraph or selection to the interpreter, from any mode.

http://gist.github.com/278733

Re: GNU Screen: an introduction and beginner's tutorial

#20
It's worth grabbing the latest version of screen from git and installing it. That way you get vertical splits with ctrl-a ctrl-|. If you're running a new version of Ubuntu, you already have this.

Building screen isn't too hard. Run the autogen.sh script to generate the configure script.

Post reply on HN