Module: VER::Methods::Delete
- Included in:
- VER::Methods
- Defined in:
- lib/ver/methods/delete.rb
Instance Method Summary collapse
- #change_line(count = 1) ⇒ Object
- #change_motion(motion, count = 1) ⇒ Object
- #delete_line(count = 1) ⇒ Object
- #delete_motion(motion, count = 1) ⇒ Object
- #delete_trailing_whitespace ⇒ Object
Instance Method Details
#change_line(count = 1) ⇒ Object
19 20 21 22 |
# File 'lib/ver/methods/delete.rb', line 19 def change_line(count = 1) delete_line(count) start_insert_mode end |
#change_motion(motion, count = 1) ⇒ Object
4 5 6 7 |
# File 'lib/ver/methods/delete.rb', line 4 def change_motion(motion, count = 1) delete_motion(motion, count) start_insert_mode end |
#delete_line(count = 1) ⇒ Object
13 14 15 16 17 |
# File 'lib/ver/methods/delete.rb', line 13 def delete_line(count = 1) count.times do delete 'insert linestart', 'insert lineend + 1 char' end end |
#delete_motion(motion, count = 1) ⇒ Object
9 10 11 |
# File 'lib/ver/methods/delete.rb', line 9 def delete_motion(motion, count = 1) delete(*virtual_movement(motion, count)) end |
#delete_trailing_whitespace ⇒ Object
24 25 26 27 |
# File 'lib/ver/methods/delete.rb', line 24 def delete_trailing_whitespace tag_all_trailing_whitespace execute :delete, *tag_ranges('invalid.trailing-whitespace').flatten end |