diff options
-rw-r--r-- | scite-fedora/SciTEGlobal.properties | 16 | ||||
-rw-r--r-- | scite-fedora/scite.spec | 16 | ||||
-rw-r--r-- | scite-fedora/stackrpms.lua (renamed from scite-fedora/emitUnicode.lua) | 33 | ||||
-rw-r--r-- | scite/debian/SciTEGlobal.properties | 16 | ||||
-rw-r--r-- | scite/debian/changelog | 4 | ||||
-rwxr-xr-x | scite/debian/rules | 2 | ||||
-rw-r--r-- | scite/debian/scite+devuan.dsc | 2 | ||||
-rw-r--r-- | scite/debian/stackrpms.lua (renamed from scite/debian/emitUnicode.lua) | 33 |
8 files changed, 102 insertions, 20 deletions
diff --git a/scite-fedora/SciTEGlobal.properties b/scite-fedora/SciTEGlobal.properties index 4150caa..1dd5e11 100644 --- a/scite-fedora/SciTEGlobal.properties +++ b/scite-fedora/SciTEGlobal.properties @@ -549,12 +549,22 @@ txt2tags verilog vhdl visualprolog # The set of imports allowed can be set with #imports.include=ave -ext.lua.startup.script=$(SciteDefaultHome)/emitUnicode.lua -command.name.8.*=Emit UTF8 Unicode +ext.lua.startup.script=$(SciteDefaultHome)/stackrpms.lua +command.name.8.*=Emit &UTF8 Unicode command.subsystem.8.*=3 -command.8.*=emitUtf8UnicodeIntoTheSciteEditor +command.8.*=emitUnicode command.mode.8.*=savebefore:no command.shortcut.8.*=Ctrl+U +command.name.9.*=Insert &Date AH +command.subsystem.9.*=3 +command.9.*=InsertDateAH +command.mode.9.*=savebefore:no +command.shortcut.9.*=F5 +command.name.10.*=Insert Date iso8601 +command.subsystem.10.*=3 +command.10.*=InsertDateIso +command.mode.10.*=savebefore:no +command.shortcut.10.*=Shift+F5 # Import all the language specific properties files in this directory import * diff --git a/scite-fedora/scite.spec b/scite-fedora/scite.spec index d51ddd2..1cc96e7 100644 --- a/scite-fedora/scite.spec +++ b/scite-fedora/scite.spec @@ -5,8 +5,8 @@ %define with_lua 1 # Use bundled lua. If 0, then use distro lua %define with_bundled_lua 0 -# Add my emitUnicode lua script -%define with_emitunicode 1 +# Add my custom lua script +%define with_custom_script 1 # Choose GTK=2 or GTK=3. El6 is hardcoded to 2. %define gtk_ 3 @@ -47,8 +47,8 @@ Url: http://www.scintilla.org/SciTE.html Packager: B. Stack <bgstack15@gmail.com> Source0: https://www.scintilla.org/scite%{tarballversion}.tgz -%if 0%{with_emitunicode} -Source1: emitUnicode.lua +%if 0%{with_custom_script} +Source1: stackrpms.lua %endif Source2: SciTEGlobal.properties Patch0: scite-utf8.patch @@ -121,8 +121,8 @@ desktop-file-install --delete-original \ --remove-key Encoding \ %{buildroot}%{_datadir}/applications/SciTE.desktop -%if 0%{with_emitunicode} -install -D -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/scite/emitUnicode.lua +%if 0%{with_custom_script} +install -D -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/scite/stackrpms.lua %endif install -D -p -m 666 %{SOURCE2} %{buildroot}%{_datadir}/scite/SciTEGlobal.properties %if 0%{?fedora} @@ -147,9 +147,9 @@ install -D -p -m 666 %{SOURCE2} %{buildroot}%{_datadir}/scite/SciTEGlobal.proper %{_libdir}/* %changelog -* Mon Apr 04 2022 B. Stack <bgstack15@gmail.com> - 5.2.2-1/3.7.6-1 +* Mon Apr 04 2022 B. Stack <bgstack15@gmail.com> - 5.2.2-2/3.7.6-1 - Update version -- Add tunables: gtk, lua, bundled lua, add emitunicode +- Add tunables: gtk, lua, bundled lua, add stackrpms.lua - Add customized SciTEGlobal.properties * Thu Mar 24 2022 B. Stack <bgstack15@gmail.com> - 5.2.1-1/3.7.6-1 diff --git a/scite-fedora/emitUnicode.lua b/scite-fedora/stackrpms.lua index 70d32b1..8423feb 100644 --- a/scite-fedora/emitUnicode.lua +++ b/scite-fedora/stackrpms.lua @@ -226,7 +226,7 @@ end -- Writes a message to the Output pane, if no codepoint existed -- at the left of the cursor. -- -function emitUtf8UnicodeIntoTheSciteEditor() +function emitUnicode() local ok = emitUtf8Unicode() if not ok then @@ -245,3 +245,34 @@ end -- -- http://lua-users.org/lists/lua-l/2007-08/msg00276.html -- http://keplerproject.github.io/luadoc/ + +-- Reference: http://lua-users.org/wiki/SciteInsertDate +-- Tags used by os.date: +-- %a abbreviated weekday name (e.g., Wed) +-- %A full weekday name (e.g., Wednesday) +-- %b abbreviated month name (e.g., Sep) +-- %B full month name (e.g., September) +-- %c date and time (e.g., 09/16/98 23:48:10) +-- %d day of the month (16) [01-31] +-- %H hour, using a 24-hour clock (23) [00-23] +-- %I hour, using a 12-hour clock (11) [01-12] +-- %M minute (48) [00-59] +-- %m month (09) [01-12] +-- %p either "am" or "pm" (pm) +-- %S second (10) [00-61] +-- %w weekday (3) [0-6 = Sunday-Saturday] +-- %x date (e.g., 09/16/98) +-- %X time (e.g., 23:48:10) +-- %Y full year (1998) +-- %y two-digit year (98) [00-99] +-- %% the character '%' +function InsertDateAH() + local dow = tostring(os.date("%w") + 1) + local d1 = os.date("%Y-%m-%d-") + local d2 = os.date(" %H:%M") + editor:AddText(d1..dow..d2) +end +function InsertDateIso() + local date_string = os.date("%Y-%m-%dT%T") + editor:AddText(date_string) +end diff --git a/scite/debian/SciTEGlobal.properties b/scite/debian/SciTEGlobal.properties index 4150caa..1dd5e11 100644 --- a/scite/debian/SciTEGlobal.properties +++ b/scite/debian/SciTEGlobal.properties @@ -549,12 +549,22 @@ txt2tags verilog vhdl visualprolog # The set of imports allowed can be set with #imports.include=ave -ext.lua.startup.script=$(SciteDefaultHome)/emitUnicode.lua -command.name.8.*=Emit UTF8 Unicode +ext.lua.startup.script=$(SciteDefaultHome)/stackrpms.lua +command.name.8.*=Emit &UTF8 Unicode command.subsystem.8.*=3 -command.8.*=emitUtf8UnicodeIntoTheSciteEditor +command.8.*=emitUnicode command.mode.8.*=savebefore:no command.shortcut.8.*=Ctrl+U +command.name.9.*=Insert &Date AH +command.subsystem.9.*=3 +command.9.*=InsertDateAH +command.mode.9.*=savebefore:no +command.shortcut.9.*=F5 +command.name.10.*=Insert Date iso8601 +command.subsystem.10.*=3 +command.10.*=InsertDateIso +command.mode.10.*=savebefore:no +command.shortcut.10.*=Shift+F5 # Import all the language specific properties files in this directory import * diff --git a/scite/debian/changelog b/scite/debian/changelog index e21c8c9..9ff6ecc 100644 --- a/scite/debian/changelog +++ b/scite/debian/changelog @@ -1,6 +1,6 @@ -scite (5.2.2-1+devuan) obs; urgency=medium +scite (5.2.2-2+devuan) obs; urgency=medium - * Add emitUnicode lua script, Ctrl+U + * Add stackrpms lua script and customized global.properties * Use lua 5.4.4 -- B. Stack <bgstack15@gmail.com> Mon, 04 Apr 2022 09:51:24 -0400 diff --git a/scite/debian/rules b/scite/debian/rules index a5273ef..f6cbeda 100755 --- a/scite/debian/rules +++ b/scite/debian/rules @@ -44,7 +44,7 @@ override_dh_install: mv -f $(CURDIR)/debian/scite/usr/share/scite/*.txt $(CURDIR)/debian/scite/usr/share/doc/scite/ mv -f $(CURDIR)/debian/scite/usr/share/scite/*.jpg $(CURDIR)/debian/scite/usr/share/doc/scite/ mv -f $(CURDIR)/debian/scite/usr/share/scite/*.png $(CURDIR)/debian/scite/usr/share/doc/scite/ - cp -p debian/emitUnicode.lua $(CURDIR)/debian/scite/usr/share/scite/ + cp -p debian/stackrpms.lua $(CURDIR)/debian/scite/usr/share/scite/ @#install -d -m0755 $(CURDIR)/debian/scite/etc/scite install -D -p -m0666 debian/SciTEGlobal.properties $(CURDIR)/debian/scite/etc/scite/ for f in $(CURDIR)/debian/scite/usr/share/doc/scite/*.html; do \ diff --git a/scite/debian/scite+devuan.dsc b/scite/debian/scite+devuan.dsc index 2fd77e2..3586cb2 100644 --- a/scite/debian/scite+devuan.dsc +++ b/scite/debian/scite+devuan.dsc @@ -2,7 +2,7 @@ Format: 3.0 (quilt) Source: scite Binary: scite Architecture: any -Version: 5.2.2-1+devuan +Version: 5.2.2-2+devuan Maintainer: B. Stack <bgstack15@gmail.com> Homepage: https://scintilla.org/SciTE.html Standards-Version: 4.6.0.1 diff --git a/scite/debian/emitUnicode.lua b/scite/debian/stackrpms.lua index 70d32b1..8423feb 100644 --- a/scite/debian/emitUnicode.lua +++ b/scite/debian/stackrpms.lua @@ -226,7 +226,7 @@ end -- Writes a message to the Output pane, if no codepoint existed -- at the left of the cursor. -- -function emitUtf8UnicodeIntoTheSciteEditor() +function emitUnicode() local ok = emitUtf8Unicode() if not ok then @@ -245,3 +245,34 @@ end -- -- http://lua-users.org/lists/lua-l/2007-08/msg00276.html -- http://keplerproject.github.io/luadoc/ + +-- Reference: http://lua-users.org/wiki/SciteInsertDate +-- Tags used by os.date: +-- %a abbreviated weekday name (e.g., Wed) +-- %A full weekday name (e.g., Wednesday) +-- %b abbreviated month name (e.g., Sep) +-- %B full month name (e.g., September) +-- %c date and time (e.g., 09/16/98 23:48:10) +-- %d day of the month (16) [01-31] +-- %H hour, using a 24-hour clock (23) [00-23] +-- %I hour, using a 12-hour clock (11) [01-12] +-- %M minute (48) [00-59] +-- %m month (09) [01-12] +-- %p either "am" or "pm" (pm) +-- %S second (10) [00-61] +-- %w weekday (3) [0-6 = Sunday-Saturday] +-- %x date (e.g., 09/16/98) +-- %X time (e.g., 23:48:10) +-- %Y full year (1998) +-- %y two-digit year (98) [00-99] +-- %% the character '%' +function InsertDateAH() + local dow = tostring(os.date("%w") + 1) + local d1 = os.date("%Y-%m-%d-") + local d2 = os.date(" %H:%M") + editor:AddText(d1..dow..d2) +end +function InsertDateIso() + local date_string = os.date("%Y-%m-%dT%T") + editor:AddText(date_string) +end |