e31391abee4c

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 27 Oct 2010 09:25:52 -0400
parents f71dcc350ee4 (current diff) a897edaa3e97 (diff)
children 3bfc11be905d
branches/tags (none)
files vim/.vimrc

Changes

--- a/.hgignore	Wed Oct 27 09:22:56 2010 -0400
+++ b/.hgignore	Wed Oct 27 09:25:52 2010 -0400
@@ -8,5 +8,9 @@
 tags
 config/bcvi
 *.un~
+
 vim/tmp
 vim/bundle/gundo
+
+mutt/temp
+mutt/cache
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.offlineimaprc	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,20 @@
+[general]
+ui = TTY.TTYUI
+accounts = SteveLosh
+pythonfile=~/.mutt/offlineimap.py
+
+[Account SteveLosh]
+localrepository = SteveLosh-Local
+remoterepository = SteveLosh-Remote
+
+[Repository SteveLosh-Local]
+type = Maildir
+localfolders = ~/.mail/steve-stevelosh.com
+
+[Repository SteveLosh-Remote]
+type = Gmail
+remoteuser = steve@stevelosh.com
+remotepasseval = get_keychain_pass(account="steve@stevelosh.com", server="imap.gmail.com")
+realdelete = no
+nametrans = lambda folder: re.sub('.*Spam$', 'spam', re.sub('.*Drafts$', 'drafts', re.sub('.*Sent Mail$', 'sent', re.sub('.*Starred$', 'flagged', re.sub('.*Trash$', 'trash', re.sub('.*All Mail$', 'archive', folder))))))
+
--- a/.zshrc	Wed Oct 27 09:22:56 2010 -0400
+++ b/.zshrc	Wed Oct 27 09:25:52 2010 -0400
@@ -19,6 +19,7 @@
 export PATH="${PATH}:/usr/local/Cellar/PyPi/3.6/bin"
 export PATH="${PATH}:/usr/local/Cellar/python/2.6.4/bin"
 export PATH="${PATH}:/usr/local/Cellar/python/2.6.5/bin"
+export PATH="${PATH}:/usr/local/Cellar/python/2.7/bin"
 export WORKON_HOME="${HOME}/lib/virtualenvs"
 export GREP_OPTIONS='--color=auto'
 export HISTSIZE=1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mutt/colors.muttrc	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,56 @@
