From 2e72e8dd520810e809509537adac6b1238a594ab Mon Sep 17 00:00:00 2001 From: Robert Di Pardo Date: Sat, 18 Nov 2023 10:08:22 -0500 Subject: [PATCH 1/2] Update Pascal filedef and extension mappings #### filetypes.pascal - add line comments - pair the 'fpc' compile command with another common Free Pascal utility [^1], 'instantfpc', to build and run the current file in a single step #### filetype_extensions.conf - add Lazarus project files (*.lpr) [^1]: https://wiki.freepascal.org/InstantFPC --- data/filedefs/filetypes.pascal | 4 ++-- data/filetype_extensions.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/filedefs/filetypes.pascal b/data/filedefs/filetypes.pascal index ab0123de3f..7d0642584a 100644 --- a/data/filedefs/filetypes.pascal +++ b/data/filedefs/filetypes.pascal @@ -38,7 +38,7 @@ mime_type=text/x-pascal #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 # single comments, like # in this file -#comment_single= +comment_single=// # multiline comments comment_open={ comment_close=} @@ -63,4 +63,4 @@ context_action_cmd= # %f will be replaced by the complete filename # %e will be replaced by the filename without extension compiler=fpc "%f" -run_cmd="./%e" +run_cmd=instantfpc "%f" diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index d8dc26e89c..728ab9f40e 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -56,7 +56,7 @@ Meson=meson.build;meson.options;meson_options.txt; Nim=*.nim; NSIS=*.nsi;*.nsh; Objective-C=*.m;*.mm;*.h; -Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk; +Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;*.lpr; Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; From 9ca281b02921083ab1e8b7680865737592192ef1 Mon Sep 17 00:00:00 2001 From: Robert Di Pardo Date: Sun, 19 Nov 2023 19:30:15 -0500 Subject: [PATCH 2/2] Replace obsolete [build_settings] with [build-menu] --- data/filedefs/filetypes.pascal | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/data/filedefs/filetypes.pascal b/data/filedefs/filetypes.pascal index 7d0642584a..22a7aba562 100644 --- a/data/filedefs/filetypes.pascal +++ b/data/filedefs/filetypes.pascal @@ -59,8 +59,18 @@ context_action_cmd= # 0 is spaces, 1 is tabs, 2 is tab & spaces #type=1 -[build_settings] +[build-menu] # %f will be replaced by the complete filename # %e will be replaced by the filename without extension -compiler=fpc "%f" -run_cmd=instantfpc "%f" +FT_00_LB=_Compile +FT_00_CM=fpc -s "%f" +FT_00_WD= +FT_01_LB=_Build +FT_01_CM=fpc "%f" +FT_01_WD= +FT_02_LB=_Run script +FT_02_CM=instantfpc "%f" +FT_02_WD= +EX_00_LB=_Execute +EX_00_CM="./%e" +EX_00_WD=