Commits

Steve Losh committed 640ad19

moare

Comments (0)

Files changed (6)

 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
 949adf73ae1a82c48cd951677c055bd38a30af99 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
 2dee007ddae8156735cbae7f0cd4e0a24ba7287b vim/bundle/tslime

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; }
 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
 endfunction
 
 " }}}
+" YouCompleteMe {{{
+
+let g:ycm_min_num_of_chars_for_completion = 4
+
+" }}}
 
 " }}}
 " Text objects ------------------------------------------------------------ {{{
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.