ctrl+del to delete next word

TXS - Help
  • Thiago

    Thiago - 2013-03-14

    It is a powerful tool to use ctrl+del to delete the whole word after the cursor.

    I don't know if this is a bug but everytime when I use this for a word followed by a command, the backslash is removed also.

    For example, ctrl+del with the cursor as below

    foo |faa \textit{fee}


    foo textit{fee}.

    Is it possible to avoid deleting the backslash?

    Last edit: Thiago 2013-03-14
  • Tim Hoffmann

    Tim Hoffmann - 2013-03-14

    Well, not with the current mechanism. It's provided by the editor component, which doesn't know that the backslash has a special meaning.

    However, it should be quite simple to write a user script perfoming this action and reassign the shortcut:

    Something like this may work (untested and possibly not handling all corner cases correctly):

    cursor.movePosition(1, cursorEnums.NextWord, cursorEnums.KeepAnchor)
    if (cursor.previousChar() == '\\')
        cursor.movePosition(1, cursorEnums.Left, cursorEnums.KeepAnchor)

    You can find more on scripting in the user manual.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks