haziz
haziz

Reputation: 13602

Emacs Save Buffer Keybinding?

Is there an alternative to C-x C-s for saving in Emacs? My VT520 terminal uses C-s for scroll lock and gives weird behavior. Alternatively can I reprogram it or reprogram the VT520 to another keybinding.

Upvotes: 0

Views: 843

Answers (3)

Thomas
Thomas

Reputation: 17422

You can define your own key bindings in Emacs for any command. For instance, to make CTRL+x CTRL+z an additional key binding for save-buffers, put the following in your .emacs file:

(global-set-key (kbd "C-x C-z") 'save-buffers)

Just be careful which keybindings you choose: some modes might overwrite them.

See also here for more details.

Upvotes: 0

jpkotta
jpkotta

Reputation: 9437

I disable XON/XOFF in my .bashrc (should work for any shell, though maybe not every terminal):

# this stops C-s from freezing the terminal
if [ "$TERM" != "dumb" ] ; then
    stty -ixon
fi

Upvotes: 0

Mario F
Mario F

Reputation: 47287

you could run it manually with M-x save-buffer. But I would try to fix your terminal, as you also miss search-forward if you don't have C-s, which is one of the preferred commands to navigate buffers among emacs users.

Upvotes: 4

Related Questions