New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Are you actually editing the file in vi? Making changes? Saving the file?
Some details beyond "I am confuse" might be helpful
EDIT2:
My best guess without more details is that you might be unfamiliar with how vi works?
If that is the case, check https://wikihow.com/Learn-vi for some basic instructions
EDIT3:
ah, sorry ... that wikihow page is actually pretty lame (but it has pictures, lol)
Just do this whenever in doubt in vi:
escape
key:w
enter
key.This will save the current editor contents to the file on the disk.
EDIT4:
And by "press" I mean "press down briefly and then release" - don't keep holding the key down forever.
Some people might tell you to "hit" the enter key but that could go wrong in so many ways.
No hitting.
tail -F /path/to/file
^this. Probably you're not saving the file. ;-)
As far as unclear questions go, this one is close to the top
I'm hoping for some interesting questions about emacs ....
q: "Why do I have carpal tunnel syndrome in both my pinky fingers?"
a: "Well obviously you need to remap the ctrl key to your capslock, duh!"
I haven't played MTG since 2006. I should make a laminate and wood tabletop from my old commons.
vi is not too beginners friendly. Use nano instead
ah ... will reluctantly admit that there might be something to be said for that advice, I suppose
on the other hand, vi (or vim) is pretty much guaranteed to be on any minimal installation, and if someone cares to take half an hour to learn the most basic dozen commands that might be well worth the effort.
Learn nano, become a beginner.
Learn vi, become a power user.
Learn emacs, become a god.
Amusingly, I once heard a talk by Bill Joy in which he said that when he sits down on a foreign system for the first time, he uses ed(1) because it's guaranteed to be there and is universally consistent, while vi varies from system to system. Of course, that was true much more when there were 1,000 different variants of Unix running around. vi is just ed(1) with a visual mode...indeed, even grep started life as a series of ed keystrokes (g/re/p - later backronymed).
It's been a long while since I last used ed, but I recently had the dubious (but gratifying) experience of effectively using sed via the console to change the IP address in /etc/network/interfaces so I could then ssh into a machine where the provider had reprovisioned the system - apparently defaulting to a German keyboard keymapping in the console that caused me too much confusion trying to use vi ...
If you install NetBSD, ed and vi (and sed) are all that you have until you learn how to install nano.
(FreeBSD and OpenBSD include also a more user-friendly editor in their base, which arguably makes them less hardcore than NetBSD in this respect. )
In a
idiocracyworld where the Visual Studio Code monstrosity is taking over the world and is becoming the most used "editor" for many, many languages?also @angstrom
I'm not sure that nano was a good choice to throw at beginners. I personally feel reminded of old wordstar like "editors".
@trusty33
To just look at some file simply use
more <filename>
, e.g. moresome.conf
. That will show you the file, page by page.Just to make sure press esc several times.
Can press ctrl+z ... everything will be saved to a hidden .swp file and you'll get terminal prompt back.
To resume type fg , or vi -r filename if job is dead
take the cat to the vet