1/28 emacs question: How can I specify a keyboard combo for saving
the file? I find "control x s" awkward. I would like to use
"control x \" instead.
\_ put this in your .emacs:
(global-set-key "\C-x\"" 'save-buffer)
to get rid of C-xs for saving, you can use:
(global-unset-key "\C-xs")
\_ Thank you. That's awesome. I tweaked it like this:
(global-set-key "\C-x\C-\\" 'save-buffer)
Now it works great. Thanks!
Now it works great just like jove. Thanks!
\_ As someone who's switched from jove to emacs (many years ago),
and also from random package X to random package Y, I urge you
to learn and use the default bindings. If you don't, you can't
ever use the package outside of your own environment; your buddy
says, hey, here, fix this piece of code in my buffer, and you
can't move the cursor because you defined the move-cursor commands
to be like the Doom bindings ... -- one who's been there
\_ Seconded. I also recommend learning vi to the point
where you are comfortable editing code using it b/c
one day you will end up crunched for time and stuck
on a box w/o emacs and the last thing you want to
worry about is how to insert text.
\-In the case of C-xC-s/C-xs, I think it is a good idea
to stick to those bindings unless there is some weird
reason not to [like C-q/C-s lossage]. In some other cases
it may be reasonable to swtich. You know there is nothing
that says you have to unset C-xs ... I suppose since C-x\
is not normally bound having both isnt too bad. Re: vi ...
you probably want to be able to use vi enough to get
emacs running and do basic edits but that is a long way
from being able to edit code. In fact the whole approach
to editing code is different between emacs and vi, so if
you see them as interchangable [do i use ESC-l, or C-f to
move to the right], then you are likely not using emacs
correctly/fully [e.g. M-x compile etc]. --mr. emacs
\_ My emacs session generally has mh-rmail, gnus,
w3c, gdb, compiles and dozens of buffers open
at any given time. At one point in my life I
used to use emacs client/server regularly.
However, I still think that knowing how to switch
btwn emacs and vi is a valuable skill (ex i is to
insert, a is to append, hjkl is to move, :1 is
first line, G is last line, / to pattern match,
% is to paren match, this will be good enough
for 95% of all problems).
\- By all means go for the "95%" but that is a
long way from "I am comfortable working on
large projects in either emacs or vi and
merely prefer emacs." |