From 6a66abf97a4c3e781308bd210b482d5d5b219eb0 Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Mon, 10 Jul 2017 12:44:41 +0300 Subject: [PATCH 1/5] Add TODO to get doc subdir only from git --- update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/update.sh b/update.sh index 85e1d20..a1f1b4b 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,6 @@ #!/bin/bash # Download updated vim documentation and faq +#TODO: checkout only doc subdir from vim repo set -e echo Getting vim From 20e12ecfe32fb71aec17c1654222f16ebd8c99fd Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Mon, 10 Jul 2017 12:46:49 +0300 Subject: [PATCH 2/5] Add distclean target and rm files without error 1. distclean is more standard target in makefiles. 2. Ignore exit status from `rm` command (so clean succeed in case no files needs to be deleted). --- Makefile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 8586a48..ff06f9c 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ define TASKS -letter make letter-sized version -a4 make a4-sized version -ipad make ipad-sized version -all make all versions -update update vim help and vim-faq from repository -clean delete intermediate files -clobber delete all files +letter make letter-sized version +a4 make a4-sized version +ipad make ipad-sized version +all make all versions +update update vim help and vim-faq from repository +clean delete intermediate files +clobber delete all files +distclean same as clobber endef export TASKS @@ -32,13 +33,15 @@ body.tex: $(helpfiles) $(docdir) contents.txt python h2h.py clean: - -rm body.tex *.log *.aux *.toc *.out - -rm -r $(docdir) + -rm -f body.tex *.log *.aux *.toc *.out *.pyc + -rm -f -r $(docdir) clobber: clean - -rm vimhelp{,-ipad,-a4}.pdf + -rm -f vimhelp{,-ipad,-a4}.pdf + +distclean: clobber help: @echo "$$TASKS" -.PHONY: letter a4 ipad all update help clean clobber FORCE +.PHONY: letter a4 ipad all update help clean clobber distclean FORCE From 2f9ec97737a90a0dd6512b1eec197e3aaf317351 Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Mon, 10 Jul 2017 12:50:32 +0300 Subject: [PATCH 3/5] Run make second time automatically --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index ff06f9c..630c0f3 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ $(docdir): %.pdf: %.tex body.tex FORCE xelatex $< +ifndef SECOND_TIME_RUN + $(MAKE) $(MAKECMDGOALS) SECOND_TIME_RUN=true +endif body.tex: $(helpfiles) $(docdir) contents.txt python h2h.py From d0af450ce86ed5deea6dfae08525716cddf78b7a Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Mon, 10 Jul 2017 13:05:01 +0300 Subject: [PATCH 4/5] Add cross-platform buildability (modify preamble.tex automatically) Use sed to modify preamble.tex to use common fonts on each platform, so the buid can succeed on any platform. Theoretically, should be able to build on Windows (+ MinGW, Cygwin, and any other Windows environment), Mas OS X, Linux, GNU Hurd, *BSD, Haiku, Android, and any other modern open-source OS. --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Makefile b/Makefile index 630c0f3..6fc65be 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,20 @@ export TASKS SHELL=/bin/bash +ifeq ($(OS),Windows_NT) # Windows, MinGW, Cygwin, etc... + OS := Windows + subst_text := \\setmainfont{Arial}\n\\setmonofont{Courier New} +else + OS := $(shell sh -c 'uname -s 2>/dev/null || echo not') + ifeq ($(OS),Darwin) # Mac OS X + OS := Darwin + subst_text := \\setromanfont{Avenir Next}\n\\setmonofont{Source Code Pro} + else # Linux, GNU Hurd, *BSD, Haiku, Android, etc... + OS := Linux + subst_text := \\setmainfont{Liberation Sans}\n\\setmonofont{Liberation Mono} + endif +endif + docdir = doc helpfiles = $(wildcard $(docdir)/*.txt) @@ -26,6 +40,11 @@ update: $(docdir): ./update.sh +vimhelp.tex vimhelp-a4.tex vimhelp-ipad.tex: preamble.tex + +preamble.tex: FORCE + sed -i -e '/^\\usepackage{fontspec}/ {n;N;s/.*/$(subst_text)/}' preamble.tex + %.pdf: %.tex body.tex FORCE xelatex $< ifndef SECOND_TIME_RUN From 72f2f996c283a21ff1af209be0cc7c4480eb1207 Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Sat, 22 Jul 2017 23:20:26 +0300 Subject: [PATCH 5/5] Update help files for Vim 8 --- contents.txt | 7 ++++++- update.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contents.txt b/contents.txt index 79212d3..1593990 100644 --- a/contents.txt +++ b/contents.txt @@ -80,6 +80,7 @@ diff.txt working with two to four versions of the same file autocmd.txt automatically executing commands on an event filetype.txt settings done specifically for a type of file eval.txt expression evaluation, conditional commands +channel.txt Jobs, Channels, inter-process communication fold.txt hide (fold) ranges of lines ## Special issues print.txt printing @@ -93,10 +94,11 @@ farsi.txt Farsi (Persian) editing hebrew.txt Hebrew language support and editing russian.txt Russian language support and editing ft_ada.txt Ada (the programming language) support +ft_rust.txt Rust support ft_sql.txt about the SQL filetype plugin hangulin.txt Hangul (Korean) input mode rileft.txt right-to-left editing mode -channel.txt Inter-process communication +terminal.txt Terminal emulator inside Vim buffer ## GUI gui.txt Graphical User Interface (GUI) gui_w32.txt Win32 GUI @@ -142,9 +144,12 @@ pi_gzip.txt Reading and writing compressed files pi_logipat.txt Logical Patterns pi_netrw.txt Reading and writing files over a network pi_paren.txt Highlight matching parens +pi_spec.txt RPM spec files pi_tar.txt Tar file explorer pi_vimball.txt Create a self-installing Vim script pi_zip.txt Zip archive explorer +## Local Additions +matchit.txt Extended pair matching # Miscellaneous sponsor.txt Sponsor Vim development, become a registered Vim user vim_faq.txt Frequently asked questions diff --git a/update.sh b/update.sh index a1f1b4b..290bc31 100755 --- a/update.sh +++ b/update.sh @@ -24,6 +24,7 @@ fi echo Copying files into doc directory cp vim/runtime/doc/tags vim/runtime/doc/*.txt vim_faq/doc/vim_faq.txt doc +cp vim/runtime/pack/dist/opt/matchit/doc/matchit.txt doc echo Writing tags.txt awk 'BEGIN { ORS=" " } { print $1 }' doc/tags | fold -sw 78 > doc/tags.txt