Code Monkey home page Code Monkey logo

Comments (4)

chaoren avatar chaoren commented on September 20, 2024

With the default wordmotion settings, w moves to the first letter and will never stop on the underscore.

The default behavior is:

    ____foo____bar____
w-->w-->w->w-->w->w->w

It does exactly what you expect.
Did you change any settings? Or are you using an outdated version of the plugin?

from vim-wordmotion.

chaoren avatar chaoren commented on September 20, 2024

https://github.com/chaoren/vim-wordmotion#gwordmotion_spaces

NOTE: make sure the regex matches a single character. You can use lookaheads and lookbehinds for context-sensitive space characters.
NOTE: the default patterns match 1) hyphens (-) between between alphabetic characters and 2) underscores (_) between alphanumeric characters.

from vim-wordmotion.

chaoren avatar chaoren commented on September 20, 2024

If you set g:wordmotion_spaces at all then it's going to do the dumb matching. The default pattern is quite complex and does only match underscores/hyphens between characters: ['\%([[:lower:][:upper:][:digit:]]_*\)\@<=_\%(_*[[:lower:][:upper:][:digit:]]\)\@=', '\%([[:lower:][:upper:]]-*\)\@<=-\%(-*[[:lower:][:upper:]]\)\@='].

from vim-wordmotion.

byron-hawkins avatar byron-hawkins commented on September 20, 2024

I had an old version, so after updating it works just like you explained. Thanks! Also added a watch on this repository so I won't miss any future updates.

from vim-wordmotion.

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.