From 71f5d92587e7d8a70a1347725eabbe4d3c1bc4ba Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Tue, 21 Nov 2023 13:20:26 +0100 Subject: [PATCH 1/4] Make titles white (against a dark background) Not sure why Jinja expressions are rendered as titles. but they are and anyway black on a dark background isn't very readable. --- .vim/colors/hjp-dark.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vim/colors/hjp-dark.vim b/.vim/colors/hjp-dark.vim index c479fa1..beaa0e6 100755 --- a/.vim/colors/hjp-dark.vim +++ b/.vim/colors/hjp-dark.vim @@ -37,7 +37,7 @@ hi Tag term=bold ctermfg=DarkGreen hi Todo term=standout ctermfg=Black ctermbg=Yellow guifg=Blue guibg=Yellow hi Type term=underline ctermfg=Blue gui=NONE guifg=Blue hi Visual term=reverse ctermfg=White ctermbg=DarkBlue gui=NONE guifg=Black guibg=Yellow -hi Title ctermfg=black +hi Title ctermfg=white hi IncSearch term=reverse cterm=NONE ctermfg=black ctermbg=cyan hi link Boolean Constant From 6460b497a9bf89a706ed64e4e949b6491d6a27c6 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 1 Feb 2024 14:45:34 +0100 Subject: [PATCH 2/4] Override LC_TIME I want a 24 hour clock, so I can't use en_US. However, other locales may not be installed, so try a few likely candidates ordered by by readability of the output of date(1). --- .zshenv | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.zshenv b/.zshenv index 311713c..db7271f 100644 --- a/.zshenv +++ b/.zshenv @@ -109,6 +109,19 @@ then unsetopt NULL_GLOB fi +for i in ~/bin/match_locale /usr/bin/match_locale +do + if [ -x "$i" ] + then + match_locale="$i" + break + fi +done +if [ -n "$match_locale" ] +then + LC_TIME=$($match_locale LC_TIME en_IE.UTF-8 en_AU.UTF-8 en_GB.UTF-8 en_DK.UTF-8 C.UTF-8) +fi + case "$LANG" in *.iso88591) export LESSCHARSET=latin1 From 03cc524476a8010a5b544ae2cdec3f8bc2910764 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 18 Apr 2024 12:34:10 +0200 Subject: [PATCH 3/4] Set colors for man to match the background --- .zshrc | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.zshrc b/.zshrc index 2b1e2b1..da138ea 100644 --- a/.zshrc +++ b/.zshrc @@ -67,14 +67,26 @@ dup(){ cls() { clear; true } man () { - LESS_TERMCAP_mb=$'\e'"[1;31m" \ - LESS_TERMCAP_md=$'\e'"[1;38;5;88m" \ - LESS_TERMCAP_me=$'\e'"[0m" \ - LESS_TERMCAP_se=$'\e'"[0m" \ - LESS_TERMCAP_so=$'\e'"[1;44;33m" \ - LESS_TERMCAP_ue=$'\e'"[0m" \ - LESS_TERMCAP_us=$'\e'"[1;38;5;22m" \ - command man "$@" + if [[ "$BG" = "dark" ]] + then + LESS_TERMCAP_mb=$'\e'"[1;31m" \ + LESS_TERMCAP_md=$'\e'"[1;32m" \ + LESS_TERMCAP_me=$'\e'"[0m" \ + LESS_TERMCAP_se=$'\e'"[0m" \ + LESS_TERMCAP_so=$'\e'"[1;44;33m" \ + LESS_TERMCAP_ue=$'\e'"[0m" \ + LESS_TERMCAP_us=$'\e'"[36m" \ + command man "$@" + else + LESS_TERMCAP_mb=$'\e'"[1;31m" \ + LESS_TERMCAP_md=$'\e'"[1;38;5;88m" \ + LESS_TERMCAP_me=$'\e'"[0m" \ + LESS_TERMCAP_se=$'\e'"[0m" \ + LESS_TERMCAP_so=$'\e'"[1;44;33m" \ + LESS_TERMCAP_ue=$'\e'"[0m" \ + LESS_TERMCAP_us=$'\e'"[1;38;5;22m" \ + command man "$@" + fi } venv() { From a404a33d56e758e6564f50d96bd594f14259f70a Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 11 May 2024 16:51:18 +0200 Subject: [PATCH 4/4] Mark common line lengths --- .vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.vimrc b/.vimrc index c46683d..efd12db 100644 --- a/.vimrc +++ b/.vimrc @@ -1,6 +1,7 @@ set ai " Disable (ab)use of X11 selection set clipboard= +set colorcolumn=72,80,100,132 set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\| set expandtab set exrc