Git Product home page Git Product logo

Comments (4)

chrisgrieser avatar chrisgrieser commented on July 21, 2024

Generally, it is a rule for all vim motions that they work the same for all three modes, which is also quite essential in creating predictability/consistency. I am not totally sure how desirable it is to introduce a feature that breaks with that rule. 🤔

from nvim-spider.

IndianBoy42 avatar IndianBoy42 commented on July 21, 2024

Well it's completely opt in and the user can easily just think of them as separate motions. That sounds like a good principle for defaults but I think allowing for configurability is a higher principle for plugins. To let users choose what principles they want to use for their personal setup.

This would also allow the user to have separate bindings for different motions provided by the plugin (subword vs word, punctuation or no punctuation)

from nvim-spider.

Rydwxz avatar Rydwxz commented on July 21, 2024

I agree 100%. It is consistent from an abstract perspective if not functional; when we tap w we want to move to the beginning of the next word without necessarily defining everything in-between there and the current cursor position as "the current word" to do it because when we call something like ciw we want to change to the end of the current word, not the beginning of the next word! The "punctuation" should be treated like whitespace, not a continuation of the word.
It would be very nice to have an API that accepts either option as args so we could do keybindings like

map('n', 'w', spider.word({ 'subWord', 'punctuation' })_
map({'o', 'x'}, 'w', spider.word({ 'subWord' })

from nvim-spider.

chrisgrieser avatar chrisgrieser commented on July 21, 2024

Implemented with the latest PR

from nvim-spider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.