Sublime Forum

Org Extended

#1

Inspired by the excellent but now somewhat dated orgmode plugin I am endeavouring to bring some orgmode features to Sublime Text.

The plugin is still not ready for prime time, still in the prototype phase and it is far from being in a publishable state.

That said, I am finding Org Extended to be a very useful tool already.

If anyone would like to joing me in working towards a functional Org Mode on sublime:

3 Likes

#2

This has now been released.

https://packagecontrol.io/packages/OrgExtended

The initial release had all the basic orgmode goodness. checkbox lists, numbered lists, formatting, html export, reveal.js export, tags, priorities, drawers, fold cycling, inline image previews, clocking, links with custom protocols, etc. etc. etc.

It also had support for the agenda with lots of filtering commands.

1.2.0 added support for “spreadsheets” in orgextended.

We are driving to 1.3.0 with babel support which is inline source blocks and the ability to use tables, lists and other named document features as data sources. At this point we have support for powershell and python with most of the basics of babel. NoWeb macros are not yet supported.

In addition we have support for plantuml, graphviz, ditaa blocks. With the inline image preview these work pretty well:

1 Like

#3

Okay I have just signed up on the forum to say how ridiculously excited I am to see this. As much as I love emacs and org-mode, my coding days are mostly behind me and I realistically just dont have enough time to be tinkering with config files, no matter how much I want to. Enter sublime and it’s performance and tiny footprint. I’ve been hesitant to fully jump ship but now I am in all the way. And the release is so perfect, with all the important features of the org, beautifully done documentation, and even animations to show the features off!

I am so grateful! Please let me know how can i support your development efforts.

0 Likes

#4

I am very glad to hear it.

I started this project out of frustration with emacs on windows. Its just so frustratingly slow. GccEmacs shows promise of helping but the I/O performance of the msys2 version is so terrible. WSL2 is great, until you try to work with data on your windows side.

I needed the performance of a great editor like sublime, but I just couldnt live without org mode. There was a great initial orgmode package, but it was more org file format than mode. I added one feature, then another, and eventually realized that while it was still my little hobby project for my own sanity, it had turned into something that others might really find helpful to. The plugin community is pretty awesome for sublime.

I really hope it is helpful for you.

I still crave some of the pretty features on emacs like variable sized fonts, org bullets, narrowing support, but I think what is here is quite good.

Honestly, to help… use it, give me feedback, push a PR for the docs (or add new sections) all of that helps. While having friends join in and help improve the plugin is great, the plugin will continue to mature if it has a community that is actively using it.

1 Like

#5

Thanks @ianhd. As I am going through the initial setup and documentation, I’ll send you pull requests or issues for stuff I encounter.

BTW, what font are you using in your gifs? Looks real legible without being bold.

Is it too soon to discuss feature requests? :slight_smile: I like to have a bit of a historical journal of my agenda and effectively have org-mode create a new daily note for me, automatically adding all of the tasks that aren’t marked complete. The previous day’s note then just goes into the archive. What would be the best way to implement this? I am happy to take a stab at it myself, but would love a pointer from you so I don’t have to go through all of the codebase.

Thanks again!

0 Likes

#6

I think I am currently using Fira Code. I tend to bounce around between color schemes, themes and fonts. I like Inconsolata and Source Code Pro. With Fira Code I am unsure if I like the ligatures or not, we will see.

I have toyed with the idea of extending Fira Code with ligatures for the org bullets. (** vs *** vs **** turning into " Symbol" etc equivalents) I would need to have an independent font for org mode buffers for that though, haven’t tried to see if sublime supports that. It might just get in the way with source code snippets et al, or it could enhance the experience… I am unsure. Emacs just does the substitution dynamically but we don’t have that luxury in sublime and I am told for performance reasons won’t be able to get it. I do so like alternate font and font sized headers and fancy bullets though.

Meh c’est la vie.

Vs-Org an attempt at building orgmode for vscode does a dynamic substitution in the buffer where they swap the stars for unicode glyphs. I thought about doing something like that but it was just to problematic with the gamut of other org mode features I wanted to handle. I would have to worry about removing those special symbols before you saved and detect the symbols, swap them dynamically when you loaded and somehow trick sublime into thinking the buffer wasn’t modified. I decided it was NOT worth it.

https://marketplace.visualstudio.com/items?itemName=BobbyBoyd.vs-org

0 Likes

#7

Daily Journal.

Of course you can ask. If I understand the feature fully, it can work in the spirit of org mode, and have time I will certainly make changes where I can. You are also very welcome to work with me and push PRs. I I have a second collaborator that helps keep me honest and has fixed a number of bugs and I have already added a few features for a couple of people. The source is a bit of a mess since a lot of it was hacked
“in a few minutes one evening”
“while waiting for a meeting to start some afternoon”
“while waiting for something in the car”

