[SATLUG] vi editor and insert mode as regular user
brad at shub-internet.org
Fri Jul 24 15:19:52 CDT 2009
on 7/24/09 1:06 PM, John D Choate said:
> OK, but what about 'delete' and 'backspace'? I am not a perfect
> typist and make errors from time to time and those keys can come in
> handy for editing.
Those two are usually okay, but it's good to know the native keys for
when nothing else is available.
Heck, it's good to remember how to edit things with xed, or even ed,
because sometimes the terminal settings are screwed up enough (or
whatever) that you can't even use vi -- your only choice is to use a
line editor. I ran into this one myself a few weeks ago, and despite
the fact that I hadn't used a line editor in twenty years, I was able to
fix the problem and get the system back up and running.
> We are now straying away from my original question which was,
> Why is there the difference in behavior of vi for the root user and a
> regular user.
What you have described sounds like a difference in terminal settings to
me, but assuming you're using a graphical interface, I have sometimes
found that using a different terminal program (xterm vs. rxvterm, or
whatever) will produce different results.
Sometimes that can happen as a result of having different X settings for
the root and regular users -- the X settings affect the xterm, the xterm
affects the terminal settings within the window, and that affects vi.
> I want no more lessons in using the vi commands, tyvm. I can read the
> man pages and google for that stuff.
Point taken. However, let me say that I understood the difference in
the question, and I still wanted to point out why it's a bad idea to use
non-standard keys with vi.
Brad Knowles <brad at shub-internet.org>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
More information about the SATLUG