Sample Sublime Text 3 stuff for the curious and unwary
Switch branches/tags
Nothing to show
Clone or download
OdatNurd Include log_toggler.py (#19)
* Include log_toggler.py

This includes a simple plugin that allows you to easily toggle the state
of the various logging mechanisms in Sublime on and off using a key
binding, command palette entry or menu item.

This also serves as a simple demonstration of using the `is_checked` and
`description` methods of the command classes to customize how a command
appears in the menu.

As there is no API for determining the current state of the logging
flags, the command tracks the current state itself, which means that it
will get out of sync with reality if you use some external mechanism to
toggle the logging.

This will clear itself up the next time you invoke the command (although
it may appear to do nothing), but on the whole this is probably not that
important since you likely already know what you're doing in that case.

* Add a new logging type to the base plugin

This adds in an additional logging toggle for logging build system steps
and also includes some typo fixes and tweaks to some of the doc strings
and the README file.
Latest commit e7e0973 Jul 18, 2018

README.md

Sublime Scraps

This repository contains a mixed bag of simple Sublime Text 3 plugin examples and customizations that are probably better stored as gists, but what can I say, I'm a rebel.

Some of the contents are are customizations that I use myself that others may find useful, possibly as a jumping off point for their own user specific customizations.

Others are small snippets of code that I've worked up in response to other users questions (e.g. on the Sublime forum or Stack Overflow) that I have been keeping in my User package.

Everything provided here is without warranty and with the proviso that as a C programmer and not a Python programmer, much of this is probably ugly to the gurus out there. Also some code is meant to be proof of concept and thus may not cover all use cases or scenarios.

The layout of the files here is:

  • customizations contains files that I keep in my own User package that I use day to day. This does not include my settings, however.

  • macros contains some sample macros (commented with an associated key binding) which illustrate how easy it is to customize Sublime to work your way.

  • snippets contains sample snippets that I have in my user package that others may find useful. Maybe. Probably not.

  • scratch_files is a simple plugin that I use all the time when playing around with code samples. See the README in there for more information.

  • config_popup is another simple plugin I made to make my life easier. It opens a small pop-up with configuration related entries only, including one for editing project specific settings. Handier than using the menu as not all of the options listed are in the command palette by default.

  • indent_test is a simple prototype plugin that performs tests on the indent rules in Sublime in a manner similar to how the internal syntax file testing works.

  • plugins is a bunch of one-off plugin samples that I have worked up in response to helping others (great excuse to learn the Sublime API) to stop them from getting lost in the mists of time, although I'm sure nobody would notice if they did.

  • quick_panel is a list of examples for using the Sublime text quick_panel in more complex ways than just a simple list of text.

  • build_enhancements is similar to plugins except that here the commands are for modifying how a sublime-build file is used. This allows for things like custom variables in command lines and selecting the command to build at runtime instead of hard coding it.

  • session_cleaner is a Python script that cleans the recent worksapces section of the Session.sublime_session file so that projects that no longer exist don't show up in the project switch panel.

  • package_bootstrap is example code that shows how one might construct a Sublime Text dependency that contains Sublime resources and have the dependency bootstrap those resources into a sublime-package package file and keep it up to date.