Code Monkey home page Code Monkey logo

Comments (13)

gbprod avatar gbprod commented on July 23, 2024

Thanks for reporting this issue. I'll take a look at it ASAP.

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

I think this issue is fixed by this commit.
Can you tell me if you are using an up-to-date version ?

from substitute.nvim.

pedro757 avatar pedro757 commented on July 23, 2024

I'm using the latest version of this plugin.

This is my packer config

use {
  "gbprod/substitute.nvim",
  config = function()
    require("substitute").setup {}
  end,
}

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

hmm ok, I see the problem. It's weird but I try to fix it.

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

I've made something here : #63
I will test it for a while before merging it.
If you want to try, you're welcome ;)

from substitute.nvim.

pedro757 avatar pedro757 commented on July 23, 2024

I tried and got this

Substitute failed

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

Oh! I forgot a debug log 😂
But does the substitution worked ?

from substitute.nvim.

pedro757 avatar pedro757 commented on July 23, 2024

No, It didn't

from substitute.nvim.

pedro757 avatar pedro757 commented on July 23, 2024

I believe It's waiting for me to put a register

This is the output when I press Ctrl-c after the initial error Substitute failed

E5108: Error executing lua Keyboard interrupt
stack traceback:
        [C]: in function 'getreg'
        ...ite/pack/packer/start/substitute.nvim/lua/substitute.lua:36: in function <...ite/pack/packer/start/substitute.nvim/lua/substitute.lua:31

If I put a register instead of ctrl-c then It puts the text of the register wrong, like this:

struct Monster {
  health: i32,  // With your cursor here copy the content of {} --- yiB or yi{
}

  health: i32,struct Wizard {} // Then here and try to put it inside the {} with your mapping ---- <leader>piB or <leader>pi{ 

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

Ok, that's strange, can you share your setup (options for setup method and mapping).

I've made a change to have some logs for debugging purpose, can you try again and tell me what messages you have ?

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

Any feedback on this issue @pedro757 ?
It seems to work for me.

from substitute.nvim.

pedro757 avatar pedro757 commented on July 23, 2024

I just tried the new branch #64 it works fine, however I'm also using wellle/targets.vim, but these plugins are incompatible right now.

from substitute.nvim.

gbprod avatar gbprod commented on July 23, 2024

Can you open a issue explaining the compatibilities issues you have with wellle/targets.vim ?
Thanks

from substitute.nvim.

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.