Skip to content

[Vimode] Fix/Improve Paragraph and Sentence text objects

Jan Paul Batrina requested to merge work/vimode-textobject-improvements into master

This patch properly sets the starting position for the selection of paragraph and sentence objects in visual mode.

Sentences starting on the first column were previously not taken into account, so the entirety of:

This is a sentence.
This is another sentence.

only counted as a single sentence.

The behavior is now closer to vim's sentence text objects but not exactly the same. For example (| represents the start/end of selection)

This is a sentence. | This is another sentence.

After the command "vis" in vim:

This is a sentence.| |This is another sentence.

In Kate: This is a sentence. | This is another sentence.|

Edited by Jan Paul Batrina

Merge request reports

Loading