16 points

In any sane editor:

Save a file - CRTL-S

In VI:

  1. Switch to command mode by pressing the Esc key.

  2. Type : (colon). This will open the prompt bar in the bottom left corner of the window.

  3. Type w after the colon and hit Enter.

In Emacs:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Save-Commands.html

C-x C-s Save the current buffer to its file (save-buffer).

C-x s Save any or all buffers to their files (save-some-buffers).

M-~ Forget that the current buffer has been changed (not-modified). With prefix argument (C-u), mark the current buffer as changed.

C-x C-w Save the current buffer with a specified file name (write-file).

M-x set-visited-file-name Change the file name under which the current buffer will be saved.

When you wish to save the file and make your changes permanent, type C-x C-s (save-buffer). After saving is finished, C-x C-s displays a message like this:

Wrote /u/rms/gnu/gnu.tasks

If the current buffer is not modified (no changes have been made in it since the buffer was created or last saved), saving is not really done, because it would have no effect. Instead, C-x C-s displays a message like this in the echo area:

(No changes need to be saved) With a prefix argument, C-u C-x C-s, Emacs also marks the buffer to be backed up when the next save is done. See Backup Files.

The command C-x s (save-some-buffers) offers to save any or all modified buffers. It asks you what to do with each buffer. The possible responses are analogous to those of query-replace:

y SPC Save this buffer and ask about the rest of the buffers.

n DEL Don’t save this buffer, but ask about the rest of the buffers.

! Save this buffer and all the rest with no more questions.

q RET Terminate save-some-buffers without any more saving.

. Save this buffer, then exit save-some-buffers without even asking about other buffers.

C-r View the buffer that you are currently being asked about. When you exit View mode, you get back to save-some-buffers, which asks the question again.

C-f Exit save-some-buffers and visit the buffer that you are currently being asked about.

d Diff the buffer against its corresponding file, so you can see what changes you would be saving. This calls the command diff-buffer-with-file (see Comparing Files).

C-h Display a help message about these options.

permalink
report
reply
3 points

wtf m8

permalink
report
parent
reply
1 point

Train yourself to use edit-and-execute and this problem disappears forever. Now I’m annoyed when I type “esc v v” and nothing happens.

permalink
report
reply
2 points

What happens to me is the opposite. I got used to Ctrl+w to delete a word in terminal and accidentally closed browser tabs many times while typing in them.

permalink
report
reply
9 points

That’s why my terminal is emacs

permalink
report
reply
10 points

I think you mean OS

permalink
report
parent
reply

That’s why my terminal is OS

permalink
report
parent
reply
6 points

Emacs and bash use the same navigation shortcuts though, LOL.

permalink
report
parent
reply
2 points

set -o vi

permalink
report
parent
reply
1 point

This. Esc, then b. Or if you’re a stickler for keeping you hands on home row, Ctrl [ does the trick as well. Bonus points for making that more comfortable via a remapping of Caps Lock to control (or swapping the two).

permalink
report
parent
reply
16 points

Bold of you to assume that an Emacs user will have anything remotely resembling the default keymap by the time they’re proud enough to brag about it

permalink
report
parent
reply
16 points

Also in some Windows programs. Infuriating

permalink
report
reply
15 points

More often it’s Ctrl + backspace that doesn’t work. Ctrl + <- works nearly everywhere.

permalink
report
parent
reply
7 points

i’ve noticed ctrl + backspace works in windows 11 where it didn’t work in 10

permalink
report
parent
reply
5 points
*

I hope you don’t expect that to convince me to upgrade. That doesn’t even make up for what they did to the taskbar.

permalink
report
parent
reply
13 points

Getting the little boxes when renaming files. Uuuuuuuuggghhh

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 4.4K

    Monthly active users

  • 1.5K

    Posts

  • 35K

    Comments