poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/2] Distribute vim syntax highlighting


From: Thomas Weißschuh
Subject: [PATCH v2 1/2] Distribute vim syntax highlighting
Date: Sat, 13 Mar 2021 22:22:23 +0100

2021-03-12  Thomas Weißschuh <thomas@t-8ch.de>

        * etc/vim/Makefile.am: Distribute vim syntax highlighting.
---
 ChangeLog                     |  4 ++++
 configure.ac                  | 13 +++++++++++++
 doc/poke.texi                 |  8 +++++---
 etc/Makefile.am               |  2 ++
 etc/vim/Makefile.am           |  1 +
 etc/vim/ftdetect/poke.vim     |  1 +
 etc/{ => vim/syntax}/poke.vim |  0
 7 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 etc/vim/Makefile.am
 create mode 100644 etc/vim/ftdetect/poke.vim
 rename etc/{ => vim/syntax}/poke.vim (100%)

diff --git a/ChangeLog b/ChangeLog
index ae9702da..0fb56ef9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-12  Thomas Weißschuh <thomas@t-8ch.de>
+
+       * etc/vim/Makefile.am: Distribute vim syntax highlighting.
+
 2021-03-12  Jose E. Marchesi  <jemarch@gnu.org>
 
        * doc/poke.texi (Writing Binary Utilities): New chapter.
diff --git a/configure.ac b/configure.ac
index 8b3e456c..e6afb941 100644
--- a/configure.ac
+++ b/configure.ac
@@ -227,6 +227,18 @@ dnl The test framework is optional.
 AC_CHECK_HEADERS([dejagnu.h])
 AM_CONDITIONAL([HAVE_DEJAGNU], [test "$ac_cv_header_dejagnu_h" = yes])
 
+dnl editor syntax definitions
+AC_ARG_WITH([vimdir],
+ [AS_HELP_STRING([--with-vimdir],
+                 [override the default vim directory])],
+ [ vimdir="$withval"
+   AC_MSG_CHECKING([where vim files should go])
+   AC_MSG_RESULT([$vimdir])],
+ [ vimdir='${datadir}/vim/vimfiles' ]
+)
+AC_SUBST([vimdir])
+
+
 dnl Generate output files
 AC_CONFIG_FILES(Makefile
                 gl/Makefile
@@ -242,6 +254,7 @@ AC_CONFIG_FILES(Makefile
                 man/Makefile
                 po/Makefile.in
                 etc/Makefile
+                etc/vim/Makefile
                 testsuite/Makefile
                 testsuite/poke.libpoke/Makefile
                 testsuite/poke.mi-json/Makefile)
diff --git a/doc/poke.texi b/doc/poke.texi
index d9dfdeb2..897469d6 100644
--- a/doc/poke.texi
+++ b/doc/poke.texi
@@ -7775,8 +7775,10 @@ Retarded Assembler.
 @node Vim Syntax Highlighting
 @chapter Vim Syntax Highlighting
 
-GNU poke ships with a vim syntax highlighter for *.pk files. This
-chapter explains how to install it.
+GNU poke ships with a vim syntax highlighter for *.pk files.
+Normally this should be installed as part of your existing poke installation
+and work out of the box.
+If that is not the case this chapter explains how to install it manually.
 
 @menu
 * @file{poke.vim}::    Poke syntax highlighter
@@ -7785,7 +7787,7 @@ chapter explains how to install it.
 @node @file{poke.vim}
 @section @file{poke.vim}
 
-@code{etc/poke.vim} is a syntax highlighter for Poke source
+@code{etc/vim/syntax/poke.vim} is a syntax highlighter for Poke source
 @i{i.e.} @file{.pk} files. To use it, first place the file in your
 @code{~/.vimrc/syntax/} folder on Unix based systems, or in
 @code{$HOME/vimfiles/syntax/} on Windows. There are a few ways to tell
diff --git a/etc/Makefile.am b/etc/Makefile.am
index 383caffd..e7f5b339 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = vim
+
 EXTRA_DIST = poke.rec
 
 dist_pkgdata_DATA = poke-default.css
diff --git a/etc/vim/Makefile.am b/etc/vim/Makefile.am
new file mode 100644
index 00000000..7f6662db
--- /dev/null
+++ b/etc/vim/Makefile.am
@@ -0,0 +1 @@
+nobase_dist_vim_DATA = syntax/poke.vim ftdetect/poke.vim
diff --git a/etc/vim/ftdetect/poke.vim b/etc/vim/ftdetect/poke.vim
new file mode 100644
index 00000000..aeb16c4d
--- /dev/null
+++ b/etc/vim/ftdetect/poke.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.pk set filetype=poke
diff --git a/etc/poke.vim b/etc/vim/syntax/poke.vim
similarity index 100%
rename from etc/poke.vim
rename to etc/vim/syntax/poke.vim
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]