e39d33e4222c

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 23 Sep 2019 11:50:16 -0400
parents b6c6f989dbc3
children 9af48fd636c1 6554a615d459 10792a9107fd
branches/tags (none)
files bin/htmlify-email bin/mangle-signature dunstrc mutt/muttrc vim/ftplugin/html.vim vim/vimrc

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/htmlify-email	Mon Sep 23 11:50:16 2019 -0400
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+mangle-signature | pandoc -r markdown-blank_before_blockquote -w html -o ~/.mutt/temp/neomutt-alternative.html
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/mangle-signature	Mon Sep 23 11:50:16 2019 -0400
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+cat
--- a/dunstrc	Thu Sep 19 11:07:32 2019 -0400
+++ b/dunstrc	Mon Sep 23 11:50:16 2019 -0400
@@ -21,7 +21,7 @@
     browser = xdg-open
 
 [shortcuts]
-    close_all = ctrl+Return
+    close_all = ctrl+BackSpace
 
 [frame]
     width = 3
--- a/mutt/muttrc	Thu Sep 19 11:07:32 2019 -0400
+++ b/mutt/muttrc	Mon Sep 23 11:50:16 2019 -0400
@@ -222,7 +222,7 @@
 bind compose p postpone-message
 bind compose P pgp-menu
 
-macro compose H "| pandoc -r markdown-blank_before_blockquote -w html -o ~/.mutt/temp/neomutt-alternative.html<enter><attach-file>~/.mutt/temp/neomutt-alternative.html<enter><tag-entry><previous-entry><tag-entry><group-alternatives>"
+macro compose H "| htmlify-email<enter><attach-file>~/.mutt/temp/neomutt-alternative.html<enter><tag-entry><previous-entry><tag-entry><group-alternatives>"
 
 # }}}
 # Attachment {{{
--- a/vim/ftplugin/html.vim	Thu Sep 19 11:07:32 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-" Vim plugin for showing matching html tags.
-" Maintainer:  Greg Sexton <gregsexton@gmail.com>
-" Credits: Bram Moolenar and the 'matchparen' plugin from which this draws heavily.
-
-if exists("b:did_ftplugin")
-    finish
-endif
-
-augroup matchhtmlparen
-  autocmd! CursorMoved,CursorMovedI,WinEnter <buffer> call s:Highlight_Matching_Pair()
-augroup END
-
-fu! s:Highlight_Matching_Pair()
-    " Remove any previous match.
-    if exists('w:tag_hl_on') && w:tag_hl_on
-        2match none
-        let w:tag_hl_on = 0
-    endif
-
-    " Avoid that we remove the popup menu.
-    " Return when there are no colors (looks like the cursor jumps).
-    if pumvisible() || (&t_Co < 8 && !has("gui_running"))
-        return
-    endif
-
-    "get html tag under cursor
-    let tagname = s:GetCurrentCursorTag()
-    if tagname == ""|return|endif
-
-    if tagname[0] == '/'
-        let position = s:SearchForMatchingTag(tagname[1:], 0)
-    else
-        let position = s:SearchForMatchingTag(tagname, 1)
-    endif
-    call s:HighlightTagAtPosition(position)
-endfu
-
-fu! s:GetCurrentCursorTag()
-    "returns the tag under the cursor, includes the '/' if on a closing tag.
-
-    let c_col  = col('.')
-    let matched = matchstr(getline('.'), '\(<[^<>]*\%'.c_col.'c.\{-}>\)\|\(\%'.c_col.'c<.\{-}>\)')
-    if matched == ""
-        return matched
-    endif
-
-    let tagname = matchstr(matched, '<\zs.\{-}\ze[ >]')
-    return tagname
-endfu
-
-fu! s:SearchForMatchingTag(tagname, forwards)
-    "returns the position of a matching tag or [0 0]
-
-    let starttag = '<'.a:tagname.'.\{-}>'
-    let midtag = ''
-    let endtag = '</'.a:tagname.'.\{-}>'.(a:forwards?'':'\zs')
-    let flags = 'nW'.(a:forwards?'':'b')
-
-    " When not in a string or comment ignore matches inside them.
-    let skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
-                \ '=~?  "htmlString\\|htmlCommentPart"'
-    execute 'if' skip '| let skip = 0 | endif'
-
-    " Limit the search to lines visible in the window.
-    let stopline = a:forwards ? line('w$') : line('w0')
-    let timeout = 300
-
-    return searchpairpos(starttag, midtag, endtag, flags, skip, stopline, timeout)
-endfu
-
-fu! s:HighlightTagAtPosition(position)
-    if a:position == [0, 0]
-        return
-    endif
-
-    let [m_lnum, m_col] = a:position
-    exe '2match MatchParen /\(\%' . m_lnum . 'l\%' . m_col .  'c<\zs.\{-}\ze[ >]\)\|'
-                \ .'\(\%' . line('.') . 'l\%' . col('.') .  'c<\zs.\{-}\ze[ >]\)\|'
-                \ .'\(\%' . line('.') . 'l<\zs[^<> ]*\%' . col('.') . 'c.\{-}\ze[ >]\)\|'
-                \ .'\(\%' . line('.') . 'l<\zs[^<>]\{-}\ze\s[^<>]*\%' . col('.') . 'c.\{-}>\)/'
-    let w:tag_hl_on = 1
-endfu
--- a/vim/vimrc	Thu Sep 19 11:07:32 2019 -0400
+++ b/vim/vimrc	Mon Sep 23 11:50:16 2019 -0400
@@ -1691,6 +1691,10 @@
     au Filetype markdown nnoremap <buffer> <localleader>2 yypVr-:redraw<cr>
     au Filetype markdown nnoremap <buffer> <localleader>3 mzI###<space><esc>`zllll
     au Filetype markdown nnoremap <buffer> <localleader>4 mzI####<space><esc>`zlllll
+
+    au Filetype markdown inoremap <buffer> <c-cr> <cr><esc>mz? *\*?e<cr>"zy0:noh<cr>`z"zpA* <esc>a
+    au Filetype markdown inoremap <buffer> <s-tab> <esc>mz0xx`za
+    au Filetype markdown inoremap <buffer> <c-tab> <esc>mzI  <esc>`zlla
 augroup END
 
 " }}}