Git Product home page Git Product logo

Comments (9)

jgollenz avatar jgollenz commented on August 22, 2024 1

Only use spider in normal mode

I want to use spider in the other modes as well though ;)

I do like nvim-spider
          ^

when I'm here I want w to jump to the beginning of spider and dw delete either nvim or nvim- but not nvim-spider.

from nvim-spider.

chrisgrieser avatar chrisgrieser commented on August 22, 2024 1

ah, good call. Fixed in latest release

from nvim-spider.

chrisgrieser avatar chrisgrieser commented on August 22, 2024 1

Could one of you open a new issue and properly outline expected and actual behavior? Then I can look into it

from nvim-spider.

 avatar commented on August 22, 2024

db in this case will only delete o too, while normal db will delete do .

from nvim-spider.

xiyaowong avatar xiyaowong commented on August 22, 2024
vim.keymap.set({"n"}, "w", function() require("spider").motion("w") end, { desc = "Spider-w" })
vim.keymap.set({"n"}, "e", function() require("spider").motion("e") end, { desc = "Spider-e" })
vim.keymap.set({"n"}, "b", function() require("spider").motion("b") end, { desc = "Spider-b" })
vim.keymap.set({"n"}, "ge", function() require("spider").motion("ge") end, { desc = "Spider-ge" })

Only use spider in normal mode

from nvim-spider.

mcmillion avatar mcmillion commented on August 22, 2024

Only use spider in normal mode

This happens in normal mode.

from nvim-spider.

fakeharxy avatar fakeharxy commented on August 22, 2024

Hello, not sure what the etiquette is for commenting on closed issues, but I'm not sure this is fixed yet, or at least, it doesn't work as expected for me with brackets:

word) is

cursor on w of word. Press dw or cw and you get:

is

I would definitely assume that the ) should not be deleted in this case.

Thanks!

from nvim-spider.

chrisgrieser avatar chrisgrieser commented on August 22, 2024

@fakeharxy I think in that case, it works as expected. w goes to the beginning of the next word, and in operator pending deletes up to that. If you want to preserve the ), you should use e, since it only deletes to the end of the word.

Both is also consistent with what happens with the original e and w motions from vim.

from nvim-spider.

tobiaslieber avatar tobiaslieber commented on August 22, 2024

Hello, not sure what the etiquette is for commenting on closed issues, but I'm not sure this is fixed yet, or at least, it doesn't work as expected for me with brackets:

word) is

cursor on w of word. Press dw or cw and you get:

is

@fakeharxy I stumbled over the same issue. I was confused since this deviates from the default behaviour of (n)vim for dw and cw.

require("spider").setup({
	skipInsignificantPunctuation = false
})

does the trick for cw and dw, while the "normal" movement behaves differently then.

@chrisgrieser Probably it makes sense to have the skipInsignificantPunctuation option on the motion function (and not (just) as a global configuration value). Then it would be possible to have different motion behavior on the modes n, o, and x.

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.