|
From: | Jambunathan K |
Subject: | Re: Free cursor positioning. |
Date: | Sat, 06 Aug 2011 14:32:05 +0530 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) |
Oleksandr Gavenko <gavenko@bifit.com.ua> writes: > Some user ask me how configure Emacs to move cursor in any position > like this done in editor of Far file manager. > > So if you press RIGHT at the end of string cursor move right not to > next string and so on. If you type any char after the end of line > editor automatically add spaces from the end of line up to inserted new > char. > > This useful for those who like rectangle command because to mark > the rectangle: > > line 1 short > line 2 toooooooooooooo looooooooong > line 3 short > > you need type spaces after 'short' to include tooo looong. > > > You can use C-u 2 3 SPC to insert space character 23 times. (For this to work C-h k SPC should report self-insert-command) You can also use the interactive command move-to-column to forcibly add tabs/spaces for filling to the end of line. If you put this function in your .emacs or temporarily install it with C-x C-e (defun my-move-to-column (column) (interactive "N") (move-to-column column t)) ^ C-x C-e here then if you do C-u 3 9 M-x my-move-to-column anywhere from within the short line seen above it will add the needed spaces. ps: I am unable to see how the FORCE argument of move-to-column is defined for interactive purposes. Jambunathan K. --
[Prev in Thread] | Current Thread | [Next in Thread] |