contrib:externaleditors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
contrib:externaleditors [2018/03/27 10:18] – [KatePart] brucemuttoncontrib:externaleditors [2023/12/23 03:56] (current) – [NotePad++] Update for Therion 6.2.0 brucemutton
Line 1: Line 1:
-====== External Editors ======+====== Editors (not part of Therion package) ======
  
 =====for input files===== =====for input files=====
Line 33: Line 33:
  
 Bill Gee has written a configuration file to highlight Therion syntax... Bill Gee has written a configuration file to highlight Therion syntax...
 +
 +{{:contrib:katetherion.zip}} v1.2 30 March 2018
 +
 +
 I run Fedora 27 with KDE desktop, so the editor I use most is Kate/KWrite. KDE has a system-wide syntax highlighting system that is part of KatePart. I run Fedora 27 with KDE desktop, so the editor I use most is Kate/KWrite. KDE has a system-wide syntax highlighting system that is part of KatePart.
    
-The attached XML file is for use in either Kate or KWrite. It is very much a work in progress. I have only scratched the surface of what is possible. One major thing I want to look at is to see if there is a way to make the syntax highlighting change in "code metapost" and "code tex-map" sections. KatePart already has highlighting files for metafont and latex. With any luck there is a way to reuse those.+The attached XML file is for use in either Kate or KWrite. It is very much a work in progress.
    
-Copy the XML file to your user profile directory. The exact location will vary depending on your distribution. On my Fedora 27 system it is \\+Copy the XML file to your user profile directory. The exact location will vary depending on your distribution. On my Fedora 27 system it is... \\
    
 <code>  $HOME/.local//share/org.kde.syntax-highlighting/syntax </code> <code>  $HOME/.local//share/org.kde.syntax-highlighting/syntax </code>
Line 43: Line 47:
 You may have to create this directory. You may have to create this directory.
    
-The file can also go in the common syntax highlighting directory which (on my system) is \\+The file can also go in the common syntax highlighting directory which (on my system) is... \\
    
 <code>  /usr/share/kde4/apps/katepart/syntax </code> <code>  /usr/share/kde4/apps/katepart/syntax </code>
Line 51: Line 55:
 The next time you start either Kate or KWrite, the new file will be used. The next time you start either Kate or KWrite, the new file will be used.
  
 +=== Recent Changes (29-30 March 2018) === 
 +  * Added several more keywords such as ceiling-step and floor-step. 
 +  * Applies different rules for "code metapost", "code tex-map" and "code tex-atlas" sections 
 +  * Numbers are now highlighted in color.
 ---- ----
 ==== NotePad++ ==== ==== NotePad++ ====
  
 NotePad++ is a free editor that I have used successfully with XTherion (B. Mutton, Footleg)\\ NotePad++ is a free editor that I have used successfully with XTherion (B. Mutton, Footleg)\\
-Last updated for version 6.7.3 Jan 2015+Last updated for version 7.9 in Oct 2020
  
 http://notepad-plus-plus.org/download/ \\ http://notepad-plus-plus.org/download/ \\
Line 79: Line 86:
  
 ===Customise NotePad++===== ===Customise NotePad++=====
-To allow NotePad++ to work with Therion data files select the menu item Settings. Preferences and in the dialog that opens select the New Document tab.+To allow NotePad++ to work with Therion data files select the menu item ''Settings. Preferences'' and in the dialog that opens select the ''New Document'' tab. 
 + 
 +Select the ''UTF-8'' (without BOM) radio button and tick ''Apply to open ANSI file'' 
 + 
 +Another setting you might like to adjust is that which detects when another application (Therion) has saved a file that Notepad++ has open.  In the ''Misc'' tab under ''File Status Auto-Detection''
 + 
 +Select 'Enable', and __untick__ ''Update silently'' and ''Scroll to the last line after update'' It can be annoying, but if you edit a file in Notepadd++ while Therion is running, you will be pleased that you unticked 'update silently'
  
-Select the 'UTF-8 without BOM' radio button and tick 'Apply to open ANSI file' 
  
 Here are some options to make NotePad++ work well with Therion. Here are some options to make NotePad++ work well with Therion.
  
-In windows XP add the files below to the folder +In Windows add the files below to the folder 
 <code> %APPDATA%\Notepad++ </code> <code> %APPDATA%\Notepad++ </code>
-which in Windows XP usually evaluates to ... +which in Windows usually evaluates to ... 
-<code> C:\Documents and Settings\<Username>\Application Data\Notepad++ </code> +
-or in Windows 7+
 <code> C:\Users\<Username>\AppData\Roaming\Notepad++ </code> <code> C:\Users\<Username>\AppData\Roaming\Notepad++ </code>
  
