2e71d84847c9

A bunch of stuff that has been accumulating.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 12 Jan 2012 17:29:36 -0500
parents 2f979e8ca55a
children 824dfcda2807
branches/tags (none)
files .ctags .gitconfig .hgsub .hgsubstate vim/.vimrc vim/colors/molokai.vim weechat/weechat.conf

Changes

--- a/.ctags	Thu Jan 05 09:56:53 2012 -0500
+++ b/.ctags	Thu Jan 12 17:29:36 2012 -0500
@@ -1,10 +1,19 @@
---python-kinds=-iv
---langdef=js
---langmap=js:.js
---regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/,object/
---regex-js=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/,function/
---regex-js=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*([^)])/\1/,function/
---regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\[/\1/,array/
---regex-js=/([^= ]+)[ \t]*=[ \t]*[^"]'[^']*/\1/,string/
---regex-js=/([^= ]+)[ \t]*=[ \t]*[^']"[^"]*/\1/,string/
---exclude='**/ckeditor'
+--python-kinds=cfm
+--fields=-s
+
+--languages=-javascript
+--languages=-html
+
+--exclude=flowplayer
+--exclude=*.min.js
+--exclude=migrations
+--exclude=.hg
+--exclude=*demo*
+--exclude=.ropeproject
+--exclude=libs
+--exclude=build
+--exclude=dist
+--exclude=user-data
+--exclude=venv
+--exclude=static-cache
+--exclude=closure-library
--- a/.gitconfig	Thu Jan 05 09:56:53 2012 -0500
+++ b/.gitconfig	Thu Jan 12 17:29:36 2012 -0500
@@ -30,8 +30,7 @@
     fu = fetch upstream
     po = push origin
     lo = pull origin
-    moo = merge origin/ongoing
-    mont = merge origin/new-teams
+    mo = !git merge origin/`git branch --contains HEAD | tr -s ' ' | cut -d ' ' -f2`
 
 [push]
 	default = current
@@ -57,3 +56,5 @@
 [mergetool "threesome"]
     cmd = "mvim -f $BASE $LOCAL $REMOTE $MERGED -c 'ThreesomeInit'"
     trustExitCode = true
+[web]
+	browser = open
--- a/.hgsub	Thu Jan 05 09:56:53 2012 -0500
+++ b/.hgsub	Thu Jan 12 17:29:36 2012 -0500
@@ -27,5 +27,6 @@
 vim/bundle/nosecompiler = [git]git://github.com/olethanh/Vim-nosecompiler.git
 vim/bundle/rainbow-parentheses = [git]git://github.com/kien/rainbow_parentheses.vim.git
 vim/bundle/AnsiEsc.vim = [git]git://github.com/vim-scripts/AnsiEsc.vim.git
+vim/bundle/powerline = [git]git://github.com/Lokaltog/vim-powerline.git
 
 keymando/Plugins/abbrev = [git]git://github.com/keymando/abbrev.git
--- a/.hgsubstate	Thu Jan 05 09:56:53 2012 -0500
+++ b/.hgsubstate	Thu Jan 12 17:29:36 2012 -0500
@@ -12,6 +12,7 @@
 34e28b3f6f6d702ff2963b8196eccae9344ed4bc vim/bundle/markdown
 2dd198c6c412b4ddd361b43586b01981e8383239 vim/bundle/nerdtree
 b7889db57c90824ff5092da4fdde9e05689f24fa vim/bundle/nosecompiler
+4df0cdc009e590c1d6ec32a2a3c12ff8deeb6f25 vim/bundle/powerline
 67033ee4b9ee6d4916752da5e360b65ddf2fb525 vim/bundle/python-mode
 fa3563dda862c1dc46ddac32d8a9f939e9077379 vim/bundle/rainbow-parentheses
 fbc884de41302bb08b93b9d4d9c6921248a31a4c vim/bundle/slimv
--- a/vim/.vimrc	Thu Jan 05 09:56:53 2012 -0500
+++ b/vim/.vimrc	Thu Jan 12 17:29:36 2012 -0500
@@ -138,41 +138,6 @@
 " }}}
 
 " }}}
-" Status line ------------------------------------------------------------- {{{
-
-augroup ft_statuslinecolor
-    au!
-
-    au InsertEnter * hi StatusLine ctermfg=196 guifg=#FF3145
-    au InsertLeave * hi StatusLine ctermfg=130 guifg=#CD5907
-augroup END
-
-set statusline=%f    " Path.
-set statusline+=%m   " Modified flag.
-set statusline+=%r   " Readonly flag.
-set statusline+=%w   " Preview window flag.
-
-set statusline+=\    " Space.
-
-set statusline+=%#redbar#                " Highlight the following as a warning.
-set statusline+=%{SyntasticStatuslineFlag()} " Syntastic errors.
-set statusline+=%*                           " Reset highlighting.
-
-set statusline+=%=   " Right align.
-
-" File format, encoding and type.  Ex: "(unix/utf-8/python)"
-set statusline+=(
-set statusline+=%{&ff}                        " Format (unix/DOS).
-set statusline+=/
-set statusline+=%{strlen(&fenc)?&fenc:&enc}   " Encoding (utf-8).
-set statusline+=/
-set statusline+=%{&ft}                        " Type (python).
-set statusline+=)
-
-" Line and column position and counts.
-set statusline+=\ (line\ %l\/%L,\ col\ %03c)
-
-" }}}
 " Abbreviations ----------------------------------------------------------- {{{
 
 function! EatChar(pat)
@@ -277,8 +242,8 @@
 inoremap ˚ <esc>:lprevious<cr>zvzz
 nnoremap <m-Down> :cnext<cr>zvzz
 nnoremap <m-Up> :cprevious<cr>zvzz
+
 " }}}
-
 " Directional Keys {{{
 
 " It's 2011.
@@ -293,15 +258,16 @@
 noremap <leader>v <C-w>v
 
 " }}}
+" Highlight word {{{
 
-" Highlight word {{{
 nnoremap <silent> <leader>hh :execute 'match InterestingWord1 /\<<c-r><c-w>\>/'<cr>
 nnoremap <silent> <leader>h1 :execute 'match InterestingWord1 /\<<c-r><c-w>\>/'<cr>
 nnoremap <silent> <leader>h2 :execute '2match InterestingWord2 /\<<c-r><c-w>\>/'<cr>
 nnoremap <silent> <leader>h3 :execute '3match InterestingWord3 /\<<c-r><c-w>\>/'<cr>
-" }}}
 
+" }}}
 " Visual Mode */# from Scrooloose {{{
+
 function! s:VSetSearch()
   let temp = @@
   norm! gvy
@@ -311,6 +277,7 @@
 
 vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR><c-o>
 vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR><c-o>
+
 " }}}
 
 " }}}
@@ -566,6 +533,10 @@
 
     au FileType javascript setlocal foldmethod=marker
     au FileType javascript setlocal foldmarker={,}
+
+    " Make {<cr> insert a pair of brackets in such a way that the cursor is correctly
+    " positioned inside of them AND the following code doesn't get unfolded.
+    au Filetype javascript inoremap <buffer> {<cr> {}<left><cr><space><space><space><space>.<cr><esc>kA<bs>
 augroup END
 
 " }}}
@@ -801,14 +772,15 @@
 noremap æ '
 noremap ` <C-^>
 
+" Select (charwise) the contents of the current line, excluding indentation.
+" Great for pasting Python lines into REPLs.
+nnoremap vv ^vg_
+
 " Calculator
 inoremap <C-B> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
 
 " Better Completion
 set completeopt=longest,menuone,preview
-" inoremap <expr> <CR>  pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
-" inoremap <expr> <C-p> pumvisible() ? '<C-n>'  : '<C-n><C-r>=pumvisible() ? "\<lt>up>" : ""<CR>'
-" inoremap <expr> <C-n> pumvisible() ? '<C-n>'  : '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
 
 " Sudo to write
 cmap w!! w !sudo tee % >/dev/null
@@ -920,6 +892,15 @@
 nnoremap A<esc> <nop>
 
 " }}}
+" CTags  ------------------------------------------------------------------ {{{
+
+" For some reason ctags refuses to ignore Python variables, so I'll just hack
+" the tags file with sed and strip them out myself.
+"
+" Sigh.
+nnoremap <leader><cr> :silent !/usr/local/bin/ctags -R . && sed -i .bak -E -e '/^[^	]+	[^	]+.py	.+v$/d' tags<cr>
+
+" }}}
 " Plugin settings --------------------------------------------------------- {{{
 
 " Ack {{{
@@ -945,6 +926,7 @@
 let g:ctrlp_working_path_mode = 0
 let g:ctrlp_match_window_reversed = 1
 let g:ctrlp_split_window = 0
+let g:ctrlp_max_height = 20
 let g:ctrlp_prompt_mappings = {
 \ 'PrtSelectMove("j")':   ['<c-j>', '<down>', '<s-tab>'],
 \ 'PrtSelectMove("k")':   ['<c-k>', '<up>', '<tab>'],
@@ -952,6 +934,9 @@
 \ 'PrtHistory(1)':        ['<c-p>'],
 \ 'ToggleFocus()':        ['<c-tab>'],
 \ }
+let g:ctrlp_extensions = ['tag']
+
+nnoremap <leader>. :CtrlPTag<cr>
 
 " }}}
 " Easymotion {{{
@@ -989,6 +974,10 @@
     au BufNewFile,BufRead .git/index setlocal nolist
 augroup END
 
+" "Hub"
+nnoremap <leader>H :Gbrowse<cr>
+vnoremap <leader>H :Gbrowse<cr>
+
 " }}}
 " Gundo {{{
 
@@ -1051,6 +1040,11 @@
 let g:org_debug = 1
 
 " }}}
+" Powerline {{{
+
+let g:Powerline_symbols = 'fancy'
+
+" }}}
 " Python-Mode {{{
 
 let g:pymode_doc = 1
@@ -1208,8 +1202,8 @@
 " }}}
 " Next and Last {{{
 
-" Motion for "next/last object". For example, "din(" would go to the next "()" pair
-" and delete its contents.
+" Motion for "next/last object". For example, "din(" would go to the next "()"
+" pair and delete its contents.
 
 onoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>
 xnoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>
@@ -1236,6 +1230,14 @@
 endfunction
 
 " }}}
+" CamelCase {{{
+
+" onoremap c :<c-u>call search('[A-Z]')<cr>
+" xnoremap c :<c-u>call search('[A-Z]')<cr>
+" onoremap C :<c-u>call search('[A-Z]', 'b')<cr>
+" xnoremap C :<c-u>call search('[A-Z]', 'b')<cr>
+
+" }}}
 
 " }}}
 " Ack motions ------------------------------------------------------------- {{{
@@ -1388,7 +1390,7 @@
 " Environments (GUI/Console) ---------------------------------------------- {{{
 
 if has('gui_running')
-    set guifont=Menlo:h12
+    set guifont=Menlo\ Regular\ for\ Powerline:h12
 
     " Remove all the UI cruft
     set go-=T
--- a/vim/colors/molokai.vim	Thu Jan 05 09:56:53 2012 -0500
+++ b/vim/colors/molokai.vim	Thu Jan 12 17:29:36 2012 -0500
@@ -103,8 +103,8 @@
 hi Special         guifg=#66D9EF guibg=bg      gui=italic
 hi SpecialKey      guifg=#888A85               gui=italic
 hi Statement       guifg=#F92672               gui=bold
-hi StatusLine      guifg=#CD5907 guibg=fg
-hi StatusLineNC    guifg=#808080 guibg=#080808
+hi StatusLine      guifg=#262626 guibg=fg
+hi StatusLineNC    guifg=#262626 guibg=#080808
 hi StorageClass    guifg=#FD971F               gui=italic
 hi Structure       guifg=#66D9EF
 hi Tag             guifg=#F92672               gui=italic
--- a/weechat/weechat.conf	Thu Jan 05 09:56:53 2012 -0500
+++ b/weechat/weechat.conf	Thu Jan 12 17:29:36 2012 -0500
@@ -257,7 +257,7 @@
 ctrl-R = "/input search_text"
 ctrl-Sctrl-U = "/input set_unread"
 ctrl-T = "/input transpose_chars"
-ctrl-U = "/input delete_beginning_of_line"
+ctrl-U = "/url 1"
 ctrl-W = "/input delete_previous_word"
 ctrl-X = "/input switch_active_buffer"
 ctrl-Y = "/input clipboard_paste"