From 56f273060249e6caafb891d4936d1fb4931f7243 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:11:07 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=20style(man):=20Change=20manpager?= =?UTF-8?q?=20to=20nvim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/conf.d/10-fish-colored-man.fish | 6 --- .config/fish/conf.d/30-man.fish | 3 ++ .config/fish/fish_plugins | 1 - .config/fish/functions/man.fish | 41 -------------------- 4 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 .config/fish/conf.d/10-fish-colored-man.fish create mode 100644 .config/fish/conf.d/30-man.fish delete mode 100644 .config/fish/functions/man.fish diff --git a/.config/fish/conf.d/10-fish-colored-man.fish b/.config/fish/conf.d/10-fish-colored-man.fish deleted file mode 100644 index c96396c..0000000 --- a/.config/fish/conf.d/10-fish-colored-man.fish +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env fish - -set -g man_blink -o f38ba8 red -set -g man_bold -o 94e2d5 cyan -set -g man_standout -o a6e3a1 green -set -g man_underline -u f5c2e7 magenta diff --git a/.config/fish/conf.d/30-man.fish b/.config/fish/conf.d/30-man.fish new file mode 100644 index 0000000..bdf7a4a --- /dev/null +++ b/.config/fish/conf.d/30-man.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +set -gx MANPAGER "nvim +Man!" diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins index 1ea7a0a..d1a61d0 100644 --- a/.config/fish/fish_plugins +++ b/.config/fish/fish_plugins @@ -1,4 +1,3 @@ jorgebucaran/fisher catppuccin/fish -decors/fish-colored-man jorgebucaran/autopair.fish diff --git a/.config/fish/functions/man.fish b/.config/fish/functions/man.fish deleted file mode 100644 index 3fbfa69..0000000 --- a/.config/fish/functions/man.fish +++ /dev/null @@ -1,41 +0,0 @@ -function man --wraps man --description 'Format and display manual pages' - set -q man_blink; and set -l blink (set_color $man_blink); or set -l blink (set_color -o red) - set -q man_bold; and set -l bold (set_color $man_bold); or set -l bold (set_color -o 5fafd7) - set -q man_standout; and set -l standout (set_color $man_standout); or set -l standout (set_color 949494) - set -q man_underline; and set -l underline (set_color $man_underline); or set -l underline (set_color -u afafd7) - - set -l end (printf "\e[0m") - - set -lx LESS_TERMCAP_mb $blink - set -lx LESS_TERMCAP_md $bold - set -lx LESS_TERMCAP_me $end - set -lx LESS_TERMCAP_so $standout - set -lx LESS_TERMCAP_se $end - set -lx LESS_TERMCAP_us $underline - set -lx LESS_TERMCAP_ue $end - set -lx LESS '-R -s' - - set -lx GROFF_NO_SGR yes # fedora - - set -lx MANPATH (string join : $MANPATH) - if test -z "$MANPATH" - type -q manpath - and set MANPATH (command manpath) - end - - # Check data dir for Fish 2.x compatibility - set -l fish_data_dir - if set -q __fish_data_dir - set fish_data_dir $__fish_data_dir - else - set fish_data_dir $__fish_datadir - end - - set -l fish_manpath (dirname $fish_data_dir)/fish/man - if test -d "$fish_manpath" -a -n "$MANPATH" - set MANPATH "$fish_manpath":$MANPATH - command man $argv - return - end - command man $argv -end