Simple image host.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

edit-lines.feature 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. Feature: Switching from a multiline region to multiple cursors
  2. Scenario: Single line region
  3. When I insert "hello there"
  4. And I select "there"
  5. And I press "C-S-c C-S-c"
  6. Then I should have one cursor
  7. Scenario: Edit lines
  8. When I insert:
  9. """
  10. hello
  11. there
  12. """
  13. And I go to the front of the word "hello"
  14. And I set the mark
  15. And I go to the front of the word "there"
  16. And I press "C-S-c C-S-c"
  17. Then I should have 2 cursors
  18. Scenario: Edit lines from bottom up
  19. When I insert:
  20. """
  21. hello
  22. there
  23. """
  24. And I go to the front of the word "there"
  25. And I set the mark
  26. And I go to the front of the word "hello"
  27. And I press "C-S-c C-S-c"
  28. Then I should have one cursor
  29. Scenario: Edit only real lines, even in visual-line-mode
  30. Given I turn on visual-line-mode
  31. And I insert:
  32. """
  33. some very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very
  34. long text
  35. """
  36. And I go to the front of the word "some"
  37. And I set the mark
  38. And I go to the front of the word "long"
  39. And I press "C-S-c C-S-c"
  40. Then I should have 2 cursors
  41. Scenario: Edit without using transient mark mode
  42. Given I turn off transient-mark-mode
  43. And I insert:
  44. """
  45. hello
  46. there
  47. """
  48. And I go to the front of the word "hello"
  49. And I set the mark
  50. And I go to the front of the word "there"
  51. And I press "C-S-c C-S-c"
  52. Then I should have 2 cursors
  53. Scenario: Edit default short lines
  54. When I insert:
  55. """
  56. hello
  57. there
  58. """
  59. And I go to the end of the word "hello"
  60. And I set the mark
  61. And I go to the end of the word "there"
  62. And I press "C-S-c C-S-c"
  63. And I press "you"
  64. Then I should see:
  65. """
  66. helloyou
  67. you
  68. thereyou
  69. """
  70. Scenario: Pad short lines
  71. When I insert:
  72. """
  73. hello
  74. there
  75. """
  76. And I go to the end of the word "hello"
  77. And I set the mark
  78. And I go to the end of the word "there"
  79. And I press "M-1 C-S-c C-S-c"
  80. Then I should have 3 cursors
  81. Scenario: Edit padding short lines
  82. When I insert:
  83. """
  84. hello
  85. there
  86. """
  87. And I go to the end of the word "hello"
  88. And I set the mark
  89. And I go to the end of the word "there"
  90. And I press "M-1 C-S-c C-S-c"
  91. And I press "you"
  92. Then I should see:
  93. """
  94. helloyou
  95. you
  96. thereyou
  97. """
  98. Scenario: Skip short lines
  99. When I insert:
  100. """
  101. hello
  102. there
  103. """
  104. And I go to the end of the word "hello"
  105. And I set the mark
  106. And I go to the end of the word "there"
  107. And I press "M-- M-1 C-S-c C-S-c"
  108. Then I should have 2 cursors
  109. Scenario: Edit skipping short lines
  110. When I insert:
  111. """
  112. hello
  113. there
  114. """
  115. And I go to the end of the word "hello"
  116. And I set the mark
  117. And I go to the end of the word "there"
  118. And I press "M-- M-1 C-S-c C-S-c"
  119. And I press "you"
  120. Then I should see:
  121. """
  122. helloyou
  123. thereyou
  124. """