Commits

Steve Losh committed 2de1f78 Merge

Merge.

Comments (0)

Files changed (22)

 mercurial/histedit               = [hg]https://bitbucket.org/durin42/histedit
 mercurial/templates              = [hg]https://bitbucket.org/sjl/mercurial-cli-templates
 vim/bundle/AnsiEsc.vim           = [git]git://github.com/sjl/AnsiEsc.vim.git
+vim/bundle/YouCompleteMe         = [git]git://github.com/Valloric/YouCompleteMe.git
 vim/bundle/abolish               = [git]git://github.com/tpope/vim-abolish.git
+vim/bundle/argumentative         = [git]git://github.com/PeterRincker/vim-argumentative.git
 vim/bundle/ack                   = [git]git://github.com/mileszs/ack.vim.git
 vim/bundle/badwolf               = [hg]https://bitbucket.org/sjl/badwolf/
 vim/bundle/clam                  = [hg]https://bitbucket.org/sjl/clam.vim/
 vim/bundle/sparkup               = [git]git://github.com/sjl/vim-sparkup.git
 vim/bundle/splice                = [hg]https://bitbucket.org/sjl/splice.vim
 vim/bundle/strftimedammit        = [hg]https://bitbucket.org/sjl/strftimedammit.vim/
-vim/bundle/supertab              = [git]git://github.com/ervandew/supertab.git
 vim/bundle/surround              = [git]git://github.com/tpope/vim-surround.git
 vim/bundle/syntastic             = [git]git://github.com/scrooloose/syntastic.git
 vim/bundle/tslime                = [git]git://github.com/sjl/tslime.vim.git
 b0da16490f168f68072973b45dbc27a74fb7b529 mercurial/histedit
 4d95cb18a3b420154ef978c53de1d2e692f8343d mercurial/templates
 64981213be2efd939e6e6e109e2b32c24e95fd95 vim/bundle/AnsiEsc.vim
+7cc399a017a0f20c230a50a4f05d58ab7ef9dca4 vim/bundle/YouCompleteMe
 d64ce06650cf9b098b5a01c0db53864965d9310b vim/bundle/abolish
 f183a345a0c10caed7684d07dabae33e007c7590 vim/bundle/ack
+6c4663589e73e21e77a9ea8403dcf2bf6cf9c11c vim/bundle/argumentative
 db3707cbd8706f4bb054959ecc5cee82ac45687b vim/bundle/badwolf
 8533fffd9fbb690dfc8e334f91a10c72e35a6dce vim/bundle/clam
 5201a3860dbc32814f44eaf9386245caa70a65e6 vim/bundle/clojure-static
 c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup
 01e68795c7a14b97ec2ebbd70b0fcb42d1adac61 vim/bundle/splice
 6eec2c131213850ed65fd6da494dfd1a0d620a4e vim/bundle/strftimedammit
-7ee7f774dd1288ea2e7c57b63cb069a07d425ca0 vim/bundle/supertab
 1a73f607f8f5477d6942df2eb6e7245c4864f4d3 vim/bundle/surround
-0a7b21d6021a3a565db066e7b8f7f158c918037c vim/bundle/syntastic
+14cb306414dda411b1809a088e18eb2796030095 vim/bundle/syntastic
 2dee007ddae8156735cbae7f0cd4e0a24ba7287b vim/bundle/tslime
 84365f56fc87c11f1f04eed487d256cf8b128f7c vim/bundle/vitality
 a884f3a161fa3cd8c996eb53a3d1c68631f60c21 vim/bundle/yankring

bin/sort-scala-imports

+#!/usr/bin/env python
+
+import sys
+from operator import attrgetter
+
+
+def next_line():
+    return sys.stdin.readline().rstrip('\n')
+
+l = next_line()
+
+while not l.startswith('import '):
+    sys.stdout.write(l + '\n')
+    l = next_line()
+
+class ImportGroup(object):
+    def __init__(self, line):
+        self.main_line = line.rstrip()
+        self.guts = []
+
+    def slurp(self):
+        global l
+        if self.main_line.endswith('}'):
+            # This is a line like: import foo.{ a, b, c }
+            prefix, rest = self.main_line.split('{', 1)
+            guts = [item.strip() for item in
+                    rest.rstrip('}, ').split(',')]
+            guts.sort(key=lambda s: s.lower())
+            self.main_line = '%s{ %s }' % (prefix, ', '.join(guts))
+            l = next_line()
+        elif self.main_line.endswith('{'):
+            while True:
+                l = next_line()
+                if l.rstrip().endswith('}'):
+                    l = next_line()
+                    break
+                else:
+                    self.guts.append(l.strip().rstrip(','))
+        else:
+            l = next_line()
+
+    def spit(self):
+        sys.stdout.write(self.main_line + '\n')
+
+        if self.guts:
+            self.guts.sort(key=lambda g: g.lower())
+            sys.stdout.write('  ' +
+                             ',\n  '.join(self.guts) +
+                             '\n}\n')
+
+    def key(self):
+        return self.main_line.lower().replace('{', '@')
+
+imports = []
+while l.startswith('import '):
+    ig = ImportGroup(l)
+    ig.slurp()
+    imports.append(ig)
+
+imports.sort(key=lambda ig: ig.key())
+
+for i in imports:
+    i.spit()
+
+sys.stdout.write(l + '\n')
+
+for l in sys.stdin.readlines():
+    sys.stdout.write(l)
+
 --python-kinds=cfm
 --javascript-kinds=cm
 --fields=-s
