Add mc/sort-regions and mc/reverse-regions

This commit is contained in:
Magnar Sveen
2013-02-10 21:04:09 +01:00
parent 56839dfdca
commit 82a1fe3746
7 changed files with 113 additions and 48 deletions

View File

@@ -0,0 +1,19 @@
Feature: Sorting and reversing cursor regions
Scenario: Reversing regions
Given I have cursors at "text" in "This text contains the word text thrice (text here)"
When I press "M-f"
And I press "C-f"
And I press "C-SPC"
And I press "M-f"
And I press "H-1"
Then I should see "This text here the word text thrice (text contains)"
Scenario: Sorting regions
Given I have cursors at "text" in "This text contains the word text thrice (text here)"
When I press "M-f"
And I press "C-f"
And I press "C-SPC"
And I press "M-f"
And I press "H-2"
Then I should see "This text contains the word text here (text thrice)"

View File

@@ -26,6 +26,8 @@
(global-set-key (kbd "M-$") 'mc/mark-all-like-this-dwim)
(global-set-key (kbd "M-#") 'mc/mark-all-in-region)
(global-set-key (kbd "H-0") 'mc/insert-numbers)
(global-set-key (kbd "H-1") 'mc/reverse-regions)
(global-set-key (kbd "H-2") 'mc/sort-regions)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "H-SPC") 'set-rectangular-region-anchor)
(switch-to-buffer