Post AOIVyzPU2qvBEVdurI by nigeldgreen@mastodon.org.uk
 (DIR) More posts by nigeldgreen@mastodon.org.uk
 (DIR) Post #AOIU8zKoynVfzH6OJ6 by nigeldgreen@mastodon.org.uk
       2022-10-06T15:16:14Z
       
       0 likes, 0 repeats
       
       I've tried to become more of a Vim native on a number of occasions in the past, but this time round I've found it has really stuck.YMMV but for me it has mainly been a (re)discovery of text objects and how to use them. So powerful.
       
 (DIR) Post #AOIU904CG5o2G0Kd28 by penguin42@mastodon.org.uk
       2022-10-06T17:15:44Z
       
       0 likes, 0 repeats
       
       @nigeldgreen Can you give us some examples?
       
 (DIR) Post #AOIUbIkMOrjGIhY4Gm by nigeldgreen@mastodon.org.uk
       2022-10-06T17:20:51Z
       
       0 likes, 0 repeats
       
       @penguin42 I'll try! A simple example is that vim understands what a word is, so with my cursor anywhere in a word I can type 'ciw' (for Change In Word) and it deletes the whole word leaving my cursor ready to type. Really useful in coding as it understands pairs of characters - with cursor in brackets you can type 'di(' to delete everything, or 'da(' to delete the brackets as well (think Delete Around Brackets).
       
 (DIR) Post #AOIUuTauIFeNRhGo6q by nigeldgreen@mastodon.org.uk
       2022-10-06T17:21:09Z
       
       0 likes, 0 repeats
       
       @penguin42 Some languages define their own text objects as well and you can add your own if you routinely work with constructs that you want to treat as objects.Hope that makes sense!
       
 (DIR) Post #AOIUuUFJrzybT2B56G by penguin42@mastodon.org.uk
       2022-10-06T17:24:19Z
       
       0 likes, 0 repeats
       
       @nigeldgreen Ah yes, I think I'd come across the ci* stuff before, but I'm still an old vi head who hasn't remembered much vim stuff (and so would use cw or ct) ); I didn't realise anything defined their own objects on top.
       
 (DIR) Post #AOIVyzPU2qvBEVdurI by nigeldgreen@mastodon.org.uk
       2022-10-06T17:36:21Z
       
       0 likes, 1 repeats
       
       @penguin42 I use it quite a lot with vi*, which visually selects all of the text inside the given text object so I can check I've got it right before I act.