From 37c926484756e91ff0eda5e373c04548df82090e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Nov 2017 01:32:01 +1300 Subject: Add ~/.tidyrc and accompanying Makefile target This target also installs a short shell script in ~/.profile.d to set and export the HTML_TIDY environment variable that defines the path to the configuration file. tidy(1) seems to need this to be explicitly set with a default build, as far as I can tell. This pairs nicely with the settings in vim/ftplugin/html.vim. --- Makefile | 5 +++++ README.md | 1 + tidy/profile.d/tidy.sh | 3 +++ tidy/tidyrc | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 tidy/profile.d/tidy.sh create mode 100644 tidy/tidyrc diff --git a/Makefile b/Makefile index c09541fd..e80a1ed8 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ install-sh \ install-subversion \ install-terminfo \ + install-tidy \ install-tmux \ install-urxvt \ install-vim \ @@ -463,6 +464,10 @@ install-terminfo: find terminfo -type f -name '*.info' \ -exec tic -- {} \; +install-tidy: install-sh + cp -p -- tidy/profile.d/* $(HOME)/.profile.d + cp -p -- tidy/tidyrc $(HOME)/.tidyrc + install-tmux: tmux/tmux.conf install-terminfo cp -p -- tmux/tmux.conf $(HOME)/.tmux.conf diff --git a/README.md b/README.md index c3ffbf44..361cfa62 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Configuration is included for: the rxvt terminal emulator with Unicode support * [Subversion](https://subversion.apache.org/) -- Apache Subversion, a version control system +* [tidy](http://www.html-tidy.org/) -- HTML/XHTML linter and tidier * [tmux](https://tmux.github.io/) -- Terminal multiplexer similar to GNU Screen * [Vim](http://www.vim.org/) -- Vi IMproved, a text editor diff --git a/tidy/profile.d/tidy.sh b/tidy/profile.d/tidy.sh new file mode 100644 index 00000000..177a8124 --- /dev/null +++ b/tidy/profile.d/tidy.sh @@ -0,0 +1,3 @@ +# Set a configuration file path for tidy(1) +HTML_TIDY=$HOME/.tidyrc +export HTML_TIDY diff --git a/tidy/tidyrc b/tidy/tidyrc new file mode 100644 index 00000000..65f93112 --- /dev/null +++ b/tidy/tidyrc @@ -0,0 +1,20 @@ +# UTF-8 everywhere by default +char-encoding: utf8 +input-encoding: utf8 +output-encoding: utf8 + +# Seems reasonable +drop-empty-paras: yes + +# Indent to four spaces +indent: yes +indent-spaces: 4 + +# Shut up please +quiet: yes + +# Don't mess with my +tidy-mark: no + +# Don't wrap +wrap: 0 -- cgit v1.2.3