Emacs Evil mode: how to create a new text object to select words with any non-space characters?

后端 未结 3 681
小蘑菇
小蘑菇 2021-02-08 18:58

I am trying to create a new text object in Evil. For example, the text object iw will only select subsets of strings containing hyphens. I want the new text object to m

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 19:23

    I don't think you need to create a new text object. Evil includes the symbol text object. The symbol syntax is defined by the major-mode and usually includes hyphens, numbers, underscores and other non-whitespace characters.

    The symbol text object is bound to o. The definition is at evil-maps.el at Bitbucket

提交回复
热议问题