Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#362 A foolish 'undo' Behaviour of TXS

None
closed
nobody
undo (2)
1
2012-11-23
2012-11-19
Jhering
No

I can't understood how foolish a software could like TXS using such an 'undo' behaviour.
If I use 'replace all',eg: It finds 10000 matched items and replaces them all.
Then I have some issues and have to undo the 'replace all' right now.
Then I have to Ctrl+Z for 10000 times!!10000 times!!10000 times!!

There is no another way to undo the whole 'replace all' all in one time.

Oh no, don't tell me I should use 'replace all' again, if I

replace all the '1' in '010101110110011' to '0'
how could i use 'replace all' again to make it back to original version?

All the tex editors and text editors I have used don't fool like TXS on this point. But it can stop I describing TXS still the best tex editor I have ever used.

Could you improve this?

Discussion

  • Tim Hoffmann
    Tim Hoffmann
    2012-11-19

    Formally your request is perfectly valid. We will look into this.

    As a personal remark, you should reconsider the style and language used. For now I attribute this to spontaneous frustration because you probably had to hit Ctrl+Z a lot.

    Please don't double post to feature requests and the discussion forum. We check both regularly.

     
  • Jhering
    Jhering
    2012-11-19

    Sorry, I could be more gentle but it really almost made me insane.

    Actually, the situation i met was about 510 times Ctrl+Z I had to hit.

    You can image it in your mind, a crazy guy hit Ctrl+Z all night.

     
    Last edit: Jhering 2012-11-19

  • Anonymous
    2012-11-19

    Why not close without saving? It's better than 510 times ctrl+z.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-11-19

    @Jhering: Never mind. I'd probably be equally furious after hitting 510 times Ctrl+Z. We're continuously improving behavior and fixing bugs. But in the end TXS is a spare time activity of a few guys. As such, we do not have the ressources for testing the software to an extend which would be possible in commercial products. Part of finding bugs and unintended behavior will necessarily happen at the user, though we try to limit this. Actually, in this case it wasn't even our fault but the behavior of the underlying editor component. Nevertheless, we will try to change this.

    @Anonymous: If close without saving is an option depends on how much you've edited before.

     

  • Anonymous
    2012-11-19

    If I use 'replace all',eg: It finds 10000 matched items and replaces them all.
    Then I have some issues and have to undo the 'replace all' right now.

    Isn't that useful?

    If you want to replace only the first 9990, you could hit replace all, then undo it 10 times.
    If it undos everything that's not possible.

    You can image it in your mind, a crazy guy hit Ctrl+Z all night.

    You really pressed and released the ctrl+z key 510 times?

    Why didn't you just hold the ctrl+z key down?
    Then it takes 26 seconds to do 510 undo operations...

    And a macro like:

    %SCRIPT
    for (var i=0;i<510;i++) 
      editor.undo();
    

    would do it in two just 2 seconds...

    Actually, in this case it wasn't even our fault but t he behavior of the underlying editor component.

    I pretty much rewrote all of the search/replace things

    edit: forgot to login...

     
    Last edit: Benito van der Zander 2012-11-19
  • Tim Hoffmann
    Tim Hoffmann
    2012-11-19

    Useful or not may depend on your intention. Anyway, if "undo all replacements" is the default behavior in most other editors, we should conform to this. As you said, everything else could be realized as a script.

    Actually, in this case it wasn't even our fault but t he behavior of the underlying editor component.

    I pretty much rewrote all of the search/replace things

    Ok, I didn't know that.

     
  • Thiago
    Thiago
    2012-11-20

    Nice discussion. We can not forget about the possibility to replace or undo replace only in selected blocks.

    Benito, how to use your script? Should I type it on TXS?

     
  • Jhering
    Jhering
    2012-11-20

    Why didn't you just hold the ctrl+z key down?
    Then it takes 26 seconds to do 510 undo operations...

    Thank you for your suggestion, actually I did hold the ctrl+z key down, but I couldn't count what times it had undone, then I had to slow down and count it, by the way, TXS did not display how many times undo had taken place. If the times of undo ran over 510, I had to press redo, and then counted it.
    As long as I have to undo, I have to count it and hold the key for 20 or more than 20 sec, I have to look in and remember how many times the undo have done, if for 184526 times you can try it.

    For any time when you will undo you have to count one by one, TXS can not display how many times undo have taken place, It seems like not a good users' experience.

    And a macro like:

    %SCRIPT
    for (var i=0;i<510;i++)
    editor.undo();

    would do it in two just 2 seconds...

    As long as I will undo the replacement, I have to write a script to make it true, maybe you ignore a basic truth, why we use a texeditor? Why do we just use notepad in MS-Windows? It seems like not a good users' experience with a macro any time when we want to undo.

    Anyway, if "undo all replacements" is the default behavior in most other editors, we should conform to this.

    Hi, after tried them personally with attention, up to now there are these editors using "undo all replacements" as the default undo behavior as follows:
    Vi
    Vim
    Emacs
    Word, almost all kinds of Office softwares, eg: OOO, LibreOffice
    Texshop(Mac)
    WinEdt
    Editplus
    Ultraedit

    Personally I think such undo behaviour in TXS is not a universal setting in most advanced and sophisticated editors. It only can be found in some simple or elementary editors eg: Notepad in MS-Windows.

    I hope you could improve it.
    After all, I really thank you for your good job, up to now TXS is really the best Tex-editor I have ever been using. I hope it will be better!

     
    Last edit: Jhering 2012-11-20

  • Anonymous
    2012-11-20

    it has been implemented in latest svn version
    if replace all with no prompt is performed, undo changes all of them

    edit: SVN rev. 3474

     
    Last edit: Tim Hoffmann 2012-11-20
    • status: open --> closed
    • milestone: -->
     
  • Tim Hoffmann
    Tim Hoffmann
    2012-11-21

    You cannot download it yet.

    The changes are just applied to the source code so far (SVN is just the version control system of the source code). Either you have to compile it yourself or you have to wait until we do the next build (which should be soon).

     

  • Anonymous
    2012-11-22

    I get it.
    Thank you!! I will wait for it:-)

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-11-22

    Though not yet officially announced, you can download 2.5.1 from the files section.

     
  • @Thiago : Enter it in the Macros \ Edit Macros dialog.
    Then click on "run script" in the dialog, or close the dialog and choose the macro in th menu

     
    Last edit: Benito van der Zander 2012-11-23