Plugin to teach vim about kebab-case text objects?

21 views
Skip to first unread message

Colin Yates

unread,
Apr 24, 2018, 2:29:12 AM4/24/18
to vimclojure
Hi all,

I hope somebody is still reading this group :-).

I am using vim 8/neovim 0.2.2 and whilst `vim-fireplace` is working well, the usual movement keys (w and b for example) don't interpret kebab-case correctly. Given "|a-b-c-d e-f-g" I would like "w" to jump to b, then c and then d. I would like B to jump to e.

Is there a magic thing I need to do?

Thanks!

Meikel Brandmeyer

unread,
Apr 24, 2018, 2:41:56 AM4/24/18
to vimcl...@googlegroups.com
You might want to remove “-” from iskeyword. It will jump to the dash, though. So you have to do a “2w” to get to the start of the word part. 

Hope that helps a bit. 

Kind regards
Meikel Brandmeyer
--
You received this message because you are subscribed to the Google Groups "vimclojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vimclojure+...@googlegroups.com.
To post to this group, send email to vimcl...@googlegroups.com.
Visit this group at https://groups.google.com/group/vimclojure.
For more options, visit https://groups.google.com/d/optout.

Colin Yates

unread,
Apr 24, 2018, 2:47:50 AM4/24/18
to vimcl...@googlegroups.com
Thanks Meikel, that does help. Half the problem is knowing where to start, and now I know to start with isKeyword :-).

Colin Yates

unread,
Apr 24, 2018, 4:44:05 AM4/24/18
to vimcl...@googlegroups.com
I also found https://github.com/pgdouyon/vim-b2k works well. I haven’t extensively checked for any unexpected side-effects yet, but so far it works well.

On 24 Apr 2018, at 07:41, Meikel Brandmeyer <m...@kotka.de> wrote:

Reply all
Reply to author
Forward
0 new messages