141b96496989

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 28 Oct 2014 17:55:18 -0400
parents e8ba45f41366 (diff) fd448e6793d1 (current diff)
children 663e12a5313f
branches/tags (none)
files

Changes

--- a/.hgsubstate	Tue Oct 28 17:54:27 2014 -0400
+++ b/.hgsubstate	Tue Oct 28 17:55:18 2014 -0400
@@ -26,7 +26,7 @@
 a1433c485eb254838c1db52e087d5ec4d1e77cfd vim/bundle/nerdtree
 871bc88a5bbcb6e8844a64450b8e7f8ac13aac24 vim/bundle/orgmode
 b6b7d8b1982b67a0bba936c198041f6f3a2286a4 vim/bundle/paredit
-f84e170fce4f6cb60b6d1b4baa30076f2b372f1e vim/bundle/pgsql
+1a436f7d875b4ec630da081b041c73264235c7e7 vim/bundle/pgsql
 2af074850fde676743f655775e3e151925751adf vim/bundle/powerline
 1b4b8f1a8f1c88d8caae6c1b12c22c52ef418f32 vim/bundle/python-mode
 eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 vim/bundle/rainbow-parentheses
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/fy.fish	Tue Oct 28 17:55:18 2014 -0400
@@ -0,0 +1,20 @@
+function fy
+     echo -n '         / \
+        |\_/|
+        |---|
+        |   |
+        |   |
+      _ |=-=| _
+  _  / \|   |/ \
+ / \|   |   |   ||\
+|   |   |   |   | \>
+|   |   |   |   |   \
+| -   -   -   - |)   )
+|                   /
+ \                 /
+  \               /
+   \             /
+    \           /
+     |         |
+    ' | pbcopy
+end
--- a/vim/vimrc	Tue Oct 28 17:54:27 2014 -0400
+++ b/vim/vimrc	Tue Oct 28 17:55:18 2014 -0400
@@ -678,6 +678,19 @@
 augroup END
 
 " }}}
+" Bullshit {{{
+
+augroup ft_bullshit
+    au!
+
+    " Send to tmux with localleader e
+    au FileType bullshit nnoremap <buffer> <silent> <localleader>e :let bullshit_tslime_view = winsaveview()<cr>vip"ry:call SendToTmux(@r)<cr>:call winrestview(bullshit_tslime_view)<cr>
+
+    " kill pager with q
+    au FileType bullshit nnoremap <buffer> <silent> <localleader>q :call SendToTmuxRaw("q")<cr>
+augroup END
+
+" }}}
 " C {{{
 
 augroup ft_c
--- a/weechat/python/autoload/quotes.py	Tue Oct 28 17:54:27 2014 -0400
+++ b/weechat/python/autoload/quotes.py	Tue Oct 28 17:55:18 2014 -0400
@@ -6,6 +6,7 @@
 SCRIPT_LICENSE = 'MIT/X11'
 SCRIPT_DESC = 'Grab quotes and shove them into a text file.'
 SCRIPT_COMMAND = 'quo'
+SCRIPT_COMMAND_LONG = 'quoo'
 
 QUOTE_FILE = '/Users/sjl/Dropbox/quotes.txt'
 
@@ -28,7 +29,7 @@
 def hds(name, obj, attr):
     return hd(weechat.hdata_string, name, obj, attr)
 
-def get_lines(buffer):
+def get_lines(buffer, numlines):
     lines = hdp("buffer", buffer, "own_lines")
     if not lines:
         # null pointer wat do
@@ -37,7 +38,7 @@
     last_lines = []
 
     line = hdp("lines", lines, "last_line")
-    for _ in range(15):
+    for _ in range(numlines):
         if not line:
             # shit we're at the top of the buffer
             break
@@ -56,8 +57,8 @@
     last_lines.reverse()
     return last_lines
 
-def quote_grab(data, buffer, args):
-    lines = get_lines(buffer)
+def quote_grab(data, buffer, args, numlines=15):
+    lines = get_lines(buffer, numlines)
 
     with open(QUOTE_FILE, 'a') as f:
         f.write("\n---\n")
@@ -72,6 +73,9 @@
 
     return weechat.WEECHAT_RC_OK
 
+def quote_grab_long(data, buffer, args):
+    return quote_grab(data, buffer, args, 75)
+
 if __name__ == '__main__' and import_ok:
     if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION,
                         SCRIPT_LICENSE, SCRIPT_DESC, '', ''):
@@ -85,3 +89,12 @@
             '',
             'quote_grab',
             '')
+        weechat.hook_command(
+            SCRIPT_COMMAND_LONG,
+            'Appends the last 75 lines of the current buffer to your quotes '
+            'file and opens it in Vim so you can trim it.',
+            '',
+            '',
+            '',
+            'quote_grab_long',
+            '')
--- a/weechat/weechat.conf	Tue Oct 28 17:54:27 2014 -0400
+++ b/weechat/weechat.conf	Tue Oct 28 17:55:18 2014 -0400
@@ -35,8 +35,8 @@
 day_change_message_1date = "-- %a, %d %b %Y --"
 day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"
 eat_newline_glitch = off
-highlight = "sjl,slosh,slj,clojerks"
-highlight_regex = "(^all[,:]|backend(ia)?[^s/]|red[- ]tape|steve ?losh|rob ford|(jesus )?fucking christ|bring me my [A-Za-z0-9_]+ (pant|breeche|kilt|skirt|short|jort|plort)s?|([[:<:]]((mother)?fuck([ie]ng?|er)?|(god?)?damn(ed)?|dammit|(bull|horse)?shite?)[[:>:]].*){3,})"
+highlight = "sjl,slosh,slj,clojerks,horrifying"
+highlight_regex = "(^all[,:]|backend(ia)?[^s/]|red[- ]tape|steve ?losh|rob ford|(jesus )?fucking christ|bring me my [A-Za-z0-9_]+ (pant|breeche|kilt|skirt|short|jort|plort)s?|(horse|mouse|clown)fuckers?|([[:<:]]((mother)?fuck([ie]ng?|er)?|(god?)?damn(ed)?|dammit|(bull|horse)?shite?)[[:>:]].*){3,})"
 highlight_tags = ""
 hotlist_add_buffer_if_away = on
 hotlist_buffer_separator = ", "
@@ -88,7 +88,7 @@
 read_marker_always_show = on
 read_marker_string = "◡◡◠"
 save_config_on_exit = off
-save_layout_on_exit = none
+save_layout_on_exit = "all"
 scroll_amount = 3
 scroll_bottom_after_switch = off
 scroll_page_percent = 100