Plain Text less Files vs style


#1

“.less” files appear to be plain text files. I find it helps me to put in visual references in a long page of tags and coding, even relatively simple coding as TaskPaper uses in it’s .less files. At the moment using plain text I do the best that I can using what I have. I have;

// -----------------------------------------
// ----------------------------------------

Between tag blocks for example.

I opened the 'less in Nisus and tried bolding some words, adding color but it said it was still a plain text file and I would not save my styles.

What is the reason that the .less file has to be in plaintext? I assume there must be a reason for this as rich text would make annotating and customizing the .less file a lot easier.

If it has to be plaintext then I will continue to make do of course.


#2

In theory it could be made rich text I guess, but in practice these sorts of configuration/style files are always plain text. The intention is that you edit them in a editor that will syntax highlight the less format such as:

  • SublimeText
  • Atom
  • Etc

#3

I see a potential conflict of interest here. No disrespect intended but, those editors that you mentioned appeal to people who understand code and probably live in a code friendly world. No disrespect to them either. But, TaskPaper is also marketed and heavily used by others who are not very much into code.

For myself I have dabbled in the code world a bit but only so much as I have to to get a script working or change a css file for some text effect or tweak some html code. I am also not afraid of dabbling in Terminal or changing system level settings.

But my brain does not live in the code world. Some people do live in that world and they are probably also fans of the software that you mentioned. For me if it is all the same, why not allow the editing of a less file in both rich text and plain text. Is this even possible?

I make the most use of TaskPaper using the less file like a css file would affect a web page. I use the less file to add custom colors, line heights, attributes, etc. I can continue as I have been doing using it as a plain text editor. But if it is all the same to you which is to say, implementing the change would not affect those that depend on the code editors you mentioned then why not go for it?

Adding style attributes such as bold, underline, and color could be useful. this is especially true the more you take advantage of Taskpapers advanced features.

Added: I think what you are saying is that formatting similar to how the AppleScript Editor and others like BBEdit can format a code block, is this what you meant? If you put in the option to do this in styled (Rich) text, will this break that code structure process?

BTW, I can open a less file in BBEdit, TextWrangler, etc and I see no colored syntax as the AppleScript editor would have done if it had recognized this as some sort of correctly syntax-written code. I guess I am not completely understanding (again) why this has to be plain text?


#4

Yes, I mean syntax highlighting such a AppleScript editor will do. And yes, it wouldn’t work if the .less files were changed to rich text. BBEdit, etc are only intended to work with plain text files.

Less probably isn’t supported by default in Bbedit. It looks like you’ll have to include:


#5

OK, I guess that was part of my problem, I thought I had viewed it in an editor and didn’t see any change. FWIW I still have BBEdit laying around but never upgraded with their last upgrade. Which is say, I had it but never really made much use of it.

I am curious to know what difference it would make if I saw this all laid out with color and formatting auto applied in a code structure like the AppleScript editor does? It could be that I am really missing something.


#6

Here’s what the file looks like for me when I edit it in SublimeText:


#7

Third party perspective: most users never have to edit a .less file. Most will use the default StyleSheet or download a free one that another user has crafted and posted (just do a search for themes on this forum and you will probably find something that appeals to you).

If you have specific needs, I’d bet that if you post them, someone here would either make a StyleSheet for you, or help you learn how to do it if you post specific questions along the way.

I use Textastic to edit my .less files. I am including a screenshot of my setup so you can compare it to the Sublime Text example that Jesse posted.


#8

There’s a big difference between syntax highlighting and rich text. There are plenty of ways to separate or call attention to things using plain text–I just don’t see the ability to use rich text as a big enough advantage to justify breaking the less file format standard. There would be a certain irony in TaskPaper doing this, since one of its major strengths (in my opinion) is its use of plain text as its document file format.


#9

I wonder if it is really true that most users will never edit a less file? TaskPaper makes this quite easy as the styes menu will open the less files folder and double clicking on any of them will open them for editing. Mine opens in Bean of all things. Usually when code to modify a file is available to an advanced user it will rely heavily on challenging logic and on challenging ways to test your results - unless of course you are already familiar with that environment.

Thinking here of the now discontinued Mailsmith from the team of BBEdit. I found it a great app but very hard to customize beyond the basics as it’s developers made AppleScript the tool for customizing Mailsmith. I both love and hate AppleScript. I love what it can do but I hate the way it’s code was designed. Of course some would say I am wrong for saying that and really, I don’t care. It is not my intention to kick up code wars here. I am just saying that some people can think in code easier than others. And, some of us are quite capable of making good use of code and want to customize our user experiences.

If there are two shores, one the land of the coders and the other the land of the non coding users, then I would say that I must be living on an island somewhere between the two shores. A highly creative user who is not afraid to test coding where it is available because he still enjoys the promise of the first Apple computers, to think different. :wink:

I realized early on that playing in the less file was not very different from using a css files. And, like a css file by keeping my TaskPaper window open while making and saving changes I can see right away what I have affected. It is very easy to hit command-z and retry a different effect until I get it the way I like it.

If TaskPaper is going to stay in plain text then so be it. I don’t see any free alternative app I can download that responds to this sort of code reflecting proper syntax. I have already gotten used to not needing to use this in the TaskPaper Less files - although the occasional bold or use of a color would be nice. I end up using the double slash for comments - a lot.

The only truly annoying thing that I wish were not a part of the less file system is that when I paste in some change, the page always scrolls to the very bottom. I wish the darned page would stay where it was when I paste. I am right in the middle of making changes and - oops, got to stop and hunt for the results again. Now imagine that you just decided to add a new tag and you copied something that would have to have four pastes like the following where you wanted to add a new tag but now the tag had to be changed. Paste, go find the cursor and then where you just were, and repeat this 3 more times.:

// -----------------------------------------
// ----------------------------------------

// Changes the tag’s text of the tag “@focus”.
run[tag=data-focus] {
color: mix(lightgreen, black, 50%);
font-size: 18;
}
// Changes the text preceding the tag: "@focus"
item[data-focus] {
color: mix(white, yellow, 70%);
}

// -----------------------------------------
// ----------------------------------------

So, at the end of the day, I use TaskPaper a lot. It plays a key role in how I organize my thoughts and my tasks. It also allows me to use embedded hyperlinks to use my Curio workspaces very well. I am constantly refining my own workflow and so I am using the less files quite a bit. I have “made do” and I will continue to make do with plain text in the less files. Other than forcing me to retrieve the cursor from the bottom of the page after every paste (grrrrr), there is not much use of trying to force the issue or to argue farther the point.

I understand what folks are saying now that there is a coding syntax that, even though I have yet to code this way, really is quite useful to those who do. I would not want to see that taken away from them.


#10

I tried following this in Github. I saved the plist file but unfortunately there is no BBEdit languages folder in the BBEdit app support folder in my library. I am guessing this is becasue I have not upgraded after version 9.6.3 (2890) of Mon, 10 Jan 2011 and the instructions are for a later version of BBEdit.


#11

It would be useful for someone to develop a GUI for TaskPaper less files (in their spare time). I find the style sheets useful and decorative, and it is possible, but not much fun, to edit the text files. For me, TaskPaper is a tool that is day-to-day essential but not too techy. A style sheet GUI would be perfect for that use case.