solved: html matching in cpp file

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
DerellLicht1
Posts: 177
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

solved: html matching in cpp file

Post by DerellLicht1 »

This has actually been going on for quite a while, but it isn't all that awful, it's just odd...

When I'm editing a .cpp file, and I type Control-B, I get this:

Code: Select all

<b></b>void getx_clear_output_str(void)
so the .cpp parser seems to be handling Ctrl-B as a "select Bold attribute" command...
I think this is probably unintended behavior ???

<context>
The reason I keep hitting this, is because the ancient Brief editor, which I used back in the MSDOS days, used Ctrl-B for "show list of all bookmarks", and I use bookmarks alot.
When I switched from Brief to MultiEdit, back around Y2K, it had a Brief keyboard emulation mode, which duplicated this command... so I'm used to it...

Yes, I know that Shift-F2 is what I actually want here, but 30 years of coding habit do not die away peacefully!!!
</context>
Last edited by DerellLicht1 on 18 Jul 2025 14:14, edited 1 time in total.
User avatar
pjj
Posts: 2250
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: minor issue: html matching in cpp file

Post by pjj »

As I understand this, there are no "shortcuts per highlighter" and one shortcut acts the same irrespective of said highlighter. If I press ^B in .txt or .csv or .css or any other file, I always run the same InsertStrongEmphasisAction which inserts (in my case) <strong>%sel%</strong>.

Would it be cool to have "shortcuts per highlighter"? Yeah, maybe, but is it worth the effort? I suppose it would require overhaul of "Customize keyboard" module at the very least. If you don't edit HTML files, perhaps just remapping ^B (adding it as a wingman [so to speak] to Shift+F2) would do the trick for you?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6822
Joined: 19 Jul 2006 14:29

Re: minor issue: html matching in cpp file

Post by Rickard Johansson »

Maybe I should remove those shortcuts and let users set shortcuts themselves :?
User avatar
DerellLicht1
Posts: 177
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: minor issue: html matching in cpp file

Post by DerellLicht1 »

Okay, that's interesting...
So I've been using RJTE for several years now, and only *now* am I discovering that it doesn't have per-extension key mappings??
My previous editor *did* have that, and I guess I just assumed this one would too!!

Anyway, now that I know, that's fine, I can live with that!!
I like pjj's suggestion of just mapping Ctrl-B to same as Shift-F2 ... I'll do that...
User avatar
pjj
Posts: 2250
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: minor issue: html matching in cpp file

Post by pjj »

Rickard Johansson wrote: 18 Jul 2025 12:44 Maybe I should remove those shortcuts and let users set shortcuts themselves :?
I believe in the value of sane defaults; therefore I believe ^B should act as it currently does, and F1 should still invoke help :wink:
SANE defaults
The default behaviour of functions, APIs, applications, etc is often specified or designed to be ‘sane’ - but what does this actually mean? Use the SANE default acronym.

Simple
The default options should give usable and useful output for the majority of use cases. Little-used functionality is for non-default behaviours.
(...)
https://ebaker.me.uk/notes/SANE-defaults
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Post Reply