view the rest of the comments
Linux
Welcome to c/linux!
Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!
Rules:
-
Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.
-
Be respectful: Treat fellow community members with respect and courtesy.
-
Quality over quantity: Share informative and thought-provoking content.
-
No spam or self-promotion: Avoid excessive self-promotion or spamming.
-
No NSFW adult content
-
Follow general lemmy guidelines.
Is this the first time you've had the pleasure of using vi/vim? ๐ visudo is a command that locks the sudo file and just opens vi or vim. It's not a text editor in and of itself.
Vim is the source of the famous "how do you quit vim", meme. (:q , btw) The interface is completely nonintuitive and has modes. In "edit mode", all the buttons do different edits to text or move the cursor. That must have been your experience: trying to type in edit mode and getting garbage. You have to enter "insert mode" to type using the
I
key. Commands to do things like save and quit are started by typing a colon in edit mode. You navigate in edit mode using HJKL as arrow keys.To avoid it, set your default editor to nano instead. Nano's hotkeys are nonsensical to people coming from Windows, but at least they're displayed on the screen at all times.
$ export EDITOR=nano