top | item 41256874

(no title)

Slackwise | 1 year ago

> because it is fast and keyboard-driven

How is it faster to press `*` than `Ctrl-I` in any other rich text editor?

> The idea that it is meant to be seen is no more than a personal preference.

Actually, the entire philosophy of Markdown is that, even if you didn't process it into HTML or some form of rich text, it uses common conventions that have been used across Usenet, IRC, and plaintext files for years, and is thus readable without ever being processed. In fact, you can likely take various plaintext files and process them and they'll gain many incidental markups and highlights.

Meaning, Markdown is Markdown without needing to be turned into HTML or rich text. It is, in itself, a great way to universally markup text as people have been doing online for years.

discuss

order

kragen|1 year ago

i haven't pushed it to github yet, but i have a keybinding for alt-* similar to the alt-` binding at https://github.com/kragen/kragen-.emacs.d/blob/master/init.e... which italicizes the previous word. that way, to italicize a single word, which is the most common case, i only have to press alt-* once. successive presses expand the italicized region leftwards over more words (this happens whenever the cursor is directly to the right of a *; it isn't activated by an invisible bit that remembers whether the previous command was also an alt-*)

(it also ought to italicize the selection when there's an active selection, but i haven't implemented that yet)

i think this is a superior interaction paradigm to the paradigm where ctrl-i sets an italics mode that doesn't visibly change anything near the cursor, but affects the future text you type. that design not only usually requires more keystrokes but causes mode errors. this is how ctrl-i and ctrl-b should always have worked, and if larry tesler had thought of the idea by 01983, that's how they always would have worked

however, the keystroke ctrl-i is easier to type than the keystroke alt-*

JNRowe|1 year ago

Stolen, thanks! I just played around with something like that in vim¹, and it works great.

I have a tooling issue with your method, perhaps in the same manner as you feel about C-i. To me "italicize $count previous words" makes far more sense than expanding the region on repeated calls. Although to be fair I can wrap over visual mode for that functionality which would feel more comfortable to me; "ge" end of previous word, "v", $navigation, ...

My point - to the extent I have one - is that there is probably a degree of personal comfort that colors our reactions to people using C-i.

¹ Basically "imap <C-S-8> <Esc>bcw*<C-r>-*<C-o>w". I'll give it some more thought, along with adding v:count and non-* support, before it hits my vimrc.

watwut|1 year ago

You need to highlight first and only then to press ctrl-I. So yes, typing is faster if you do it a lot.

scintill76|1 year ago

You may not be aware that Ctrl-I toggles the mode of new text, not just selected text. I think that poster was saying this:

If you're writing a new sentence in MSWord, you type "Emphasize words <Ctrl-I>like this<Ctrl-I>."

If you write a new sentence in Markdown, you type "Emphasize words *like this*."

The keys are neighbors even, at least in a US keyboard layout, so there is not a reason most US users would say it's "faster" to type * than Ctrl-I. (And if other layout users disagree, okay, but I don't think that was in the scope of the original point.)

themadturk|1 year ago

> How is it faster to press `*` than `Ctrl-I` in any other rich text editor?

The shift key is right under my pinkie, a bit easier than the CMD key on my Mac (much less the Ctrl) for me.