From: Jannik ZANDER Date: Sat, 7 Jul 2018 08:25:31 +0000 (+0200) Subject: Add color highlightint to less X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=a54847b20d2060d6b0a61d9e78f40b4861573b9e;p=dotfiles.git Add color highlightint to less --- diff --git a/.bashrc b/.bashrc index 65bbcf5..ea45988 100644 --- a/.bashrc +++ b/.bashrc @@ -9,8 +9,8 @@ cd ~ export SHELL='bash' export EDITOR='vim' export VISUAL='vim' -export PAGER='less -eFRX' -export MANPAGER="less -eFRX" +export PAGER='less' +export MANPAGER='less' # Set prompt if [[ -z "$MSYS2_PS1" ]]; then @@ -48,9 +48,9 @@ export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help"; # colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' -# Highlight section titles in manual pages -export LESS_TERMCAP_md="${yellow}"; - +# syntax highlighting in less +export LESSOPEN="| /mingw64/bin/src-hilite-lesspipe.sh %s" +export LESS=' -R ' # Load aliases, functions, etc for file in ${HOME}/.config/bash/*; do diff --git a/.config/bash/aliases b/.config/bash/aliases index 8059952..7ae9a94 100644 --- a/.config/bash/aliases +++ b/.config/bash/aliases @@ -16,13 +16,13 @@ fi alias ls="ls $colorflag $lsflags" -# grep +# grep and less color alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' +alias less='less -RX' # raw control characters, don't clear the screen after quitting # Shortcuts -alias less='less -erFRX' # raw control characters, don't clear the screen after quitting alias info='info --vi-keys' alias open='xdg-open &>/dev/null' alias h='history' diff --git a/.vim/vimrc b/.vim/vimrc index 9abf62d..c1cd30f 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -66,6 +66,8 @@ set wildmode=longest:full,full set wildignore+=tags,.*.un~,*.pyc set winaltkeys=no +let mapleader = "," + " visual " --------------------- highlight Normal guibg=black guifg=white @@ -195,7 +197,6 @@ let g:ctrlp_cmd = 'CtrlP' " mappings " --------------------- -let mapleader = "," " buffers nnoremap b :buffer