+# set default
+color normal     white         default
+
+# main colors
+color status     green         default
+color indicator  yellow        default
+color tree       blue          default
+color error      red     default
+color message    yellow  default
+
+# uncolor certain messages
+uncolor index "~P"
+uncolor index "~N ~u"
+uncolor index "~N !~u"
+uncolor index "~T"
+uncolor index "~D"
+
+# and recolor them appropriately
+color index      brightblack   default "~P"
+color index      brightcyan    default "~N ~u"  # new ML mail
+color index      brightyellow  default "~N !~u" # new non-ML mail
+color index      brightgreen   default "~T"
+color index      brightred     default "~D"
+
+# set up the headers
+color header     brightyellow  default "^from:"
+color header     yellow        default "^to:"
+color header     yellow        default "^cc:"
+color header     blue          default "^date:"
+color header     brightblue    default "^subject:"
+
+# message bodies
+color attachment brightblack   default
+color search     red           brightblack
+color signature  cyan          default
+color tilde      blue          default
+
+# urls
+color body       brightblue    default "(^|<| )mailto:[^ ]+@[^ ]( |>|$)"
+color body       brightblue    default "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)"
+
+# *bold*, _underline_, and /italic/
+color body       brightcyan    default "(^| )\\*[^*]+\\*( |$)"
+color body       brightcyan    default "(^| )_[^_]+_( |$)"
+color body       brightcyan    default "(^| )/[^/]+/( |$)"
+
+# quote blocks
+color quoted     magenta       default
+color quoted1    cyan          default
+color quoted2    green         default
+color quoted3    magenta       default
+color quoted4    cyan          default
+color quoted5    green         default
+color quoted6    magenta       default
+color quoted7    cyan          default
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mutt/muttrc	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,116 @@
+# directories and commands
+set alias_file          = ~/.mutt/alias                         # alias file
+set header_cache        = ~/.mutt/cache/headers                 # where to store headers        
+set message_cachedir    = ~/.mutt/cache/bodies                  # where to store bodies
+set certificate_file    = ~/.mutt/certificates                  # where to store certs
+set mailcap_path        = ~/.mutt/mailcap                       # entrys for filetypes
+set signature           = ~/.mutt/sig                           # my signature file
+set tmpdir              = ~/.mutt/temp                          # where to keep temp files
+set editor              = "mvim -f +/^$"                        # use vim and skip to first blank line
+set print_command       = /usr/bin/enscript                     # print with enscript
+
+# main options
+set mbox_type           = Maildir                               # mailbox type
+set folder              = ~/.mail                               # mailbox location
+set spoolfile           = "+steve-stevelosh.com/INBOX"          # GMail is default inbox
+set timeout             = 3                                     # idle time before scanning
+set mail_check          = 0                                     # minimum time between scans
+set sort_alias          = alias                                 # sort alias file by alias
+set reverse_alias                                               # show names from alias file in index
+unset move                                                      # gmail does that
+set delete                                                      # don't ask, just do
+unset confirmappend                                             # don't ask, just do!
+set quit                                                        # don't ask, just do!!
+unset mark_old                                                  # read/new is good enough for me
+set beep_new                                                    # bell on new mails
+set pipe_decode                                                 # strip headers and eval mimes when piping
+set thorough_search                                             # strip headers and eval mimes before searching
+
+# index options
+set sort                = threads                               # like gmail 
+set sort_aux            = reverse-last-date-received            # like gmail
+set uncollapse_jump                                             # don't collapse on an unread message 
+set sort_re                                                     # thread based on regex
+set reply_regexp        = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
+
+# pager options
+set pager_index_lines   = 10                                    # number of index lines to show 
+set pager_context       = 5                                     # number of context lines to show
+set pager_stop                                                  # don't go to next message automatically
+set menu_scroll                                                 # scroll in menus 
+set smart_wrap                                                  # don't split words
+set tilde                                                       # show tildes like in vim
+unset markers                                                   # no ugly plus signs
+auto_view text/html                                             # view html automatically
+alternative_order text/plain text/enriched text/html            # save html for last
+set quote_regexp        = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
+
+# formats
+set date_format         = "%m/%d/%y at %I:%M%P"
+set index_format        = "[%Z]  %D  %-20.20F  %s"
+set status_format       = "-%r- %v ---[ Folder: %f, Msgs: %m%?n? New: %n?%?d? Del: %d?%?t? Tag: %t?%?l? %l? ]%?p?---- .: %p waiting to send :. ?--%>- (%P) ---"
+set alias_format        = "%4n %t %-20a  %r"
+
+# composing mail
+set realname            = "Steve Losh"                          # who am i?
+set envelope_from                                               # which from?
+set sig_dashes                                                  # dashes before my sig... sweet
+set edit_headers                                                # show headers when composing
+set fast_reply                                                  # skip to compose when replying
+set sendmail_wait       = -1                                    # don't wait for sending... to complete
+set askcc                                                       # ask for CC:
+set fcc_attach                                                  # save attachments with the body
+unset mime_forward                                              # forward attachments as part of body
+set forward_format      = "Fwd: %s"                             # format for subject when forwarding
+set forward_decode                                              # decode when forwarding
+set attribution         = "On %d, %n wrote:"                    # set the attribution
+set reply_to                                                    # reply to Reply to: field
+set reverse_name                                                # reply as whomever it was to
+set include                                                     # include message in replies
+set forward_quote                                               # include message in forwards
+
+# headers to show
+ignore *                                                        # ignore all headers
+unignore from: to: cc: date: subject:                           # show only these
+hdr_order from: to: cc: date: subject:                          # and in this order
+
+# boxes
+mailboxes +steve-stevelosh.com/INBOX +steve-stevelosh.com/archive +steve-stevelosh.com/sent +steve-stevelosh.com/drafts +steve-stevelosh.com/spam +steve-stevelosh.com/trash
+
+# always sourced
+#source $alias_file                                              # required for functionality
+source ~/.mutt/colors.muttrc                                    # source colors file
+source ~/.mutt/steve-stevelosh.com.muttrc                                     # source gmail as default
+source ~/.mutt/sidebar.muttrc                                   # any muttng options are here
+
+# account specific sources
+folder-hook steve-stevelosh.com/* source ~/.mutt/steve-stevelosh.com.muttrc
+
+# these just give me headaches
+bind index,pager \#     noop
+bind index i            noop
+
+# bindings
+bind pager i            exit
+bind pager /            search
+bind pager <up>         previous-line
+bind pager <down>       next-line
+bind pager k            previous-line
+bind pager j            next-line
+bind pager gg           top
+bind pager G            bottom
+bind index gg           first-entry
+bind index G            last-entry
+bind pager K            previous-undeleted
+bind pager J            next-undeleted
+bind index K            previous-unread
+bind index J            next-unread
+bind index,pager R      group-reply
+
+# macros
+macro index \Cr "<tag-prefix><clear-flag>N" "mark tagged messages as read"
+macro index B   "<limit>~b "                "search message bodies"
+macro index I   "<change-folder>!<enter>"   "go to Inbox"
+
+# save a decoded copy in ~
+macro index P   "<pipe-message>cat > ~/Desktop/"    "save message as"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mutt/offlineimap.py	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+import re, commands
+def get_keychain_pass(account=None, server=None):
+    params = {
+        'security': '/usr/bin/security',
+        'command': 'find-internet-password',
+        'account': account,
+        'server': server
+    }
+    command = "%(security)s %(command)s -g -a %(account)s -s %(server)s" % params
+    outtext = commands.getoutput(command)
+    return re.match(r'password: "(.*)"', outtext).group(1)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mutt/sidebar.muttrc	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,17 @@
+###
+# options specific to mutt's sidebar patch
+###
+
+# settings
+  set sidebar_delim       = '  │'
+  set sidebar_visible     = yes
+  set sidebar_width       = 20
+
+# colors
+color sidebar_new cyan default
+
+# bindings
+bind index,pager \CN    sidebar-next
+bind index,pager \CP    sidebar-prev
+bind index,pager \CO    sidebar-open
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mutt/steve-stevelosh.com.muttrc	Wed Oct 27 09:25:52 2010 -0400
@@ -0,0 +1,13 @@
+color status green default
+
+set from      = "steve@stevelosh.com"
+set sendmail  = "/usr/local/bin/msmtp -a stevelosh"
+set mbox      = "+steve-stevelosh.com/archive"
+unset record
+set postponed = "+steve-stevelosh.com/drafts"
+
+macro index E "<change-folder>+steve-stevelosh.com/archive<enter><limit>~B " "search everything"
+macro index A "<save-message>+steve-stevelosh.com/archive<enter>"            "move message to the archive"
+macro index D "<save-message>+steve-stevelosh.com/trash<enter>"              "move message to the trash"
+macro index S "<save-message>+steve-stevelosh.com/spam<enter>"               "mark message as spam"
+
--- a/vim/.vimrc	Wed Oct 27 09:22:56 2010 -0400
+++ b/vim/.vimrc	Wed Oct 27 09:25:52 2010 -0400
@@ -30,6 +30,7 @@
 set relativenumber
 set laststatus=2
 set undofile
+set undoreload=10000
 
 " Backups
 set backupdir=~/.vim/tmp/backup// " backups
@@ -130,18 +131,14 @@
 au BufNewFile,BufRead *.m*down nnoremap <leader>2 yypVr-
 au BufNewFile,BufRead *.m*down nnoremap <leader>3 I### <ESC>
 
+au BufNewFile,BufRead *.vim set foldmethod=marker
+
 " Sort CSS
 map <leader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:noh<CR>
 
 " Clean whitespace
 map <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
 
-" Exuberant ctags!
-let Tlist_Ctags_Cmd = "/usr/local/bin/ctags"
-let Tlist_WinWidth = 50
-map <F4> :TlistToggle<cr>
-map <F5> :!/usr/local/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --exclude='@.ctagsignore' .<cr>
-
 " Ack
 map <leader>a :Ack 
 
@@ -276,6 +273,7 @@
 
 " Gundo
 nnoremap U :GundoToggle<CR>
+let g:gundo_debug = 1
 
 " Next
 nnoremap cinb f(ci(