Skip to content

Commit

Permalink
Moar.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Sep 30, 2012
1 parent 596c88e commit deee914
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 39 deletions.
5 changes: 5 additions & 0 deletions bash_profile
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

shopt -s expand_aliases


# This file contains aliases and functions that duplicate some fish
# functionality, because Vim will use bash as its external command shell.

Expand All @@ -10,3 +13,5 @@ function a() {
ag $*
fi
}

export PATH=~/bin:~/lib/dotfiles/bin:/usr/local/share/python:$PATH
4 changes: 4 additions & 0 deletions bin/addcontact
Expand Up @@ -25,6 +25,10 @@ osascript -e "tell application \"Address Book\"" \
-e " set contactEmailLabel to firstEmailParam" \
-e " set contactEmail to secondEmailParam" \
-e " end if" \
-e " set bracketOffset to (offset of \"<\" in contactEmail)" \
-e " if (bracketOffset is not equal to 0) then" \
-e " set contactEmail to text 2 thru -2 of contactEmail" \
-e " end if" \
-e " if (contactEmailLabel is equal to \"\") then" \
-e " set contactEmailLabel to \"Home\"" \
-e " end if" \
Expand Down
1 change: 1 addition & 0 deletions bin/mutt-notmuch-py
4 changes: 2 additions & 2 deletions fish/config.fish
Expand Up @@ -30,7 +30,7 @@ alias spotlight-on 'sudo mdutil -a -i on ; and sudo mv /System/Library/CoreServi
alias spotlight-wat 'sudo fs_usage -w -f filesys mdworker | grep "open"'

set MUTT_BIN (which mutt)
alias mutt "bash -c 'cd ~/Desktop; $MUTT_BIN'"
alias mutt "bash --login -c 'cd ~/Desktop; $MUTT_BIN'"

alias h 'hg'
alias g 'git'
Expand Down Expand Up @@ -166,7 +166,7 @@ function virtualenv_prompt
end

function hg_prompt
# hg prompt --angle-brackets $hg_promptstring 2>/dev/null
hg prompt --angle-brackets $hg_promptstring 2>/dev/null
end

function git_prompt
Expand Down
Binary file modified moom/com.manytricks.Moom.plist
Binary file not shown.
1 change: 1 addition & 0 deletions mutt/mailcap
Expand Up @@ -18,6 +18,7 @@ application/vnd.ms-excel; ~/.mutt/view_attachment.sh %s
application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app'

# Images
image/jpg; ~/.mutt/view_attachment.sh %s jpg
image/jpeg; ~/.mutt/view_attachment.sh %s jpg
image/pjpeg; ~/.mutt/view_attachment.sh %s jpg
image/png; ~/.mutt/view_attachment.sh %s png
Expand Down
51 changes: 22 additions & 29 deletions mutt/muttrc
Expand Up @@ -125,6 +125,7 @@ mailboxes +steve-stevelosh.com/INBOX \
+steve-stevelosh.com/archive \
+steve-stevelosh.com/sent \
+steve-stevelosh.com/drafts \
+temporary/search \

# Other special folders.
set mbox = "+steve-stevelosh.com/archive"
Expand All @@ -144,46 +145,23 @@ unset record
# }}}
# Key Bindings {{{

# Unbind Stupid Keys {{{

bind index,pager \# noop
bind index i noop
bind index w noop

# }}}
# Pager {{{

bind pager i exit
bind pager / search
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom
bind pager R group-reply

macro pager \Cu "|urlview<enter>" "call urlview to open links"
macro pager s "<pipe-message>cat > ~/Desktop/" "save message as"

# }}}
# Index {{{

bind index R group-reply
bind index \# noop
bind index R group-reply
bind index <tab> sync-mailbox
bind index k previous-entry
bind index j next-entry
bind index gg first-entry
bind index G last-entry
bind index p recall-message
bind index <space> collapse-thread
bind index N search-opposite
macro index s "<pipe-message>cat > ~/Desktop/" "save message as"

# Mark all as read
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"

# Quickly change date formats
macro index <esc>f ":set date_format = \"%m/%d\"<enter>" "short date format"
macro index <esc>F ":set date_format = \"%m/%d at %I:%M %P\"<enter>" "long date format"

# Sync email
macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail"
macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"
Expand All @@ -196,12 +174,27 @@ macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
macro index \' "<change-folder>+steve-stevelosh.com/INBOX<enter>" "go to stevelosh/INBOX"
macro index \" "<change-folder>+steve-stevelosh.com/archive<enter>" "go to stevelosh/archive"

# Just use notmuch for everything
macro index / "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | tr '+' '.' | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
# Search with notmuch
macro index S "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch-py -G ~/.mail/temporary/search<enter><change-folder-readonly>+temporary/search<enter>" "search mail (using notmuch)"

# Unlimit aka show [a]ll
# Unlimit (show [a]ll)
macro index a "<limit>all\n" "show all messages (undo limit)"

# }}}
# Pager {{{

bind pager \# noop
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom

bind pager R group-reply
bind pager N search-opposite

macro pager \Cu "|urlview<enter>" "call urlview to open links"
macro pager s "<pipe-message>cat > ~/Desktop/" "save message as"

# }}}
# Compose {{{

Expand Down
4 changes: 4 additions & 0 deletions vim/custom-dictionary.utf-8.add
Expand Up @@ -87,3 +87,7 @@ signoffs
SubtitleLanguage
SubtitleLanguages
signoff
offline
bikeshed
bikesheds
inbox
10 changes: 2 additions & 8 deletions vim/vimrc
Expand Up @@ -760,12 +760,6 @@ augroup ft_html
" Use <localleader>t to fold the current templatetag.
au FileType html,jinja,htmldjango nmap <buffer> <localleader>t viikojozf
" Smarter pasting
au FileType html,jinja,htmldjango nnoremap <buffer> p :<C-U>YRPaste 'p'<CR>v`]=`]
au FileType html,jinja,htmldjango nnoremap <buffer> P :<C-U>YRPaste 'P'<CR>v`]=`]
au FileType html,jinja,htmldjango nnoremap <buffer> π :<C-U>YRPaste 'p'<CR>
au FileType html,jinja,htmldjango nnoremap <buffer> :<C-U>YRPaste 'P'<CR>
" Indent tag
au FileType html,jinja,htmldjango nnoremap <buffer> <localleader>= Vat=
Expand Down Expand Up @@ -956,8 +950,8 @@ augroup END

augroup ft_steveloshcom
au!
au BufRead,BufNewFile */stevelosh/content/blog/20*/*/*.html set ft=markdown
au BufRead,BufNewFile */stevelosh/content/projects/*.html set ft=markdown
au BufRead,BufNewFile */stevelosh/content/blog/20*/*/*.html set ft=markdown spell
au BufRead,BufNewFile */stevelosh/content/projects/*.html set ft=markdown spell
augroup END

" }}}
Expand Down

0 comments on commit deee914

Please sign in to comment.