Vifm: list ignored files with fzf
This commit is contained in:
parent
a6854c2227
commit
254e31bff0
4 changed files with 15 additions and 6 deletions
|
@ -44,6 +44,11 @@ fi
|
|||
# Stop brew from upgrading all formula when installing something
|
||||
export HOMEBREW_NO_INSTALL_UPGRADE=1
|
||||
|
||||
# Node Version Manager ==============================================
|
||||
if [[ -f /usr/share/nvm/init-nvm.sh ]]; then
|
||||
source /usr/share/nvm/init-nvm.sh
|
||||
fi
|
||||
|
||||
# Swayland ==========================================================
|
||||
if [[ "$(uname -s)" == "Linux" ]] && pidof sway &>/dev/null; then
|
||||
export WAYLAND_DISPLAY=wayland-1
|
||||
|
|
|
@ -65,6 +65,10 @@ has_tmux () {
|
|||
command -v tmux &> /dev/null
|
||||
}
|
||||
|
||||
not_in_vim () {
|
||||
[[ -z "$VIMRUNTIME" ]]
|
||||
}
|
||||
|
||||
set_starting_dir () {
|
||||
if [[ "$PWD" == "$HOME" && -d ~/safe && "$IS_VIFM_NEST" != 'T' ]]; then
|
||||
cd ~/safe
|
||||
|
@ -86,7 +90,7 @@ printf '\n'
|
|||
set_starting_dir
|
||||
|
||||
# Attach ssh connections to a dedicated tmux session ====
|
||||
if is_ssh_connection && has_tmux; then
|
||||
if is_ssh_connection && has_tmux && not_in_vim; then
|
||||
tmux new-session -As ssh_tmux 2>&1 \
|
||||
| grep -v 'sessions should be nested with care' # We don't care
|
||||
fi
|
||||
|
|
|
@ -16,7 +16,7 @@ requires_gui_error() {
|
|||
}
|
||||
|
||||
open_pdf() {
|
||||
zathura "$1" &>/dev/null &
|
||||
zathura "$(sed 's#\\##g' <<<"$1")" &>/dev/null &
|
||||
}
|
||||
|
||||
open_image() {
|
||||
|
@ -54,7 +54,7 @@ open_file() {
|
|||
requires_gui_error
|
||||
fi
|
||||
;;
|
||||
avif|icns|jpeg|jpg|png|webp)
|
||||
avif|icns|jpeg|jpg|png|webp|svg)
|
||||
if [[ $is_gui ]]; then
|
||||
open_image "$1"
|
||||
else
|
||||
|
|
|
@ -278,9 +278,9 @@ command! fdeditfiles
|
|||
|
||||
command! fdmvcursor
|
||||
\ :if $TMUX != '' && &columns > 90 && &lines >= 30
|
||||
\ | exe 'goto "'.system('fd --maxdepth=1 -HE ''.git'' . | fzf-tmux -p 90,30').'"' | navigateIfDir
|
||||
\ | exe 'goto "'.system('fd --maxdepth=1 -HIE ''.git'' . | fzf-tmux -p 90,30').'"' | navigateIfDir
|
||||
\ | else
|
||||
\ | exe 'goto "'.term('fd --maxdepth=1 -HE ''.git'' . | fzf 2>/dev/tty').'"' | navigateIfDir
|
||||
\ | exe 'goto "'.term('fd --maxdepth=1 -HIE ''.git'' . | fzf 2>/dev/tty').'"' | navigateIfDir
|
||||
\ | endif
|
||||
|
||||
" Read in latests bookmarks before fzfinding through them
|
||||
|
@ -328,7 +328,7 @@ endif
|
|||
fileviewer *[^/] env -uCOLORTERM bat --color always --theme ansi --wrap never --pager never %c -p
|
||||
|
||||
|
||||
filetype *.mp4,*.mkv,*.mov,*.webm,*.mp3,*.flac mpv %c
|
||||
filetype *.mp4,*.mkv,*.mov,*.webm,*.mp3,*.flac,*.wav mpv %c
|
||||
|
||||
if system('uname -s') == 'Darwin'
|
||||
filetype *.jpg,*.jpeg,*.png,*.icns open -a Preview.app %c:p
|
||||
|
|
Loading…
Reference in a new issue