If you want to capitalize the last word you just typed, type M- M-c. Negative arguments are very useful, for they can let you operate on words, lines or phrases you have just finished typing. It is bound to M- (that’s meta followed by a dash) C- and C-M. Like numeric arguments, the negative argument is bound to multiple keys to minimize unnecessary finger movement. When used with the numeric argument, the negative argument inverts the operation the command would otherwise carry out. Odd or hard to reach keys are used less – empirically, it is not a difficult conclusion to reach. Simple things like duplicate keybindings cut down on finger-straining typing and it increases the likelihood of people actually using numeric arguments in the first place. So to run the command forward-word, bound to M-f, 10 times you’d type M-1 M-0 M-f. īy duplicating the same command multiple times, you don’t have to move your fingers to execute a command that uses C-, M- or C-M. Most commands do what you would expect.īecause numeric arguments are so useful they are bound to a multitude of keys: M-0 to M-9 C-0 to C-9 C-M-0 to C-M-9 and C-u. For C-p it moves up n lines, for other commands it does nothing. What the number is for used for depends entirely on the command you use it on. The numeric argument is so called because it lets you pass a numeric constant to a command. The universal argument (also known as prefix argument) is multiplicative when invoked repeatedly. This concept deserves a mention as it will invoke an extended, and typically more complex, version of a command or it will default to the numeric argument 4, meaning it essentially does the same as though you had typed C-u 4. You may not want to use all of them – which is fine – but I will try to highlight the importance of switching or changing something to give you an idea of how much of an improvement it is. Included in this series will be code snippets, suggestions for rebinding keys and other tips and tricks I’ve picked up over the years. I’ve been using Emacs for a long time and I still learn new ways of doing things faster but ultimately it is tenacity and persistence that will pay off in the long run. Editing text effectively can take a while to learn, as there are many specialized tools available to you to make your life easier. The best way to maximize your productivity is to eliminate common bottlenecks like learning how to touch type and, of course, mastering Emacs. But old habits die hard, and when your IDE’s most advanced text editing capability is a poorly-emulated Brief mode it’s no wonder people can’t be bothered. I’ve met lots of IDE users who use the mouse to edit text or access menu options, even though – and they realize this – it is very ineffective. OverviewĮmacs has grown organically – some might say uncontrollably like kudzu – over its more than 30 year history, and in that time it has been honed and sharpened as a tool for effective text and source code editing. Few other things in Emacs will, pound-for-pound, give you a bigger productivity boost. Emacs has unrivaled movement and editing capabilities. If you can master movement and editing in Emacs, you have effectively conquered two of the biggest productivity boosters available to you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |