Go to Character with Multiple Cursors in Emacs
In Emacs, multiple-cursors does not support isearch
, so there is no
way to make the cursors jump to next occurrence of a character by default.
You would need this for example when working with tabular data.
This functionality is built into vim with the f
and ;
keys in normal mode.
For Emacs, however, you need to use a package, namely
Iy Go To Char.
You can install the iy-goto-char
package from with el-get
, and add the
following recipe for your startup. This is required to set the commands.
(setq el-get-sources
'((:name iy-go-to-char
:after (progn
(global-set-key (kbd "C-c f") 'iy-go-to-char)
(global-set-key (kbd "C-c F") 'iy-go-to-char-backward)
(global-set-key (kbd "C-c ;") 'iy-go-to-or-up-to-continue)
(global-set-key (kbd "C-c ,") 'iy-go-to-or-up-to-continue-backward)))))
Now, the commands C-c f
and C-c ;
work just as expected, and your cursors
move to the next occurrence of the character you desire.