If they don't understand this, can we even call it intelligent life?
linuxmemes
I use Arch btw
Sister communities:
- LemmyMemes: Memes
- LemmyShitpost: Anything and everything goes.
- RISA: Star Trek memes and shitposts
Community rules
- Follow the site-wide rules and code of conduct
- Be civil
- Post Linux-related content
- No recent reposts
Please report posts and comments that break these rules!
Maybe they use Emacs.
Bonus: I googled "emacs" to make sure I got the capitalization right for the post and Google is throwing shade:
Holy shit lmao
It’s the other way around, too.
Not as true though.
This gotta be some inside joke leaking from google
Maybe it's time to stop using GOOG
oof
duck.com
wrong: you press esc multiple times to make sure you are in normal mode.
At least 3 times. 5 to make sure.
sudo nano
You shouldn't really use editor with sudo, but instead use sudoedit to edit files restricted to root user
SUDO_EDITOR=nano sudoedit /etc/fstab
This accomplishes the same function while running the text editor as unprivileged user
Why?
Files from user: nano
Files from root: sudo nano
Files from another user: sudo nano (and if new sudo chown after)... 😂
Never had any problems with this in over 10 years... 😅😂
Doing sudo nano
will not load your user configuration, sudoedit
will. I had plenty of problems with this, but I assume you don't have any custom configuration.
One reason why sometime I don't do sudoedit is that I make a lot of changes to the config/restart service/see it works/edit etc.. sudoedit only write to the file when exiting, so that flow won't work...
for example when having adding a new host on nginx and some configuration and see if everything work (sudo vim/systemc nginx restart/curl https:// domain loop)
but yeah in general i'll just use sudoedit (which alias to se for me) for my root editing
As mentioned, to prevent running your text editor with root permissions. It's just security optimization
Let me rephrase my question:
Why would I not want to open nano as root?
No offense, but that sounds like more OCD behavior. 😅 I don't need or want protection against myself, and I even loath the whole "that's not how you're supposed to do it"-mentality of linux (where when commands know very well what you want, instead of doing it, just tell you you forgot something). 😅
Alternatively you could use my favorite approach, Visual Studio Code. Just open the file with it, edit it and upon saving you will be promoted if the file needs admin rights to save.
Okay but how can I show how good I am with shortcuts to edit legacy software ?
Yup, s/vsc/kwrite/ personally, it's lighter, but why shouldn't I have a pretty for my config editing needs...
until the moment you realize that somehow you are not on your native keyboard layout and where the hell is : and ! in this weird language??!
ESC Z Z
I have done this too many times now lol, you'd think I would have learned
ESC Z Z
Although I usually bang ESC a few times to
make sure i’m back to command mode
you mean normal mode?
Yes, I do.
Double Z's will save and then exit. The command on until board will exit without saving changes.
yeah to exit without saving you do ZQ instead of ZZ
Yanks power cord
Great, now all my changes are lost. Thank you very much!
Your welcome!
Ctrl-z
ps
kill -9 pid
fg
Alternative:
Ctrl-z
kill -9 %1 # Shell keeps track of job pids for you, job 1 is %1, job 2 is %2, etc
fg # Not technically necessary, but it's fun to see the corpse
killall vim
Reminds me of the time I brought down a whole AIX server with the killall
command back in the 1990s.
On AIX killall
really means kill every single process.
What is this sorcery?! I thought you had to reboot each time to exit.
META-C :wq!
ESC is all the way over there and my hand is already on the space bar.
That's only if you don't want to save first (ahem write the buffer).
Odds are if you don't know how to exit vim you probably don't want to save whatever you wrote in there.
Who in there right mind would want to save a bunch of gibberish
ihh splqqiq:wq
Wear your mistakes proudlyq!