Sublime Forum

Select by sentence

#1

Sublime Text presents itself as an editor for code and prose – so, a feature request for editing prose here. I haven’t seen it in any other text editor so far.

It would be nice to be able to select, cut, delete and copy text by sentences. That is, by sequences of words separated by periods.

P. S. It turned out many Vim-like editors do support operations with sentences and paragraphs.

0 Likes

#2

Sublime ships with a package called Vintage, which simulates commands in Vim. If you enable Vintage and go in Command Mode, you can access to the following commands:
vap -> Selects the paragraph
dap -> Deletes the paragraph and puts the deleted text in a register (effectively cut)
yap -> Copies the paragraph

In Vim, the s means a sentence, so you can type das to delete a sentence. Unfortunately it does not work in Vintage. As a workaround, I use F.dt., which moves the cursor to the end of the previous sentence and then deletes the sentence.

I only use Vintage, but there is a community developed package called NeoVintageous that may have implemented the s for sentence. I am not sure.

0 Likes

#3

I am learning Neovim now and in no tutorial have I seen sentence and paragraph operations mentioned. They probably seem less important to programmers.

As for Sublime Text, I prefer to use its native mode, but thanks for sharing.

For Sublime, I was thinking of something like alt+shift+right to select a sentence.

0 Likes