Git Product home page Git Product logo

Comments (4)

jalvesaq avatar jalvesaq commented on September 16, 2024

I confirm the bug. Thanks for reporting it! Did you try R_assign=1? It seems to have the same bug. Could you make a pull request fixing it, please?

from nvim-r.

MaciekChudek avatar MaciekChudek commented on September 16, 2024

I had a play around with it. The R_assign = 2 case with a single underscore (i.e., no replacement) is easy to fix by performing the check for a preceding underscore before dropping out of insert mode. I'll create a pull request.

The more general R_assign = 1 is harder. I can't see an obvious fix. You need to drop into normal mode to call the ReplaceUnderS() function, which resets the @. register, used for dot-repeating. That register is read-only, so we can't just restore what was in it previously. I checked and the other plugin I use for replacement in insert mode (vsnip) has the same problem.

Possible solutions could be to rewrite the replacement functions so they never leave insert mode, or delete the entire typed text and reinsert it followed by <-. Both options feel kludgy and laborious to implement. Since no-one but me has ever complained about this issue, I don't think it's worth the time to fix.

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

I have never noted this bug because I rarely use Vim's dot-repeat, and you are the first to report it since May 2009.
I'll wait for the pull request. Thank you!

from nvim-r.

jalvesaq avatar jalvesaq commented on September 16, 2024

You can fix only the R_assign = 2 and let the other case be fixed by someone else in the future.

from nvim-r.

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.