On 11 Jun 2023, at 18:57, Richard Kimberly Heck <[email protected]> wrote:

> On 6/11/23 10:15, R. H. van der Gaag wrote:
>> […] I would love to see the following text editing commands implemented:
>> 
>> select around a word (cursor is on a word; the command selects the word)
> Already possible: Just bind a key to word-select. (Double click on a word 
> does this.)
> 
Thanks for the pointer; I didn’t know this. By the way: double-clicking often 
only selects part of a word on my Mac.
>> select around a paragraph
> Same for paragraph-select. (Triple click does this.)
> 
I found commands to select backward to the beginning of the paragraph and 
forwards to the end, but no command that selects the paragraph the cursor is in 
as a whole (the way word-select works with a word). 

Triple-clicking selects a line, not a paragraph (or sentence) on my system.
>> select around a sentence (a grammatical sentence, not a line)
>> jump/select to the beginning of this sentence 
>> jump/select to the end of this sentence
> Not trivial in a language-neutral way. (Some languages do not use punctuation 
> the way English, say, does.) How does vim handle this?
> 
“A sentence <https://vimdoc.sourceforge.net/htmldoc/motion.html#sentence> is 
defined as <https://vimdoc.sourceforge.net/htmldoc/motion.html#as> ending at a 
'. <https://vimdoc.sourceforge.net/htmldoc/repeat.html#.>', '! 
<https://vimdoc.sourceforge.net/htmldoc/change.html#!>' or '? 
<https://vimdoc.sourceforge.net/htmldoc/pattern.html#?>' followed by either the 
end of a line, or by a space or tab 
<https://vimdoc.sourceforge.net/htmldoc/intro.html#tab>.” 
https://vimdoc.sourceforge.net/htmldoc/motion.html#sentence

However, the manual is inaccurate here: when I tested it, it also selected 
surrounding quotation marks. 

>> find the word under the cursor (i.e. show other occurrences of the same 
>> word, by highlighting them simultaneously) 
> There's a bug report about highlighting all matches. The 'find highlighted 
> word' part should not be too bad. We would just need to extend word-find-* to 
> use data from the clipboard (or to grab the current selection).
> 
Or perhaps not the selection but simply the word the cursor is in (so a 
separate word-select command is not needed).
>> jump to a particular word (hit a key combination, type two letters that are 
>> part of the word you want to jump to, labels (in the form of letters) appear 
>> in the text where the combination occurs, type the label you need, and the 
>> cursor will land there
> This is a lot more involved.
> 
I’m sure it is. But it’s also very, very useful…

RH

-- 
lyx-devel mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to