Skip to content

Instantly share code, notes, and snippets.

@paxan
Created January 29, 2013 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paxan/4666544 to your computer and use it in GitHub Desktop.
Save paxan/4666544 to your computer and use it in GitHub Desktop.
.screenrc by @offby1
# -*-conf-space-*-
# This screenrc file was obtained as-is from Pavel's friend
# Eric Hanchrow (https://github.com/offby1). It just works!
# Typical screen installations use Control-A to access screen
# functions, but this one uses Control-Z. As far as I know,
# it's the same as a typical screen setup in every other way.
# This seems to interfere least with Emacs
escape ^Zz
# Disable the screen locking feature, since I only ever invoke it by
# accident.
bind ^X
bind x
# This is _usally_ the default binding, but sometimes it too seems to
# be bound to the screen-locking horror.
bind X remove
nethack on
shelltitle "$ |bash"
# Allow C-z s to create a useful new window, instead of the default blank one.
bind s eval split focus other "focus up"
# twb's taskbar
hardstatus alwayslastline "[%c %H] %-Lw%{ WB}%50>%n%f* %t%{-}%+Lw%<"
### Following swiped from http://snarfed.org/space/Emacs%20keybindings%20in%20GNU%20screen's%20copy-scrollback%20mode
# emacs keybindings for navigation in copy mode
markkeys ^B=Y:^F=V:h=^B:l=^F:0=^A:$=^E
# C-space sets mark. markkeys does it in screen 4.0 and higher, but 3.9x
# needs the bindkey command. (note the ^@ escape sequence for C-space.)
markkeys ' '=^@
# bindkey -m ^@ stuff ' '
# page up and page down
bindkey -m -k kP stuff Y
bindkey -m -k kN stuff V
# failed attempt to make C-space work in i-search too
# bindkey -m ^@ eval "stuff \033" "stuff ^@"
# special hack for C-e, since it should go *past*
# the last char. -m means this is for copy mode only.
bindkey -m ^e stuff "$^f"
# C-g and other keys just quit copy mode. Esc does nothing.
markkeys \033=\015=^G=^D=h=j=k=l=H=M=L=G=g=y=c=v=a=x=b=e=B=E=w
markkeys @=\033
# control arrows move by words. (set B, e, and w to F keys so that i can
# use them to move by words, but they themselves still quit copy mode.)
markkeys B=[:E=]:b={:e=}:w=>
bindkey -m ^[Od stuff { #"[[}"
bindkey -m ^[Oc stuff ] #"}]^f"
# From http://frexx.de/xterm-256-notes/
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment