Hacker Newsnew | past | comments | ask | show | jobs | submit | msf1024's commentslogin

The reason I write in markdown is because it is fast and keyboard-driven. I don't want to see it when I'm looking at my notes or editing them. The idea that it is meant to be seen is no more than a personal preference.


> 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.


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-*


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.


awesome! i look forward to hearing how you end up doing it


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


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.)


I think in practice, people write "Emphasize words like this.", then <left> *, then <C-left><C-left> *. At least I myself usually add markup immediately after writing the words to be marked up.

The problem with Word-like editor styling is exactly that the boundaries are invisible, and the style is applied destructively to everything within highlighted range, instead of non-destructively by the range itself. What I mean is, if in the example above, I want to change the emphasis to only italicize "this", I can kill the first * and place it a word later. In Word-style editing, I'll have to highlight the whole "like " sequence and un-italicize it, hoping I didn't miss a space or a dot that invisibly retains the italics and then screw up editing for you down the line.


> I think in practice, people write "Emphasize words like this.", then <left> , then <C-left><C-left> . At least I myself usually add markup immediately after writing the words to be marked up.

Is this very different from "<left> <Ctrl+Shift+left> <Ctrl+Shift+Left> <Ctrl+I>"?


I do not know what exact keystrokes people use. When I am writing a lot of text, I eventually converge into writing like I described. Because it is faster and I know what I want.

What I also know is that when out company switched to visual editor only, people stopped using these. They stopped writing long texts - and those were those the most valuable.


you will probably appreciate the keystroke command design in https://news.ycombinator.com/item?id=41258170


Not sure whether most people do that? I nearly always press * or Ctrl-I before the italicized text I’ll type, and see that often among other people in the office.


I'm guessing it depends whether you type at approximately the speed of thought or not; in my case, I'm often halw-way through a passage before I decide I want it italicized.


> 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.


But uh, how do you undo the styling from the keyboard? Does Backspace turn "italic" into "*italic"?


I personally like the way that Obsidian and Typora hide the styling: when you get to where it would be, it shows up on screen to show you it's there causing the styling. When your typing indicator moves away from it, it hides it. Some don't like it because it can cause some displacement of text a bit because it's now showing characters it didn't before.


I found Obsidian’s way of doing it to be a bit jarring at first but now that I’ve used it for awhile I personally quite like it. Just takes a little while of getting used to


You could probably do this in a way that doesn't trigger text reflow if a popover appeared with the visible syntax exactly positioned such that the extra syntax slightly obscured surrounding text. It's a tradeoff but I think that might be slicker.


Not a user of either of those but that sounds an awful lot like "Reveal Codes" from WordPerfect which saved my ass more than once when formatting got screwed up in a document.


I've seen editors do it that way, and if you know what it looks like in your head, it works quite well, IMO.

I can't imagine how it works for people who aren't pretty good at the syntax.


It does on a lot of editors and I hate it. On my vim the highlights only get added/removed when I switch back to normal mode, during editing nothing changes except for the actual keystrokes.


Ctrl+Z


But where would you split it? Regardless of what the blue/red state maps show, it's really an urban/rural split.


No idea, but market research shows people are heavily moving around right now due to political orientations.

I can imagine the the southeast becoming completely red and the northeast becoming completely blue.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: