gabesoft / evil-mc

Multiple cursors implementation for evil-mode
MIT License
387 stars 36 forks source link

add evil-mc functions to create cursor at point and move to next/previous line #33

Closed gilbertw1 closed 7 years ago

gilbertw1 commented 7 years ago

Hi, this is a pull request and a proposal to add functions (and keybindings) to allow a user to create a new cursor at the current point and move the main cursor up (grk) or down (grj) in a single stroke.

My motivation for this is to solve a common issue I have that is cumbersome to do otherwise with evil-mc.

I frequently have a list of different words where I want to build a set of statements around each word. In order to get a cursor at the start of each of the words to edit them simulaneously, I have to pause cursors, make cursor at point, move down, for each word, then resume cursors at the last one. This results in a ton of key presses, especially with three key chords.

With this update a user would simply need to press 'grj' to make a cursor at the current point and move the main cursor down a line, and conversely 'grk' to move it up a line. This will drastically cut down the effort to support a fairly common scenario.

Thanks!

arronmabrey commented 7 years ago

This sounds great. I also have needed to do this same thing.

gilbertw1 commented 7 years ago

The previous line function has been corrected.