15

In this case, definitely no. In particular, showing a command as DW is misleading; D already does something different than dw. Also, vi is a terminal program, it doesn't see keypresses as such, only characters. It doesn't care if you use Caps Lock instead of Shift to get the uppercase D, so presenting the command as Shift+D is beside the point too. I took ...


9

I agree with @ilkkachu's answer that in this case, the original typesetting of the answer using "code" formatting rather than "keystrokes" makes more sense, and my edit should probably have been to revert to that typesetting. Still, we need to find a consistent style on how to represent keystrokes. I have the impression (but cannot back ...


8

Should keys represented with <kbd> tags be always uppercase? No — they should probably represent the exact case that is needed for the function. Where it could be confusing (i vs I vs l vs L and o vs O vs 0), it might be worth a parenthetical to spell out the letter.


3

Personally, I do indented code blocks in lists using the triple backtick syntax, and then I use Ctrl+K on them to do the indentation: So, first write the code block this way: * Some list item showing a way of writing a particular loop: ```sh unset -v err for name do [ ! -f "$name" ] && err=true fi "${err-false}" && exit 1 ``` ```shell $ ./myscript ...


Only top voted, non community-wiki answers of a minimum length are eligible