On Sun, Mar 24, 2019 at 9:38 PM mick crane <mick.cr...@gmail.com> wrote:
> Is there any text editor, preferably in a terminal that has the facility > to protect lines in the document, not the document itself ? > I've got 2 blocks of "code" that look similar and I keep editing the > wrong one and then it doesn't work. > mick > > Hi Mick, Actually, you can do this, at least in emacs, and this can be done in a terminal, at least in an xterm. If you're using emacs as an app, then it is just a matter of highlighting the region, then choosing Edit > Text Properties > Special Properties > Read Only (This is described in stack overflow, https://emacs.stackexchange.com/a/46066, where i learned about it.) However, you want to do it in a terminal, which is a good thing i think. In this case, you probably have to access the menu things without a mouse. But in xterm, at least, you can follow this procedure. First, if you do not see the menu along the top, do M-x menu-bar-mode. (If you can see the menu, don't do M-x menu-bar-mode, because it toggles.) Then, at least in xterm, you can do F10 (or function-F10) to get into the menus and use the arrow keys to move around, and do the Edit > Text Properties thing. Note that i do not know how to do this in xfce4-terminal, which is what debian gives me, because F10 gets me into the xfce4-terminal. But i don't know what terminal you are using, so don't know if that's an issue for you or not. Anyhow good luck, and it's a good question invho. dan