Browse code
updated zshrc and vim settings as well as tmux conf
Ed L authored on 21/06/2016 16:08:40
Showing 8 changed files
Showing 8 changed files
- .nvimrc
- .terminfo/78/xterm-256color
- .tmux.conf
- .zshrc
- external/smart-change-directory
- scripts/ircBot.py
- sitecustomize2.py
- vimrc
... | ... |
@@ -1,3 +1,5 @@ |
1 |
+set t_kb= |
|
2 |
+ |
|
1 | 3 |
let g:python_host_prog = '/usr/bin/python' |
2 | 4 |
let g:python3_host_prog = '/usr/bin/python3' |
3 | 5 |
|
... | ... |
@@ -75,16 +77,17 @@ NeoBundle 'eagletmt/ghcmod-vim' |
75 | 77 |
NeoBundle 'eagletmt/neco-ghc' |
76 | 78 |
NeoBundle 'Twinside/vim-hoogle' |
77 | 79 |
|
80 |
+" If there are uninstalled bundles found on startup, |
|
81 |
+" this will conveniently prompt you to install them. |
|
82 |
+NeoBundleCheck |
|
83 |
+"End NeoBundle Scripts------------------------- |
|
84 |
+ |
|
78 | 85 |
" Required: |
79 | 86 |
call neobundle#end() |
80 | 87 |
|
81 | 88 |
" Required: |
82 | 89 |
filetype plugin indent on |
83 | 90 |
|
84 |
-" If there are uninstalled bundles found on startup, |
|
85 |
-" this will conveniently prompt you to install them. |
|
86 |
-NeoBundleCheck |
|
87 |
-"End NeoBundle Scripts------------------------- |
|
88 | 91 |
|
89 | 92 |
set mouse= ";; Disable mouse sensitivity !!! |
90 | 93 |
set nohlsearch |
... | ... |
@@ -352,6 +355,7 @@ nmap [unite]h :<C-u>set hlsearch!<C-m> |
352 | 355 |
nmap [unite]t :<C-u>NERDTreeToggle<CR> |
353 | 356 |
nmap [unite]u :<C-u>GundoToggle<CR> |
354 | 357 |
nmap [unite]r :<C-u>!vagrant rsync<CR> |
358 |
+nmap [unite]R <C-W>t:buffer REPL<CR> |
|
355 | 359 |
|
356 | 360 |
" Reload |
357 | 361 |
map <silent> tu :call GHC_BrowseAll()<CR> |
... | ... |
@@ -18,8 +18,8 @@ bind c new-window -c "#{pane_current_path}" |
18 | 18 |
|
19 | 19 |
set -g status-left-length 52 |
20 | 20 |
set -g status-right-length 451 |
21 |
-set -g status-fg white |
|
22 |
-set -g status-bg colour234 |
|
21 |
+set -g status-fg colour234 |
|
22 |
+set -g status-bg white |
|
23 | 23 |
set -g window-status-activity-attr bold |
24 | 24 |
set -g pane-border-fg colour245 |
25 | 25 |
set -g pane-active-border-fg colour39 |
... | ... |
@@ -56,6 +56,12 @@ if [ -x "$FORTUNE" ]; then |
56 | 56 |
$FORTUNE |
57 | 57 |
fi |
58 | 58 |
|
59 |
+function battery_charge() { |
|
60 |
+ if [[ $LAPTOP[1] == 'y' && $TERM != "xterm" ]]; then |
|
61 |
+ python "$HOME/bin/batcharge.py" 2>/dev/null |
|
62 |
+ fi |
|
63 |
+} |
|
64 |
+ |
|
59 | 65 |
autoload -Uz vcs_info |
60 | 66 |
zstyle ':vcs_info:*' actionformats \ |
61 | 67 |
'%F{5}%f%s%F{5}%F{3}->%F{5}%F{2}%b%F{3}|%F{1}%a%F{5}%f' |
... | ... |
@@ -72,9 +78,25 @@ vcs_info_wrapper() { |
72 | 78 |
fi |
73 | 79 |
} |
74 | 80 |
|
81 |
+function zle-line-init zle-keymap-select { |
|
82 |
+ RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}" |
|
83 |
+ RPS2=$RPS1 |
|
84 |
+ zle reset-prompt |
|
85 |
+} |
|
86 |
+ |
|
87 |
+zle -N zle-line-init |
|
88 |
+zle -N zle-keymap-select |
|
89 |
+ |
|
90 |
+ |
|
75 | 91 |
export PYTHONSTARTUP=$HOME/Library/Python/2.7/site-packages/sitecustomize.py |
76 | 92 |
setopt promptsubst |
77 | 93 |
|
94 |
+PROMPT='--- |
|
95 |
+(%?) %m:%n--%l ${PWD/$HOME/~} `vcs_info_wrapper` `battery_charge` |
|
96 |
+%!:%# ' |
|
97 |
+export PROMPT |
|
98 |
+#RPROMPT='[%T]' |
|
99 |
+ |
|
78 | 100 |
HOSTNAME=`hostname -f` |
79 | 101 |
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' |
80 | 102 |
|
... | ... |
@@ -109,7 +131,7 @@ if [[ $TERM != "linux" ]]; then |
109 | 131 |
add-zsh-hook precmd termtitle |
110 | 132 |
fi |
111 | 133 |
|
112 |
-PATH=/home/edwlan/bin:/usr/local/bin:$PATH |
|
134 |
+PATH=$HOME/bin:/usr/local/bin:$PATH |
|
113 | 135 |
export PATH="/opt/local/bin:/usr/sbin:/sbin/usr/sbin:/sbin:$HOME/.cabal/bin:$HOME/.local/bin:$HOME/bin:/Developer/usr/bin:$PATH" |
114 | 136 |
export VIMCLOJURE_SERVER_JAR="$HOME/bin/jars/server-2.3.6.jar" |
115 | 137 |
export INFOPATH=/usr/local/share/info:/usr/local/texlive/2009/texmf/doc/info |
... | ... |
@@ -169,7 +191,7 @@ zstyle ':completion:*' group-name '' |
169 | 191 |
zstyle ':completion:*' insert-unambiguous true |
170 | 192 |
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} |
171 | 193 |
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s |
172 |
-zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' |
|
194 |
+zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._\ ]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._\ ]=** r:|=**' |
|
173 | 195 |
zstyle ':completion:*' menu select=0 |
174 | 196 |
zstyle ':completion:*' original false |
175 | 197 |
zstyle ':completion:*' prompt '%e errors:' |
... | ... |
@@ -518,6 +540,9 @@ PROMPT='--- |
518 | 540 |
%!:%# ' |
519 | 541 |
export PROMPT |
520 | 542 |
|
543 |
+set -o vi |
|
544 |
+bindkey -M vicmd '?' history-incremental-search-backward |
|
545 |
+ |
|
521 | 546 |
#THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!! |
522 | 547 |
[[ -s "/Users/edwlan/.gvm/bin/gvm-init.sh" ]] && source "/Users/edwlan/.gvm/bin/gvm-init.sh" |
523 | 548 |
|
2 | 2 |
old mode 100644 |
3 | 3 |
new mode 100755 |
... | ... |
@@ -1,5 +1,4 @@ |
1 |
-# Copyright (c) Twisted Matrix Laboratories. |
|
2 |
-# See LICENSE for details. |
|
1 |
+#! /usr/bin/env python |
|
3 | 2 |
|
4 | 3 |
|
5 | 4 |
""" |
... | ... |
@@ -76,9 +75,16 @@ class LogBot(irc.IRCClient): |
76 | 75 |
|
77 | 76 |
def connectionMade(self): |
78 | 77 |
irc.IRCClient.connectionMade(self) |
78 |
+ self.join('#lisp'); |
|
79 |
+ |
|
79 | 80 |
self.handler = MessageLogger(self) |
80 | 81 |
d = threads.deferToThread(self.handler.get_message) |
81 | 82 |
d.addCallback(self.handler.send_message) |
83 |
+ reactor.callLater(5, self.changeNick) |
|
84 |
+ |
|
85 |
+ def changeNick(self): |
|
86 |
+ self.setNick(base64.encodestring(self.nickname)[:len(self.nickname)].strip()) |
|
87 |
+ reactor.callLater( (random.random()-0.5)*2.5 + 5, self.changeNick ) |
|
82 | 88 |
|
83 | 89 |
def privmsg(self, user, channel, msg): |
84 | 90 |
"""This will get called when the bot receives a message.""" |
... | ... |
@@ -172,11 +172,11 @@ def e(name=None): |
172 | 172 |
f.close() |
173 | 173 |
|
174 | 174 |
def ls(name): |
175 |
- load_file = lambda: open('/home/edwlan/sandbox/unsorted/pythonsnippets_%s.py' % name) |
|
175 |
+ load_file = lambda: open('/Users/edwlan/sandbox/unsorted/pythonsnippets_%s.py' % name) |
|
176 | 176 |
try: |
177 | 177 |
f = load_file() |
178 | 178 |
except IOError: |
179 |
- load_file = lambda: open('/home/edwlan/sandbox/%s.py' % name) |
|
179 |
+ load_file = lambda: open('/Users/edwlan/sandbox/%s.py' % name) |
|
180 | 180 |
f = load_file() |
181 | 181 |
|
182 | 182 |
raw_input('loading %s, press Enter to continue...' % f.name) |
... | ... |
@@ -405,3 +405,4 @@ map <silent> tw :call GHC_ShowType(1)<CR> |
405 | 405 |
autocmd BufRead,BufNewFile *.css,*.scss,*.less setlocal foldmethod=marker foldmarker={,} |
406 | 406 |
|
407 | 407 |
command -nargs=+ Gadd Git add <q-args> |
408 |
+" set runtimepath+=/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/vim |