aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias2
-rw-r--r--mutt/mailcap3
-rw-r--r--mutt/muttrc.topo2
-rw-r--r--vim/init/config.vim34
4 files changed, 37 insertions, 4 deletions
diff --git a/alias b/alias
index 1ad9435..9765714 100644
--- a/alias
+++ b/alias
@@ -22,7 +22,7 @@ alias zsh.sourced='zsh -o SOURCE_TRACE'
22 22
23# }}} 23# }}}
24# CUSTOM HELPER {{{ 24# CUSTOM HELPER {{{
25cdh() { set -x; cd $SETTING_DIR/${*// //}; set +x; } 25cdh() { cd $SETTING_DIR/${*// //}; }
26alias chh="tig -C $SETTING_DIR status" 26alias chh="tig -C $SETTING_DIR status"
27# }}} 27# }}}
28# Text Encode/Decode{{{ 28# Text Encode/Decode{{{
diff --git a/mutt/mailcap b/mutt/mailcap
index 23eadba..2899a40 100644
--- a/mutt/mailcap
+++ b/mutt/mailcap
@@ -1,5 +1,4 @@
1text/html; surf '%s'; test=test -n "$DISPLAY"; copiousoutput; 1text/html; w3m -I %{charset} -T text/html; copiousoutput;
2# text/html; w3m -I %{charset} -T text/html; copiousoutput;
3text/plain; surf '%s'; test=test -n "$DISPLAY"; needsterminal; 2text/plain; surf '%s'; test=test -n "$DISPLAY"; needsterminal;
4application/json; jq . %s | less -N; copiousoutput; 3application/json; jq . %s | less -N; copiousoutput;
5application/pdf; firefox '%s'; test=test -n "$DISPLAY"; needsterminal; 4application/pdf; firefox '%s'; test=test -n "$DISPLAY"; needsterminal;
diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo
index 48e2b10..3d2a779 100644
--- a/mutt/muttrc.topo
+++ b/mutt/muttrc.topo
@@ -27,7 +27,7 @@ set move = yes
27set record = "+Sent" 27set record = "+Sent"
28set trash = "+Trash" 28set trash = "+Trash"
29set postponed = "+Drafts" 29set postponed = "+Drafts"
30set mask="!(tmp|new|cur|dovecot.*|\\..*)" 30set mask="!(tmp|new|cur|dovecot.*|\\..*|maildirfolder)"
31 31
32# Sidebar 32# Sidebar
33mailboxes -label '📭 [i]' + \ 33mailboxes -label '📭 [i]' + \
diff --git a/vim/init/config.vim b/vim/init/config.vim
index 680a5fc..f882f0c 100644
--- a/vim/init/config.vim
+++ b/vim/init/config.vim
@@ -43,6 +43,40 @@ augroup InitFileTypes
43 autocmd FileType quickfix setlocal nonumber 43 autocmd FileType quickfix setlocal nonumber
44 44
45 " }}} 45 " }}}
46 " Shell {{{
47
48 ""au FileType bash call InitBash()
49 ""function! InitBash()
50 "" setlocal foldexpr=ShellLevel() foldmethod=expr
51 ""endfunc
52
53 ""function! ShellLevel()
54 "" let line = getline(v:lnum)
55 "" let hash_num = matchstr(line, '^\zs\s*#\ze[^!]')
56 "" if !empty(hash_num)
57 "" let foldlevel = (len(hash_num) - 1)/2 + 1
58 "" return '>'.foldlevel
59 "" else
60 "" return "="
61 "" endif
62 ""endfunc
63 ""function! CountSubfolds(start, end)
64 "" let count = 0
65 "" let current_level = foldlevel(a:start)
66 "" for lnum in range(a:start + 1, a:end + 1)
67 "" if foldlevel(lnum) > current_level
68 "" let count += 1
69 "" endif
70 "" endfor
71 "" return count
72 ""endfunction
73
74 ""function! MyFoldText()
75 "" let lines = v:foldend - v:foldstart + 1
76 "" let subfolds = CountSubfolds(v:foldstart, v:foldend)
77 "" return printf('%d lines, %d subfolds', lines, subfolds)
78 ""endfunction
79 " }}}
46 " Markdown {{{ 80 " Markdown {{{
47 81
48 au FileType markdown call InitMarkdownFile() 82 au FileType markdown call InitMarkdownFile()