diff options
-rw-r--r-- | alias | 2 | ||||
-rw-r--r-- | mutt/mailcap | 3 | ||||
-rw-r--r-- | mutt/muttrc.topo | 2 | ||||
-rw-r--r-- | vim/init/config.vim | 34 |
4 files changed, 37 insertions, 4 deletions
@@ -22,7 +22,7 @@ alias zsh.sourced='zsh -o SOURCE_TRACE' | |||
22 | 22 | ||
23 | # }}} | 23 | # }}} |
24 | # CUSTOM HELPER {{{ | 24 | # CUSTOM HELPER {{{ |
25 | cdh() { set -x; cd $SETTING_DIR/${*// //}; set +x; } | 25 | cdh() { cd $SETTING_DIR/${*// //}; } |
26 | alias chh="tig -C $SETTING_DIR status" | 26 | alias 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 @@ | |||
1 | text/html; surf '%s'; test=test -n "$DISPLAY"; copiousoutput; | 1 | text/html; w3m -I %{charset} -T text/html; copiousoutput; |
2 | # text/html; w3m -I %{charset} -T text/html; copiousoutput; | ||
3 | text/plain; surf '%s'; test=test -n "$DISPLAY"; needsterminal; | 2 | text/plain; surf '%s'; test=test -n "$DISPLAY"; needsterminal; |
4 | application/json; jq . %s | less -N; copiousoutput; | 3 | application/json; jq . %s | less -N; copiousoutput; |
5 | application/pdf; firefox '%s'; test=test -n "$DISPLAY"; needsterminal; | 4 | application/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 | |||
27 | set record = "+Sent" | 27 | set record = "+Sent" |
28 | set trash = "+Trash" | 28 | set trash = "+Trash" |
29 | set postponed = "+Drafts" | 29 | set postponed = "+Drafts" |
30 | set mask="!(tmp|new|cur|dovecot.*|\\..*)" | 30 | set mask="!(tmp|new|cur|dovecot.*|\\..*|maildirfolder)" |
31 | 31 | ||
32 | # Sidebar | 32 | # Sidebar |
33 | mailboxes -label '📠[i]' + \ | 33 | mailboxes -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() |