3 ms·
> I am sure I am not alone at chuckling at the idea [...] You might want to hold back on your condescending laughter for a bit. Neither vim nor nano allow me t
by adwn 8y ago
> I am sure I am not alone at chuckling at the idea [...]
You might want to hold back on your condescending laughter for a bit. Neither vim nor nano allow me to insert a control character by pressing Ctrl+key, so how am I supposed enter the FS character when editing a text file? Besides, there are other operating systems besides Unix and Linux (cough Windows cough).
- jodoherty 8y agoActually, VIM does support this. Type Ctrl+V in insert mode followed by whatever you want to insert (e.g. Ctrl+\ for the ASCII FS character). VIM will insert the literal value of the control code into the buffer.
- adwn 8y agoThanks! I had tried Ctrl+V followed by the character from the caret notation (e.g., "Ctrl+V \", instead of "Ctrl+V Ctrl+\"), and that hadn't worked.
- JdeBP 8y agoThe condescension here is supplied by you. Alas, it is based upon inaccuracy. VIM/NeoVIM cannot stop you from entering control characters by pressing [Control] and a key. It is a function of one's terminal or terminal emulator that (aside from employing some fairly unconventional keyboard maps) does not get turned off. You are confusing entering text with typing control characters on a keyboard. One types these control characters with VIM/NeoVIM all of the time. One of them, after all, is ESC, and the others are fairly common as I said. That the control characters are commands, even in insert mode, is a different matter. One such command is the SYN control character, typed on the keyboard of course with the [Control] key as [Control]-V, whose use demonstrates that in VIM/NeoVIM one most definitely can insert control characters as text. The fact that you brought up nano is also somewhat risible. That has a large banner across the bottom of the screen telling you what control characters the editor responds to, which one uses the [Control] key to type on the keyboard. It's staring you right in the face. (FS is even one of the ones on the main menu.) I'll let you discover the equally simple key chord that you can use with nano, which likewise does let you insert control characters as text with the [Control] key. As for Windows, you might want to fire up a console and actually try pressing some [Control]-key chords. For best results, run a console program that follows much the same convention. In TCC, for example, Alt-255 is the literal-next-character convention. But even without such a program, SUB as an end of input indicator, typed on the keyboard as [Control]-Z, is a fairly easy demonstration; and an application-level convention that goes back a long way. * https://jpsoft.com/help/editing.htm https://jpsoft.com/help/editing.htm
- dang 8y ago> The condescension here is supplied by you. Please edit that sort of thing out of your comments here. The GP shouldn't have included that provocation, but there are a lot of provocations on the internet, and for good discussion here we all need to build a certain immunity. A perfectly good thread about control characters needn't be marred by ill will! https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- twic 8y agoIt's not even a particularly good thread about control characters :(.