Giter VIP home page Giter VIP logo

Comments (11)

Quramy avatar Quramy commented on June 22, 2024

Hi, derekpitt.

I tried to get your error, using the following sample codes. But I could not get the error.
If you don't mind, tell me the files where the error occurred (Github repository or Gist).

  • Hoge.ts
module Main {
    export class Hoge {}
}
  • Foo.ts
/// <reference path="./Hoge.ts" />

var a = new Main.Hoge();

I executed :TsuquyomiRenameSymbol on Hoge at Hoge.ts, but the symbol renamed successfully.

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

I'm working on getting you an example repository (the error i'm getting is in a private repo)..
I'll let you know when I have something up.

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

alright i think i have some examples for you.

https://github.com/derekpitt/tsuquyomi-examples

To reproduce the particular issue, if you start in ex2/ and open up file2.ts and try to rename AppState in the import statement.

I also get unexpected results when going into ex1/ open up app-state.ts and try to rename the class:

it turns into:

export class newname}

Sorry this took a long time to put together.. you know... work and stuff :)

I'm also going to see if i get similar results when using latest master branch from TypeScript (i know they have made some progress). i'll let you know what I find out!

from tsuquyomi.

Quramy avatar Quramy commented on June 22, 2024

Hi, @derekpitt .

Thanks for your example repository !

I tried your issues and I reproduced them.

I'll try to fix them.

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

Thanks!

from tsuquyomi.

Quramy avatar Quramy commented on June 22, 2024

I think that I fixed these issues(renaming ex2/file2.ts and ex1/app-state.ts).

Please confirm with checking out my latest commit ( f5898b5 ).

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

Yeah! looking real good! seems to be working much better. Thank you!!!

Is there a way to not open up each file it hits when renaming?

from tsuquyomi.

Quramy avatar Quramy commented on June 22, 2024

Sorry, now I don't have the way to not open files which contains renamed symbol.
To replace symbol, I use :split command at autoload/tsuquyomi.vim.

If you have any idea, please tell me.

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

maybe :edit could be used? or make it an option the user can set like g:tsuquyomi_rename_split

it may be nice to set it to :edit as default, since it is pretty crazy to have 50 splits if you rename something that is used a lot throughout your code :)

from tsuquyomi.

Quramy avatar Quramy commented on June 22, 2024

Because I think users may dislike that the plugin arbitrarily changes and saves them source codes, :TsuquyomiRenameSymbol command replaces hit symbol but does not save the opened buffers. So using :edit instead of :split can occurs the following error.

Error occurred while executing "open" action

I'll consider your request and adding option to replace & save arbitrarily.

from tsuquyomi.

derekpitt avatar derekpitt commented on June 22, 2024

sounds good! thanks for getting this fixed so fast!

from tsuquyomi.

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.