Many of those stolen moments are why I would LOVE to see sublime operate on my phone! I am still using my doom emacs config in a termux session on my phone to implement a bunch of features for sublime! Which is kind of ironic.

orgagenda.py is probably where you want to start for an example of walking the DB to get the details of the day.
Each of the panels (separated by ===============) are independent “View” objects that each get access to the org file DB, get to filter the results they care about and produce a “Render” of what they have filtered.

Then you probably want to look at orgcapture.py which has OrgArchiveSubtreeCommand which is a text command that can archive a subtree. It’s… quite a hack, but should give you enough to build your own. NOTE: Because I have chained editing of a buffer going on in there (adding property drawers and adding properties for the archived element) you are going to run smack dab into one of the little goofy things I did which is use pymitter and an onDone token to allow me to chain sublime textcommands (Execute one text command after another, once it executes) Where I can’t do that (like running the sublime “save” command) I cheat and use a timer to run after the command has executed. Like I said… it’s an ugly little hack. Sadly the capture code was probably one of the first things I wrote, so it is probably one of the worst offenders of some of those hacks as I learned better ways to handle some of that stuff later on.

Finally, you either will want to tie into the notifications thread if you are trying to do this automatically, OR have your text command bound to the agenda? For that I use independent syntaxes… That is a major hack I do to allow me to have independent coloring of the buffer (based on an independent syntax) and independent key bindings, like the agenda where enter will open the item and space will open it in a new window. You can see the agenda bindings in Default.sublime-keymap.

Otherwise, if you can make an issue on my github for it with a very clear description of what you want, the more clarity, the higher the likelihood I prioritize it, I will see if I can make time to work on it sometime in a future release.

1 Like

#8

NOTE: Org Extended has a feature to “auto generate” an extended color scheme for you. It does so into a sub folder in your User folder.

This is because systems like the agenda rely on specific entries having certain properties. Like foreground and background color being the same color to make some of the block diagrams I use in the agenda etc. That said, while the generated color scheme is your existing scheme + has those really important items, it will be minimal, it doesn’t automatically add colors for all headings if your syntax has decided to color some of the generic syntax elements I tie into the same color (classes functions etc). THAT SAID, there are specializations of all of those and the generated syntax tries to give you some big comment blocks to help you tweak it to your hearts content giving you the colors you want for your headings etc.

The other oddity here is that it will automatically convert a text mate color scheme into a *.sublime-color-scheme yaml syntax as I only wanted to write one exporter in doing this feature.

I am often switching color schemes as I find I get bored sometimes.

0 Likes

#9

If you are wanting to be part of moving this thing forward with me I have a discord that I would be happy for you to join and we can chat about things at length:

0 Likes

#10

Thanks for the overview and the invite. For the time being I’ll file an issue on github with the context you provided here, just so we have everything in one place. If I get time to work on it, I shall. If someone else picks it up, awesome as well.

Joined the discord as well. Again, thank you so very much for all this work! It is indeed pretty funny and ironic that you’re using emacs via termux to work on features for sublime :smiley:

0 Likes

#11

I just installed orgextended, it says extended though, does it require another plugin?

I need a way to preserve subfolds when unfolding a top level fold. For now, when I unfold a fold, it also unfolds all 20 of the subfolds within the top level fold, it’s driving me crazy.

Orgextended seems to be able to preserve the subfolds that exist within a top level fold, but it’s extremely complicated to use. Is there a folding tutorial for people with low IQ like me?

I have orgextended installed:

  • When I press ALT O, nothing happens.
  • If I press ** twice, I see I can make a heading cool.
  • If I press *** three times, I can make a sub heading, nice.

How can I prevent the subheading from being unfolded when unfolding the top level heading?

0 Likes

#12

Org extended got it’s name because it was a fairly major extension of an existing plugin.

Org mode is an imitation of a subset of emacs org mode in sublime. It includes spreadsheets, dynamic documents and literate programming with babel support. Diagram creation, in document visualization, capturing, refiling, an agenda all supporting common organization systems like GTD and others backlink support a la org roam, cross link insertion, exporting, dynamic blocks, clocking, a tagging system, meta data through drawers and properties and many many more features all trying hard to stay in the spirit of emacs org mode.

The folding system does not support keeping sub level folds. It cycles folds and through the use of property comments can start at a particular cold level such as content overview #+STARTUP: content

My docs leave a lot to be desired, and are linked from the package on package control, but to be fair… org is HUGE and has an entire community working on it and I am just one guy.

There are some docs on folding here, but they leave a lot for you to discover… sorry I get to work on the relatively infrequently.

0 Likes

#13

The orgmode manual talks about the in buffer settings I mentioned:

https://orgmode.org/manual/In_002dbuffer-Settings.html

(STARTUP) I support “some” of those.

0 Likes

#14

It hasnt made its way into the docs but there is an option to aggressively refold the buffer heading except for the current tree you are on. The notes on that option are in the release notes and i will get it into the docs when i can

0 Likes