LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   single key to increment the number in emacs (https://www.linuxquestions.org/questions/linux-newbie-8/single-key-to-increment-the-number-in-emacs-820746/)

sathiyamoorthy 07-19-2010 12:27 PM

single key to increment the number in emacs
 
What is the procedure to increment the number under the cursor ?

12

Which key i have to press to make this 12 to become 13.

I know the method of keeping the number in register and incrementing, http://www.gnu.org/software/emacs/ma...egNumbers.html .

But am looking for a single key to increment the number under cursor. Can anybody help me ?

Tinkster 07-19-2010 02:08 PM

I'm afraid you'll have to develop your own lisp foo, and
magically bind it to a single key; there's no such built-in
function in Emacs ...


Cheers,
Tink

David A 08-05-2011 12:50 PM

The page http://www.emacswiki.org/emacs/IncrementNumber currently contains two functions that can do what you want.

Copy one of the functions and the key definition to your emacs init file (usually ~/.emacs).


All times are GMT -5. The time now is 05:17 AM.