![]() `previous-line` is an important command, and it's assigned to an inconvenient position Here are a few things that I like to use: There's a method to disable "M-`" in Unity at. Sorry, the markdown in the first reply was messed up. If you have any suggestions or handy snippets – post below or e-mail me. Still, there’s always room for improvement. I do repurpose quite a few of the aforementioned keys as there is, to me, a lot of useless cruft I’d never use, but apart from that very few of them are remapped. Terrific feature ibuffer’s great.Īnd that’s pretty much it. Simple, but I use it 100s of times a day. That will open up Magit, a great Git client for Emacs. (message (concat "Reverted buffer " (buffer-name)))) It will notify you in the minibuffer area that it did it. It does exactly what the name implies: it reverts (reloads from file) the current buffer without asking any questions. This calls another custom command of mine, revert-this-buffer. Searching buffers with occur mode will tell you all you want to know. This will run M-x occur but against all buffers of the same major mode as the one point is in. This runs my own command, multi-occur-in-this-mode. By default it’s bound to the 2-column commands but they’re also bound to C-x 6. I grep a lot and the key is very accessible. Yes, you override the help, but it’s bound to C-h also. If you don’t know the difference, read Running shells in Emacs: an overview. This runs M-x shell, my preferred one of the terminal/shell wrappers in Emacs. I don’t often resize my windows any more (my high monitor resolution means I don’t have to) but it’s occasionally useful, and definitely more useful than the useless and impossibly-hard-to-type C-x ^, et al. This calls shrink/enlarge-window-horizontally and enlarge/shrink-window respectively. I bind these to my smart scan next/previous commands. Instead I bind it to a custom command that, using IDO, gives me a list of recent files I’ve opened. The few occasions I need to do this I just set it as read only. It’s great.īy default this will run find-file-read-only, a command that finds a file but opens it as read only. It prompts me for a remote host to SSH to using an M-x ansi-term session. This I bind to CSSH’s cssh-term-remote-open. Read my article on repeating commands for more info. This key will kill the active buffer without any prompting whatsoever. I kill buffers all the time, and the idea of killing a buffer that is not active is just not part of my workflow at all. Very useful, but Ubuntu and Unity (in their wisdom) have decided that I am not allowed to rebind this key…. When pressed it’ll jump around in the mark ring. This is taken from my article on fixing the mark commands. This key is surprisingly unbound in most modes. ![]() This I bind to a custom Helm command that calls up some of my more frequent things. M-o is normally bound to some rich text formatting nobody cares about. The command other-window is normally bound to C-x o but I find that way too cumbersome for what is such a frequent operation. Most of them are quality of life improvements: I want to make it easier to type things I do frequently. Having said that… there are keys I rebind and commands I explicitly bind to keys. ![]() See the similarities? The C- for character, M- for word and C-M- for s-exp is a recurring pattern in Emacs. It moves forward by the character, but M-f moves forward by word, and C-M-f moves forward by an s-expression. Rebinding keys is something you should do as a last resort: if you’re new to Emacs and your first impulse is to rebind everything – stop! Learn Emacs first and then decide.Ĭonsider C-f. This is particularly true of the “core” bindings in Emacs. I think rebinding keys in Emacs – even though, in essence, the editor is built around the idea of customization – is a perilous thing to do if you are not careful: people do it without knowing why the key is bound to what it is. I figured I’d write a blog post about the keys I’ve bound but also rebound in Emacs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |