Minor suggestion for Verbatim keyboard shortcut

Minor suggestion for a standard keyboard shortcut: `, [tab] to enter (inline) Verbatim mode. (Currently, that shortcut is unassigned, I believe.)

Currently, `, `, `, [tab] gets you a Verbatim code block. In keeping with this, it’s nice to be able to use the corresponding Markdown syntax (+ [tab]) for inline code.

I’ve given myself this keyboard shortcut, and get a fair amount of use out of it; I expect others would too, given how common referring to code is likely to be among TeXmacs’ intended user base. F7 seems to be the standard shortcut at the moment, but to me this seems a little arbitrary or unnatural, even despite being consistent with the other function-key text-formatting shortcuts (or, more precisely, an isolated TeXmacs convention, whereas ` is fairly universal at this point to signify code formatting).

I suppose anyone else could also just add it themselves, but in my estimation it’s natural enough and obvious enough to be included as a standard shortcut! Just mentioning it in case anyone else agreed (or disagreed).

EDIT: Actually, `, [tab] does seem to be assigned; it changes the character ever so slightly. So, I suppose I’d like to say that I think the keyboard shortcut would be more useful for Verbatim mode!

You can find all the shortcuts in ./TeXmacs/progs/text/text-kbd.scm It seems that ", var"(the notation for this particular key combination) is already in use both in text and math mode. You can redefine it for your own machine, see the Help, essentially you need to add to your init-texmacs.scm then command

(kbd-map (", var" (make 'verbatim)))

You can look at all the shortcuts already defined to gather an idea of the available commands.

See Help->Manual->Customizing TeXmacs

Looking back at this post after a couple years (whew) now that I’m reconfiguring TeXmacs after a long-overdue update, I realized I didn’t make my intentions clear! The keyboard shortcut I meant to suggest here was backtick tab, or ` var, since backtick is used to start monospaced text in markdown; I used commas only to separate the characters. Anyway, thanks very much for the info at the time—and now, for the reminder of how to do this! :slight_smile:

(Though, I now see there’s an “Edit Keyboard Shortcuts…” menu option—very interesting :eyes:)

1 Like

Keep in mind that we always look for contributions to the TeXmacs blog, for example a tutorial for beginners on how to configure TeXmacs.