-
Notifications
You must be signed in to change notification settings - Fork 5
/
screenrc
69 lines (51 loc) · 2.2 KB
/
screenrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Remove the 'freeze' key binding, since it's easy to hit by accident.
bind s
# Make backtick the command character. If I change this I'll need to find-replace ^`
escape ^``
# Put the window title in the status line
hardstatus alwayslastline "%t"
#hardstatus alwayslastline "%{+b dw}:%{-b dw}:%{+b dk}[%{-b dg} %0C:%s%a %{=b dk}]-[ %{-b dw}Load%{+b dk}:%{-b dg}%l %{+b dk}] [%{-b dg}%2`%{+b dk}] %=[ %{-b dg}%1`%{=b dk} ]%{-b dw}:%{+b dw}:%<"
#hardstatus alwayslastline "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
defscrollback 64000
startup_message off
# Refit the terminal window when we switch windows
register f ^`:next^J^`F
register b ^`:prev^J^`F
bind n process f
bind p process b
# Make it easy to reload config
bind q source $HOME/.screenrc
#### MAKE SCREEN SANE
# Clear the screen when visual programs exit, like a normal terminal.
altscreen on
# Make it so the scrollbar in virtual terminals will work (e.g. gnome-terminal)
termcapinfo xterm ti@:te@
# zshrc uses this to decide whether to unset the TERM=screen setting when ssh'ing
# prompt gets messed up on solaris
setenv GNU_SCREEN_IS_RUNNING 1
#### EMACSIFICATION
#### Taken from: http://snarfed.org/emacs_keybindings_in_gnu_screens_copy-scrollback_mode
# 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
# 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"
# Go to top of buffer/bottom of buffer like in emacs
# Didn't work
#bindkey -m “^[<” stuff “g”
#bindkey -m “^[>” stuff “G”