summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2019-10-03 11:51:06 +0100
committerUrbain Vaes <urbain@vaes.uk>2019-10-03 11:51:06 +0100
commit8f97de03651a7070cae444e9ae13c9f660119bd3 (patch)
tree36c47af6dea8b9d75c419e871eaf95fda037f272
parent45ceae0de2b01480ab2502c4935c62aa681789e9 (diff)
Improve mutt attachment script
-rwxr-xr-xbin/.local/bin/mutt_attach20
-rw-r--r--vim/.vimrc7
2 files changed, 23 insertions, 4 deletions
diff --git a/bin/.local/bin/mutt_attach b/bin/.local/bin/mutt_attach
index e5ddbad..4a14dbc 100755
--- a/bin/.local/bin/mutt_attach
+++ b/bin/.local/bin/mutt_attach
@@ -1,7 +1,19 @@
#!/usr/bin/env bash
-files=$(vifm "$HOME" --choose-files -)
+# File in which to store the list of filenames to attach
+tmp=$(mktemp)
-for file in $files; do
- tmux send-keys -t email.0 "a$file "
-done
+vifm "$HOME" --choose-files "$tmp"
+# ranger "$HOME" --choosefiles="$tmp"
+
+while IFS="" read -r file; do
+
+ # Workaround for filenames that contain spaces
+ if [[ "$file" = *" "* ]]; then
+ file_no_space=/tmp/$(basename "$file" | sed 's/ /_/g')
+ ln -s -f "$file" "$file_no_space"
+ file="$file_no_space"
+ fi
+
+ tmux send-keys -t email:Email.0 -l "a$file ";
+done < "$tmp"
diff --git a/vim/.vimrc b/vim/.vimrc
index 4efc91f..f715c13 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -234,6 +234,13 @@ let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=2
let g:vimtex_compiler_progname='nvr'
let g:vimtex_syntax_enabled=1
+let g:vimtex_fold_types = {
+ \ 'preamble' : {'enabled' : 0},
+ \ 'envs' : {
+ \ 'blacklist' : ['lemma', 'proposition', 'theorem', 'equation'],
+ \ 'whitelist' : ['proof'],
+ \ },
+ \}
" Pilot
let g:pilot_boundary='ignore'