diff --git a/Makefile b/Makefile index 8586a48..6fc65be 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,31 @@ 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 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) @@ -25,20 +40,30 @@ 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 + $(MAKE) $(MAKECMDGOALS) SECOND_TIME_RUN=true +endif 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 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 85e1d20..290bc31 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 @@ -23,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