| DexterMorgan (79) | |
|
How do you, very simply, copy a line in emacs? I usually do ctrl k (repeating the key for multiple lines), then ctrl y back in, and then paste whereever else I want. I want wondering if there is a simpler method to copying the line. I can set a mark, and then do alt w, but its two commands --- is there a one command version of ctrl k for copying a line without deleting a line? | |
|
|
|
| ascii (988) | |
|
You have a few options here: http://emacswiki.org/emacs/CopyingWholeLines You could also just write a custom command. | |
|
Last edited on
|
|
| DexterMorgan (79) | |
| Thanks!!!!!!!!!!!!! | |
|
|
|
| DexterMorgan (79) | |
|
One more query: how do write a custom command so that when I press F1, it inputs the $ symbol? I mean I have the $ sign on the keyboard, but I have to press shift. It would simplify my life a lot if I can press one key and emacs views it as $ sign; and similarly for {, } etc. | |
|
|
|
| ResidentBiscuit (2207) | |
| Weird, the version of emacs I run allows clicking and highlighting and ctrl c / ctrl v. | |
|
|
|
| ascii (988) | |
Try adding this to your .emacs file:(global-set-key [f1] "$")Change the key in brackets and the character in quotes to whatever you want. | |
|
|
|
| DexterMorgan (79) | |
| That worked, thanks ascii!!!!!!!!!!! | |
|
|
|
| DexterMorgan (79) | |
|
A couple more queries on customization: How do I map certain numpad keys to things I want? Eg mapping the numpad key 7 to ( How do I map say ctrl-8 to left bracket, that is ( ? | |
|
|
|