aziz / PlainTasks

An opinionated todo-list plugin for Sublime Text editor (version 2 and 3)
MIT License
3.29k stars 286 forks source link

Feature suggestion: Code snippets with syntax highlighting support? #152

Closed mkanet closed 10 years ago

mkanet commented 10 years ago

I usually use one generic Default.todo document for my general purpose note taking and todo tasks. I'm if this is technically possible; but, it would be so nice to be able to define which SublimeText syntax highlighting to use for blocks of various code. Being able to include that in our Todo Tasks would be extremely useful (if it's possible to do). Maybe someone will consider on implementing something like this in PlainTasks:

/C# //Iterate 0 - 4 elements in inventory variable: for (int i=0; 1<3; i++) { inventory[i].print(); } Console.WriteLine("Done printing ") /C#

or

/JavaScript var os = require('os'); var message = 'This script is a running on Node.js ' + process.version + ' on a ' + os.type() + '-based operating system.'; console.log(message); /JavaScript

aziz commented 10 years ago

I think we should keep PlainTask as a todo list manager and not make it a note keeping plugin cause it's simply not planned and designed to be that. For note taking I'm working on a new plugin called PlainNotes which I've built for myself and been using it for a couple of months. it's not done and it's still a work in progress but if you're interested you can try it out here https://github.com/aziz/PlainNotes

mkanet commented 10 years ago

@aziz Thanks for your suggestion. I actually adopted Microsoft's concept of blurring the lines between "note taking" and "maintaining tasks" with their OneNote product; adding flexibility for both opinionated and unopinionated users. Anyhow, It seems like PlainTasks is still closer to what I'm looking for in general (for note taking and also managing tasks). I couldn't figure out how to get PlainNotes to expand/collapse an area of text like PlainTasks. I also couldn't find any way to add items under each area either like PlainTasks. I also didn't see any advantage of using PlainNotes over PlainTasks in respect to supporting hetrogenius code snippets in one document.

mkanet commented 10 years ago

I found a OneNote plugin, https://notehighlight.codeplex.com/releases/view/74083 that adds syntax highlighting support to OneNote. Works fine:

image123

michaelmagistro commented 4 years ago

I would second this feature and believe it deserves a second look. It makes the difference between having hundreds of random code files wandering around and being able to just embed small snippets in the task itself. even just having a fenced area which pops off all plaintasks syntax highlighting would be enough (no need to add syntax highlighting to the code block itself). it's when plaintasks treats code snippets as tasks (such as --comment in sql) that is the crux of the issue