+--fields=+l
 
 --languages=-html
 --languages=-javascript

dotcss/simple.com.css

+#payment-goals-message { display: none !important; }
 end
 
 # }}}
+# Completions {{{
+
+function make_completion --argument alias command
+    complete -c $alias -xa "(
+        set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' );
+        complete -C\"$command \$cmd\";
+    )"
+end
+
+make_completion g "git"
+
+# }}}
 # Bind Keys {{{
 
 # Backwards compatibility?  Screw that, it's more important that our function
     ci = commit
     cm = commit -m
 
-    d = !git diff | vim -R -
+    d = "!sh -c 'git diff $* | vim -R -' -"
     di = !git diff --cached | vim -R -
 
     co = checkout
     unstage = reset HEAD
     uns = reset HEAD
 
+    shelve = stash save --include-untracked
+    unshelve = stash pop
+
+    shel = shelve
+    unshel = unshelve
+
     delete-local-branch = branch -D
     delete-remote-branch = push origin --delete
     delete-local-reference-to-remote-branch = branch -rd
+    delete-branch = "!sh -c 'git delete-local-branch $1; git delete-local-reference-to-remote-branch origin/$1; git delete-local-reference-to-remote-branch upstream/$1' -"
 
     currentbranch = rev-parse --abbrev-ref HEAD
 
 set showstatuslinks=command
 
 " FASTER PLEASE
-nmap -builtin j 3j
-nmap -builtin k 3k
+nmap -builtin -silent j 3j
+nmap -builtin -silent k 3k
 
 " Go to the second input field.
 " Useful for skipping over search fields, etc.
 
 " Train myself to use t instead of cmd-t
 nmap -builtin <m-t> <nop>
+
+" Apparently the d key broke at some point.  What the Christ?
+nmap -builtin d :tabclose<cr>

vim/after/plugin/surround-mapping.vim

 " Use the old surround.vim key.  I can't deal with the new one.
-vmap s S
+xmap s <Plug>VSurround
+
+" Use S for something useful.
+vnoremap S :s/

vim/custom-dictionary.utf-8.add

 reindent
 Javascript
 voicemail
+C2C
+ACH
+TBBK
+Arroway
+recon
+SFTP
+timestamp
+uuid
+UTC
+MoneyDrop
 namespaces
 augroup trailing
     au!
     au InsertEnter * :set listchars-=trail:⌴
+    au InsertLeave * :set listchars+=trail:⌴
 augroup END
 
 " }}}
 set expandtab
 set wrap
 set textwidth=80
-set formatoptions=qrn1
+set formatoptions=qrn1j
 set colorcolumn=+1
 
 " }}}
 " Unfuck my screen
 nnoremap U :syntax sync fromstart<cr>:redraw!<cr>
 
+" Pushing
+nnoremap <leader>Go :Start! git push origin<cr>
+nnoremap <leader>Gu :Start! git push upstream<cr>
+nnoremap <leader>Hd :Start! hg push default<cr>
+nnoremap <leader>Hu :Start! hg push upstream<cr>
+
 " Easy filetype switching {{{
 
 nnoremap _md :set ft=markdown<CR>
 nnoremap D d$
 
 " Don't move on *
-nnoremap * *<c-o>
+" I'd use a function for this but Vim clobbers the last search when you're in
+" a function so fuck it, practicality beats purity.
+nnoremap <silent> * :let stay_star_view = winsaveview()<cr>*<c-o>:call winrestview(stay_star_view)<cr>
 
 " Jumping to tags.
 "
     au BufNewFile,BufRead *.sql set filetype=pgsql
     au FileType pgsql set foldmethod=indent
     au FileType pgsql set softtabstop=2 shiftwidth=2
+    au FileType pgsql setlocal commentstring=--\ %s comments=:--
 augroup END
 
 " }}}
 augroup ft_scala
     au!
     au Filetype scala setlocal foldmethod=marker foldmarker={,}
