From ed9a67ed6dbd408032f51f34a471362264c47e1c Mon Sep 17 00:00:00 2001 From: Future is FOSS <79040025+futureisfoss@users.noreply.github.com> Date: Sat, 4 Dec 2021 13:47:35 +0000 Subject: [PATCH 1/2] follow symlinks when detecting filetype in lf (#1052) fix bug in lf where symlinked files don't open in the expected program --- .config/lf/lfrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index ebe16fb..9d6ceba 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -14,7 +14,7 @@ $lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" # cmds/functions cmd open ${{ - case $(file --mime-type $f -b) in + case $(file --mime-type "$(readlink -f $f)" -b) in image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; text/*) $EDITOR $fx;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; From a01c9f967b8801b9917be0f270f1cf9b9655e770 Mon Sep 17 00:00:00 2001 From: Fabian <58243358+FabianPaci@users.noreply.github.com> Date: Tue, 21 Dec 2021 02:11:17 +1100 Subject: [PATCH 2/2] Resets cursor position on file save (Issue #1040) (#1057) * Resets cursor position on file save (Issue #1040) * Resets cursor pos on save. (line and column) --- .config/nvim/init.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f93eed4..e32b8eb 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -111,10 +111,12 @@ set noshowcmd autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x! autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! -" Automatically deletes all trailing whitespace and newlines at end of file on save. +" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position + autocmd BufWritePre * let currPos = getpos(".") autocmd BufWritePre * %s/\s\+$//e autocmd BufWritePre * %s/\n\+\%$//e autocmd BufWritePre *.[ch] %s/\%$/\r/e + autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) " When shortcut files are updated, renew bash and ranger configs with new material: autocmd BufWritePost bm-files,bm-dirs !shortcuts