kandi X-RAY | sublime-packages Summary
kandi X-RAY | sublime-packages Summary
sublime-packages
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Runs the editor
- Push text onto the buffer
- Adds text to the kill ring
- Extract the prefix from a string
- Process options
- Return a list of functions that match the given argument name
- Check if code should be ignored
- Parse errors
- Add a new error message
- Extracts annotations from code
- Removes line comments
- Open file with given extensions
- Move file to trash
- Code executed after recognising text
- Creates a regular expression from a string
- Process line blocks
- R Check for blank lines before a function
- Find completions
- Update the title
- SELFTEST checks
- Runs the test suite
- Compute completions
- Filters diff results
- Run selection
- Parse diff output
- Run the diff
sublime-packages Key Features
sublime-packages Examples and Code Snippets
Community Discussions
Trending Discussions on sublime-packages
QUESTION
I am using Sublime Text 3, in this case to edit LaTeX. To further customize the syntax highlighting I would like to define a new scope that simply extends the shipped LaTeX.tmLanguage
(to which I do not have access, not even to read). N.B. I have no interest to write my own tmLanguage-file, not even to download an existing, I just want to extend it, much like overloading a class in Python.
In particular I would like to add meta.footnote.latex
to have a custom syntax highlight for \footnote{...}
(one definition I found in https://github.com/bradrobertson/sublime-packages/blob/master/LaTeX/LaTeX.tmLanguage)
ANSWER
Answered 2017-Apr-19 at 14:50You can use the include directive to import existing rules from a different file and override or extend its rules.
.tmLanguage:
QUESTION
According to this source the definition if Permute Lines
submenu is following:
ANSWER
Answered 2017-Mar-31 at 22:01To answer your second question first, you can always get at the most recent menu definition from your own copy of Sublime; it's stored in the file Default\Main.sublime-menu
, which you can get to most easily using PackageResourceViewer to open it up.
That said, the part of the menu that you're referencing in your question is the same between Sublime Text 2 and Sublime Text 3 and neither of them has an id value directly within the Permute Lines
sub-menu.
By creating a Main.sublime-menu
in some other package (e.g. your User
package) you could create entries that are adjacent to that sub menu, but in order to actually put new content directly inside of it you would need to create an Override.
You can do that via PackageResourceViewer; if you use it to open up the Default\Main.sublime-menu
file, you can modify the file and when you save it, it will be saved as an override.
From this point forward your override becomes the new default menu; other packages that extend the menu can still do so, but they will be merged with your version and not the shipped version.
This is not without its risks in that if a future version of Sublime Text includes a modified version of the menu, your override will still take precedence and you won't be warned that it's happening, so you could potentially miss out on fixes.
This happened recently when the latest build of Sublime modified the base menu to include an install link for PackageControl, for example.
Also, this is only a viable solution if you want to edit the menu for your own purposes; if you're a package author, you can't use this method to distribute your own changes.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sublime-packages
You can use sublime-packages like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page