Switch from nvimpager to just nvim as pager

main
Marko Korhonen 3 years ago
parent 357743c472
commit f6fc1d4bdf

@ -22,7 +22,7 @@ export FZF_ALT_C_COMMAND='fd -Ht d'
export FZF_DEFAULT_OPTS='-m --bind ctrl-a:select-all,ctrl-d:deselect-all,ctrl-t:toggle-all'
export FZF_COMPLETION_TRIGGER='**'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_CTRL_T_OPTS='--preview "/usr/bin/cat {} | nvimpager -c "'
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
# use lesspipe with less
export LESSOPEN="|lesspipe.sh %s"
@ -32,8 +32,9 @@ export DOTREPO="$HOME/git/dotfiles"
# nvim ftw!
export EDITOR=nvim
export PAGER="nvimpager -p"
export PAGER="sed 's/\x1b\[[0-9;]*m//g' | nvim -R"
export AUR_PAGER=$PAGER
export MANPAGER="nvim -c 'set ft=man' -R"
# Use GPG for SSH authentication
export GPG_TTY="$(tty)"

@ -6,15 +6,8 @@ alias gpush='git push'
alias mutt='neomutt'
# Syntax highlighting cat if output is a terminal
cat() {
# Check if output is a terminal, else use regular cat
if [ -t 1 ]; then
nvimpager $@
else
/usr/bin/cat $@
fi
}
# Syntax highlighting cat
alias cat='bat'
rip() {
abcde

@ -21,6 +21,7 @@
[merge]
prompt = false
tool = nvim-merge
[mergetool "nvim-merge"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
@ -36,3 +37,6 @@
[alias]
mergetest = !git switch test && git pull && git merge --no-ff -m \"Merge $1 features to test\" $1 && git push
[color]
pager = no

Loading…
Cancel
Save