-Make sure that NotePad++ is not running when you relocate or edit these files in the above location.  Edit them in a different location if NotePad++ is running, otherwise NotePad++ will overwrite them when it closes.+Make sure that NotePad++ is not running when you relocate or edit these files in the above location.  Close NotePad++ and use a different editor, or edit them in a different location if NotePad++ is running, otherwise NotePad++ will overwrite them when it closes.
  
 ---- ----
-**User defined language styler for survex and for therion**+**Open a new instance of Xtherion with the currently active file using Ctrl + Alt + X**
  
-Includes 3 styles - Survex, Therion simple highlighting of comments only, and Therion 5.3.3) +Modified keyboard shortcuts to include opening Xtherion using Ctrl+Alt X
-{{:contrib:userDefineLang-SurvexTherion533-.zip|:contrib:userDefineLang.xml}} (Download the file then unzip the contents to %APPDATA%\Notepad++)+
  
 +For Therion 5.3.14 to 6.0.4 variants, add this line to the file ''%APPDATA%\Notepad++\shortcuts.xml'' ...
 +<code> <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files (x86)\Therion\bin\wish86t.exe&quot; &quot;C:\Program Files (x86)\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> </code>
 +
 +
 +For Therion 6.0.5 onwards, add this line to the file ''%APPDATA%\Notepad++\shortcuts.xml'' ...
 +<code> <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files (x86)\Therion\bin\wish86.exe&quot; &quot;C:\Program Files (x86)\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> </code>
 +(The name of Wish86 was changed)
 +
 +For Therion 6.2.0 onwards, add this line to ''%APPDATA%\Notepad++\shortcuts.xml'' ...
 +<code> <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files\Therion\bin\wish86.exe&quot; &quot;C:\Program Files\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> </code>
 +(Therion is now 64 bit only, so it has been moved out of the x86 programes folder)
 ---- ----
-**Open a new instance of Xtherion with the currently active file using Ctrl shift X**+**User defined language (UDL) styler for survex and for therion** 
 + 
 +The old legacy way of adding new UDLs to NotePad++ was to edit the file userDefineLang.xml in ''%APPDATA%\Notepad++'' 
 +Nowadays there is a userDefineLangs folder in which you can add your individual UDL xml files.  The easiest way to navigate here is to use the NotePad++ menu sequence ''Language.UserDefinedLanguage.OpenUserDefinedLanguageFolder...'' It will open the folder in Explorer.
  
-Modified keyboard shortcuts to include opening therion using Ctrl+Alt X +You can build your own UDL interactively by using a built-in dialog accessed via menu ''Languages.DefineYourLanguage...''  or you can copy a pre-built UDL from {{https://github.com/CaverBruce/NP-plus-plus-CaveUDL|NP-plus-plus-CaveUDL}}
-{{:contrib:shortcuts.xml|:contrib:shortcuts.xml}}  (Download the file then save to %APPDATA%\Notepad++; don't open it in your browser as it will corrupt the file contents)+
  
-Actually the above file is rather old and assumes Therion is on the D: drive, you will need to edit it if your Therion is on a different drive. Might be better just to insert the code below in the <UserDefinedCommands> section of the default shortcuts.xml file that installs with NotePad++.  This will avoid overwriting recent improvements made by the NotePad++ authors. 
-For Therion 5.3.13 and earlier... 
-<code> <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files\Therion\bin\wish84.exe&quot; &quot;C:\Program Files\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> </code> 
-For Therion 5.3.14 and later ... 
-<code> <Command name="XTherion_THIS_file" Ctrl="yes" Alt="yes" Shift="no" Key="88">&quot;C:\Program Files\Therion\bin\wish86t.exe&quot; &quot;C:\Program Files\Therion\xtherion.tcl&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command> </code> 
 ---- ----
 **Run Therion compiler on the currently active file without invoking XTherion using Ctrl + T** (Footleg) **Run Therion compiler on the currently active file without invoking XTherion using Ctrl + T** (Footleg)
Line 153: Line 172:
  
 Note: vi too has the shell, '':!'' followed by the command. Note: vi too has the shell, '':!'' followed by the command.
 +----
 +
 +==== VSCode Extension ====
 +
 +A VSCode extension to enable syntax highlighting, formatting, and code completion for Therion files.
 +
 +Install from the VSCode store: https://marketplace.visualstudio.com/items?itemName=rhystyers.therion&ssr=false#overview
 +
 +----
 +==== PIXLR E ====
 +
 +A free online image editor you may use to edit, crop, rotate and erase white space of background images and save them as .png with transparency. Maximum size for free online version is 4096x4096 px. There are paid and paid desktop versions too.
 +
 +https://pixlr.com/
 +
 ---- ----
  
  • contrib/externaleditors.1522138682.txt.gz
  • Last modified: 7 years ago
  • by brucemutton