Notepad++ styles
-
the text isn’t changed, just the view and yes, the block select looks interesting,
meaning doesn’t work correctly anymore ;-)Cheers
Claudia -
It would be awesome to be scrolling through some code and see a comment like "Never Ever Change This: " in that size! :-D
-
"It would be awesome to be scrolling through some code and see a comment like "Never Ever Change This: "
That is exactly the sort of thing I have in mind, but unfortunately it looks as if all the styles are in use to display syntactic elements. I hadn’t realised that syntax colouring uses the styles - I think there would need to be some spare styles before what I have in mind would work.
David
-
HAHA. No, I meant it the other way: It would be really depressing to see such a comment in code! And being bigger than normal size would just make it worse. :-)
-
@Alan-Kilborn said:
Perhaps I’m naive but doesn’t something like that violate the fixed pitch mantra of pure text editors? How would one column-select a block with that going on?
LibreOffice can manage that trick - so why not NP++?
David
-
@Alan-Kilborn said:
HAHA. No, I meant it the other way: It would be really depressing to see such a comment in code! And being bigger than normal size would just make it worse. :-)
Well of course, if I wrote such a plugin, I’d provide a way to turn it off!
My idea was more that a program could show some structure rather like a DOC file. Large programs could be easier to read if they were like that.
David
-
@Alan-Kilborn said:
It would be awesome to be scrolling through some code and see a comment like "Never Ever Change This: " in that size! :-D
Means in the future UDL version we need three types of comments.
Line comments, block comments and hysteria comments ;-DCheers
Claudia -
but unfortunately it looks as if all the styles are in use to display syntactic elements.
don’t understand this? If you are writing your own plugin you’re free to use the styles for whatever you want. What am I missing?
Cheers
Claudia -
I guess some clarification would be required.
As @Claudia-Frank pointed out you are certainly able to write your own lexer and this would give you control over all of the styles to do whatever you want.
My assumption (whether right or wrong) was to work with existing lexers so that for example you could have a certain comment in C++ that would trigger certain sections to get styled differently.
Either way it is possible to do what you are wanting, just not easily.
-
.
@Claudia-Frank said:
but unfortunately it looks as if all the styles are in use to display syntactic elements.
@Claudia Frankdon’t understand this? If you are writing your own plugin you’re free to use the styles for whatever you want. What am I missing?
Well with only 5 styles, if I wanted to grab one to create a heading style for example with a large bold font, that would clash with the syntax colouring if it used that same style - at best a user would have to choose syntax colouring or my plugin - one or the other. I consider syntax colouring very important, so I don’t imagine I would turn on my plugin if I couldn’t use syntax colouring! . However, if there were some spare styles - 10 say, I could dedicate one for headings and not mess up the syntax colouring.
Obviously, a heading would be part of a comment as far as syntax was concerned.
David
-
Why do you think only 5 Styles are left?
Think about the 8 possible keyword groups for an UDL.
Each could be assigned with a different style if needed.
Scintilla defines the style range from 0-255. See here.I assume I still have a misunderstanding.
Cheers
Claudia -
@Claudia-Frank said:
Why do you think only 5 Styles are left?
Think about the 8 possible keyword groups for an UDL.
Each could be assigned with a different style if needed.
Scintilla defines the style range from 0-255. See here.I assume I still have a misunderstanding.
.
.
Ah - I had simply assumed there were 5 styles available because there are only 5 styles referenced in the shortcut mapper - your information is very interesting.
David -
Ah, I see - but those aren’t scintilla styles at all - these are indicators.
Might be a little bit confusing too ;-)Cheers
Claudia -
Claudia,
So can you tell me what the relationship is between ‘indicators’ and Scintilla styles? What happens if I mess with Scintilla styles inside NP++?
However, I did notice in the Scintilla documentation that the vertical size of the characters is fixed. You can actually see that in the screen image that you posted - because you have used one large font, the rest of the text is spaced out ridiculously - so I don’t think my idea is practical - at least not to create something with headings and subheadings.
David
-
with a style you can define different attributes to each of the chars in your text.
Forground color, background color, which Font to use, if bold, italic etc…
basically what you can do if using wordpad.An indicator is more like a rectangle overlaying the chars.
If your plugin defines the current document as a container you have the full access in regards of styling.
Notepad might jump in when someone defines a hyper link, therefore I would say, don’t use styles which
are defined by npp (I assume everything within global section of stylers.xml)Cheers
Claudia -
@Alan-Kilborn You could always include this (see http://patorjk.com/software/taag/#p=display&h=1&f=Small&t=Never change this!):
_ _ _ _ _ _ _ | \| | ___ __ __ ___ _ _ __ | |_ __ _ _ _ __ _ ___ | |_ | |_ (_) ___| | | .` |/ -_)\ V // -_)| '_| / _|| ' \ / _` || ' \ / _` |/ -_) | _|| ' \ | |(_-<|_| |_|\_|\___| \_/ \___||_| \__||_||_|\__,_||_||_|\__, |\___| \__||_||_||_|/__/(_) |___/
:-)