I want .xslt files to be highlighted as XML in jEdit.
How to do it in jEdit?
There are different possible solutions according to what you want.
Besides that, there is an xsl mode that you might prefer for .xslt files over the xml mode. That mode is also the default for .xsl files which is the standard extension for XSL(T) scripts.
But as you asked for xml, I'll keep with that in the following descriptions.
If your .xslt file starts with an XML header like <?xml version="1.0" ?> (actually the important part is the <?xml in the beginning), your file is automatically highlighted with the xml mode, independent of its name
If you want to highlight the currently viewed file with a specific mode as long as it stays in the recent files list, just change the mode in the buffer settings, reachable through double click in the status bar on (<mode>,<wrap>,<encoding>) or via Utilities -> Buffer Settings...
If you want to highlight a file always with a specific mode, no matter in which jEdit you open it, embed the mode as buffer-local property in the first or last 10 lines of the file like <!-- :mode=xml: -->
If you want to highlight all files that end with .xslt with the xml mode, you need to edit your mode settings. For this
go to Utilities -> Global Options... -> jEdit -> Editing
select the xml mode
uncheck Use default settings
edit the File name glob to also match .xslt files
Permanent solution (assuming linux, you didn't specify a system)
Terminate jedit.
Copy the file /usr/share/jedit/modes/xml.xml to your local jedit pref directory under modes/
cp /usr/share/jedit/modes/xml.xml ~/.jedit/modes
Edit ~/.jedit/modes/catalog so that it looks
<?xml version="1.0"?>
<!DOCTYPE MODES SYSTEM "catalog.dtd">
<MODES>
<MODE NAME="xml" FILE="xml.xml"
FILE_NAME_GLOB="*.{xml,xhtml,xslt}" />
<!-- Add lines like the following, one for each edit mode you add: -->
<!-- <MODE NAME="foo" FILE="foo.xml" FILE_NAME_GLOB="*.foo" /> -->
</MODES>
or to taste, look at the xml/xsl entries in
/usr/share/jedit/modes/catalog
If you are the master of your machine, you can also edit /usr/share/jedit/modes/catalog directly and modify the
FILE_NAME_GLOB="*.{xml,xslt,xhtml,xsd,qrc,ui,docbook}"
in the MODE NAME="xml" part
Related
I want to change the style i.e. theme, button style, font and other items. I can change its style by my own if I can locate the IDLE.py file. So I want to know either of 2 things
--> Where is IDLE located?
--> or How to change everything of it?
Please Help me in getting any of these!
The IDLE application consists of multiple files in <python-dir>/Lib/idlelib. The idle.py file in that directory is just a startup file.
The editor/shell font can be configured in the Fonts tab of the settings dialog open by Options => Configure IDLE (or IDLE => Setting on macOS).
There is no setting to change the style of widgets. IDLE currently uses ttk widgets when possible. It you edit the idlelib files at all extensively, I suggest you make a copy of idlelib so you can make a diff between the edited and original copies.
As can be seen on the picture TextEdit on mac gives only limited options of file extensions in which I can safe a file. Lisp not included.
Create .lisp files
https://www.tutorialspoint.com/lisp/lisp_environment.htm is describing everything step by step, but it says TextEditor on Mac can save .lisp files, which I wasn't able to do.
Load .lisp file
(load "filename.lisp") leads to error: file with such name doesn't exist
TextEditor on mac has limitations to how file can be saved (.txt, etc.). You can use any other editor, ex: TextWrangler, which allow you to write file extension. Or you can use editors specific for lisp, ex: Emacs (more massive)
It's possible that when you type (load "filename.lisp") it searches in some specific directory, where it's not present. So, to avoid this, you should type full path to the file you want to open. Ex: (load "/Users/macbook/Desktop/foldername/filename.lisp")
I'm trying to build firefox.
it says to edit my mozconfig file. I see a moz.configure file, but no mozconfig file. Should I edit the moz.configure file or create a mozconfig file?
You should not be changing the moz.configure file, as this is a configuration file used internally by the mach build system.
Instead, you should create your own .mozconfig file (don't forget the initial dot!) and put your customization options in there. Simply touch .mozconfig to create the file, then edit it. A brief overview of that file is available on MDN.
How to create a .vm (velocity template file) from command line in Windows
Based on you comment I assume what you really mean is how to made file which by default opens with some specific program you have. Here is several thing to be taken into account:
To create .vm file from command line you can use this question
By default windows doesn't show file extensions in explorer - so you won't actually see that it is .vm file in explorer. Reffer this guide to show file extensions.
There is such thing as file associations - e.g. default program to be use when you open file (for example double click). Also this affect icon shown for the file in explorer.
So to summarize - file created from command line(using method from referred question) have .vm extension. You don't see this cause your windows settings doesn't show extensions. You assume it is text file cause notepad++ icon shown for it as well as it opens with notepad++. That's a wrong assumption - simple you have notepad++ associated to open .vm files. If you want to use different program - you need either:
Change file associations (see link above).
Use open with option to open file with another program (right click menu option)
Use Open function from inside your program.
I'm trying to get BBEdit to recognize my ctags file for a Rails project. I've tried generating it both with ctags-exuberant directly and with the bbedit --maketags command. While the tags I generate work perfectly in Vim, no such luck in BBEdit. No error messages or anything, just no symbols trigger completion or allow me to jump.
I've tried moving the tags file into the project directory, no luck. I've tried generating one lower down in my hierarchy (my models folder) and jumping between model classes, no luck.
Any ideas?
In case anyone else comes upon this question like I did, here's the answer from BBEdit support. In short, if you're using OSX Fuse, do this in Terminal:
defaults write com.barebones.bbedit DisableCtagsScanOnRemoteVolumes -bool NO
Full answer from BBEdit support:
Cribbing from the "Expert Preferences" page of the Help book (Help -> BBEdit Help):
====
** Miscellaneous **
[...]
When editing files that are on remote file servers (AFP, NFS,
SMB, etc), BBEdit will not look for directory-relative tags
files or settings files. This is a particular performance win
when the file is located on a volume mounted via MacFUSE/SSH or
similar, or if the file server is over a slow or high-latency link.
To enable scanning for tags or settings files on remote volumes,
use these [ Terminal commands ] separately or together:
defaults write com.barebones.bbedit DisableCtagsScanOnRemoteVolumes -bool NO
defaults write com.barebones.bbedit DisableSettingsScanOnRemoteVolumes -bool NO
====
Please note that if your only need is for ctags, you need apply only the first option ("DisableCtagsScanOnRemoteVolumes").
From the BBEdit manual (pages 302-304):
Using ctags
BBEdit allows you to generate and use tags files as text completion
sources, and will recognize any tags files associated with your
documents.
You may place tags files generated via ‘bbedit --maketags’ in the
Completion Sources folder of BBEdit’s application support folder (see
page 32) for use as text completion sources.
[...]
Tag Files as Completion Sources
You can now add tags files to specific locations to make symbols
available as completion data sources when editing in desired
languages. In particular:
When you build a (coded) language module, if you place a file named “tags” in the language module’s “Resources” directory, BBEdit will
use those tags as completion sources.
You can generate a tags file (using exuberant ctags or “bbedit --maketags”) and place the resulting file in Application Support/BBEdit/Completion Data/ /, where “
name>” is the name of the language as it appears in the list of
installed languages (or on the Languages popup menu).
So, for example, if you were to generate a tags file for the 10.6 SDK
so that you could add completion data when editing Objective-C files,
the file would go in Application Support/ BBEdit/Completion
Data/Objective-C/. Tags files can be given any appropriate name, so
you can have multiple tags files for a single language, and they will
all be examined when generating completions.
And the Completion Data section on p32:
Completion Data
This folder does not exist by default, but you may create it. The
Completion Data folder contains tags files (or aliases to tags files)
which can provide additional text completions for editing documents in
the corresponding languages. These tags files should be in the format
generated by ‘bbedit --maketags’, and must be placed in subfolders
corresponding to their languages.
Each subfolder should have the exact name of its language as that
language appears in the list of installed languages (or on the
Languages popup menu).
For example, the subfolder containing a Python tags file must be named
“Python”, and the subfolder containing a tags file for ANSI C must be
named “ANSI C”.