+    au Filetype scala setlocal textwidth=100
     au Filetype scala compiler maven
     au Filetype scala let b:dispatch = 'mvn -B package install'
-    au Filetype scala nnoremap <buffer> <localleader>s :SortScalaImports<cr>
+    au Filetype scala nnoremap <buffer> <localleader>s mz:%!sort-scala-imports<cr>`z
     au Filetype scala nnoremap <buffer> M :call scaladoc#Search(expand("<cword>"))<cr>
     au Filetype scala vnoremap <buffer> M "ry:call scaladoc#Search(@r)<cr>
     au Filetype scala nmap <buffer> <localleader>( ysiwbi
 augroup END
 
 " "Hub"
-nnoremap <leader>H :Gbrowse<cr>
 vnoremap <leader>H :Gbrowse<cr>
 
 " }}}
 let g:syntastic_mode_map = {
             \ "mode": "active",
             \ "active_filetypes": [],
-            \ "passive_filetypes": ['java', 'html', 'rst', 'scala']
+            \ "passive_filetypes": ['java', 'html', 'rst']
             \ }
 let g:syntastic_stl_format = '[%E{%e Errors}%B{, }%W{%w Warnings}]'
 let g:syntastic_jsl_conf = '$HOME/.vim/jsl.conf'
+let g:syntastic_scala_checkers = ['fsc']
 
 nnoremap <leader>C :SyntasticCheck<cr>
 
 endfunction
 
 " }}}
+" YouCompleteMe {{{
+
+let g:ycm_min_num_of_chars_for_completion = 4
+
+" }}}
 
 " }}}
 " Text objects ------------------------------------------------------------ {{{
         execute '2match IndentGuides /\%(\_^\s*\)\@<=\%(\%'.(0*&sw+1).'v\|\%'.(1*&sw+1).'v\|\%'.(2*&sw+1).'v\|\%'.(3*&sw+1).'v\|\%'.(4*&sw+1).'v\|\%'.(5*&sw+1).'v\|\%'.(6*&sw+1).'v\|\%'.(7*&sw+1).'v\)\s/'
     endif
 endfunction " }}}
-hi def IndentGuides guibg=#303030
+hi def IndentGuides guibg=#303030 ctermbg=234
 nnoremap <leader>I :call IndentGuides()<cr>
 
 " }}}

weechat/alias.conf

 #
-# alias.conf -- WeeChat v0.3.8
+# alias.conf -- weechat v0.4.1
 #
 
 [cmd]

weechat/buffers.conf

 #
-# buffers.conf -- WeeChat v0.3.8
+# buffers.conf -- weechat v0.4.1
 #
 
 [color]

weechat/charset.conf

 #
-# charset.conf -- WeeChat v0.3.8
+# charset.conf -- weechat v0.4.1
 #
 
 [default]

weechat/logger.conf

 #
-# logger.conf -- WeeChat v0.3.8
+# logger.conf -- weechat v0.4.1
 #
 
 [look]
 info_lines = off
 mask = "$plugin.$name.weechatlog"
 name_lower_case = on
+nick_prefix = ""
+nick_suffix = ""
 path = "%h/logs/"
 replacement_char = "_"
 time_format = "%Y-%m-%d %H:%M:%S"

weechat/plugins.conf

 #
-# plugins.conf -- WeeChat v0.3.8
+# plugins.conf -- weechat v0.4.1
 #
 
 [var]
 fifo.fifo = "on"
+lua.check_license = "off"
 perl.buffers.color_current = "black,green"
 perl.buffers.color_default = "default"
 perl.buffers.color_hotlist_highlight = "lightmagenta"

weechat/python/autoload/colon_complete.py

 SCRIPT_LICENSE='MIT/X11'
 SCRIPT_DESC='Add a colon after nick completion when all the previous words in the input are also nicks.'
 
+EXTRA_NICKS = ['all', 'backend', 'clojerks', 'ops', 'support']
+
 import_ok=True
 
 try:
 def get_nicks(buffer, prefix=''):
     channel = weechat.buffer_get_string(buffer, 'localvar_channel')
     server = weechat.buffer_get_string(buffer, 'localvar_server')
+    prefix = prefix.lower()
 
     matches = []
 
     infolist = weechat.infolist_get('irc_nick', '', '%s,%s' % (server, channel))
     while weechat.infolist_next(infolist):
         nick = weechat.infolist_string(infolist, 'name')
-        if nick != 'localhost' and nick.lower().startswith(prefix.lower()):
+        if nick != 'localhost' and nick.lower().startswith(prefix):
             matches.append(nick)
     weechat.infolist_free(infolist)
 
+    for nick in EXTRA_NICKS:
+        if nick.lower().startswith(prefix):
+            matches.append(nick)
+
     return matches
 
 def completer(data, buffer, command):

weechat/relay.conf

 #
-# relay.conf -- WeeChat v0.3.8
+# relay.conf -- weechat v0.4.1
 #
 
 [look]
 raw_messages = 256
 
 [color]
+client = cyan
 status_active = lightblue
 status_auth_failed = lightred
 status_connecting = yellow
 allowed_ips = ""
 bind_address = ""
 compression_level = 6
+ipv6 = on
 max_clients = 5
 password = ""
+ssl_cert_key = "%h/ssl/relay.pem"
+websocket_allowed_origins = ""
+
+[irc]
+backlog_max_minutes = 1440
+backlog_max_number = 256
+backlog_since_last_disconnect = on
+backlog_tags = "irc_privmsg"
+backlog_time_format = "[%H:%M] "
 
 [port]

weechat/rmodifier.conf

 #
-# rmodifier.conf -- WeeChat v0.3.8
+# rmodifier.conf -- weechat v0.4.1
 #
 
 [look]

weechat/urlgrab.conf

 #
-# urlgrab.conf -- WeeChat v0.3.8
+# urlgrab.conf -- weechat v0.4.1
 #
 
 [color]

weechat/weechat.conf

 main.buffer = "irc;simple.##/b/anksimple;5"
 main.buffer = "irc;simple.#c2c;6"
 main.buffer = "irc;simple.#ops;7"
-main.buffer = "irc;simple.#security;8"
-main.buffer = "irc;simple.##@;9"
-main.buffer = "irc;simple.#support;10"
-main.buffer = "irc;simple.##vim;11"
-main.buffer = "irc;simple.##dance;12"
-main.buffer = "irc;simple.##adorbs;13"
-main.buffer = "irc;sjl.##simple;14"
-main.buffer = "irc;simple.##portland;15"
-main.buffer = "irc;simple.##music;16"
-main.buffer = "irc;bit.&bitlbee;17"
-main.buffer = "irc;sjl.#riemann;18"
-main.buffer = "irc;sjl.#mercurial;19"
-main.buffer = "irc;sjl.#clojure;20"
-main.buffer = "irc;sjl.#weechat;21"
-main.buffer = "irc;sjl.#mutt;22"
-main.buffer = "irc;sjl.#nethack;23"
-main.buffer = "irc;sjl.#dwarffortress;24"
-main.buffer = "irc;sjl.#scala;25"
-main.buffer = "irc;sjl.#lisp;26"
-main.buffer = "irc;sjl.#vagrant;27"
-main.buffer = "irc;sjl.#amara_alumni;28"
-main.buffer = "irc;sjl.#postgresql;29"
-main.window = "1;0;0;0;irc;simple.##music"
+main.buffer = "irc;simple.#frontend;8"
+main.buffer = "irc;simple.#internal;9"
+main.buffer = "irc;simple.#security;10"
+main.buffer = "irc;simple.##@;11"
+main.buffer = "irc;simple.#support;12"
+main.buffer = "irc;simple.##vim;13"
+main.buffer = "irc;simple.##dance;14"
+main.buffer = "irc;simple.##adorbs;15"
+main.buffer = "irc;sjl.##simple;16"
+main.buffer = "irc;simple.##music;17"
+main.buffer = "irc;bit.&bitlbee;18"
+main.buffer = "irc;sjl.#riemann;19"
+main.buffer = "irc;sjl.#mercurial;20"
+main.buffer = "irc;sjl.#clojure;21"
+main.buffer = "irc;sjl.#weechat;22"
+main.buffer = "irc;sjl.#mutt;23"
+main.buffer = "irc;sjl.#nethack;24"
+main.buffer = "irc;sjl.#dwarffortress;25"
+main.buffer = "irc;sjl.#scala;26"
+main.buffer = "irc;sjl.#lisp;27"
+main.buffer = "irc;sjl.#vagrant;28"
+main.buffer = "irc;sjl.#amara_alumni;29"
+main.buffer = "irc;sjl.#postgresql;30"
+main.window = "1;0;0;0;irc;simple.#internal"
 main.current = on
+_zoom.window = "1;0;0;0;irc;simple.##vim"
 
 [notify]
 

weechat/xfer.conf

 #
-# xfer.conf -- WeeChat v0.3.8
+# xfer.conf -- weechat v0.4.1
 #
 
 [look]
 [file]
 auto_accept_chats = off
 auto_accept_files = off
+auto_accept_nicks = ""
 auto_rename = on
 auto_resume = on
 convert_spaces = on