Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How can i change the word separators in QtCreator ?

How can i change the word separators in QtCreator ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 266 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pete CarterP Offline
    Pete CarterP Offline
    Pete Carter
    wrote on last edited by Pete Carter
    #1

    suppose i have this variable:

    int man_in_the_fan = 7;

    now the pointer is standing at the beginning of the text before the letter i in int:

    Screenshot_20230816_220901.png

    If i hold Ctrl and press the right arrow button, the pointer will move 4 characters and will now stand before m at the beginning of man:

    Screenshot_20230816_221217.png

    Now i want to change that behaviour so that the pointer stands at the end of int, at the end of each word and not skip the space.

    If you try to move the pointer from the beginning of man while holding Ctrl, it will stand after the _, right after man_, i want it to stand after man and not skip the underscore, just like vscode.


    This bug highlights the problem:
    https://bugreports.qt.io/browse/QTBUG-64360?jql=text ~ "caret"

    cristian-adamC 1 Reply Last reply
    0
    • Pete CarterP Pete Carter

      suppose i have this variable:

      int man_in_the_fan = 7;

      now the pointer is standing at the beginning of the text before the letter i in int:

      Screenshot_20230816_220901.png

      If i hold Ctrl and press the right arrow button, the pointer will move 4 characters and will now stand before m at the beginning of man:

      Screenshot_20230816_221217.png

      Now i want to change that behaviour so that the pointer stands at the end of int, at the end of each word and not skip the space.

      If you try to move the pointer from the beginning of man while holding Ctrl, it will stand after the _, right after man_, i want it to stand after man and not skip the underscore, just like vscode.


      This bug highlights the problem:
      https://bugreports.qt.io/browse/QTBUG-64360?jql=text ~ "caret"

      cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by cristian-adam
      #2

      I've done a small experiment, add a | to every stop for the following line:

      int main() { return 0; }
      

      Here are the results:

      Left to right
      -------------
      
      Visual Studio 2022:   |int |main|(|) |{ |return |0|; |}|
      vscode:               |int| main|()| {| return| 0|;| }|
      Kate:                 |int |main|() |{ |return |0|; |}|
      Qt Creator:           |int |main|() |{ |return |0|; |}|
      vim:                  |int |main|() |{ |return |0|; |}|                                                                                                                                                                                                               
      emacs:                |int| main|() { return| 0|; }|
      
      Right to left
      -------------
      
      Visual Studio 2022:    |int |main|(|) |{ |return |0|; |}|
      vscode:                |int |main|() |{ |return |0; |}|
      Kate:                  |int |main|() |{ |return |0|; |}|
      Qt Creator:            |int |main|()| |{| |return |0|;| |}|
      vim:                   |int |main|() |{ |return |0|; |}|    
      emacs:                 |int |main() { |return |0; }|
      

      It looks like vscode behaves like emacs and Qt Creator like vim.

      Pete CarterP 1 Reply Last reply
      3
      • cristian-adamC cristian-adam

        I've done a small experiment, add a | to every stop for the following line:

        int main() { return 0; }
        

        Here are the results:

        Left to right
        -------------
        
        Visual Studio 2022:   |int |main|(|) |{ |return |0|; |}|
        vscode:               |int| main|()| {| return| 0|;| }|
        Kate:                 |int |main|() |{ |return |0|; |}|
        Qt Creator:           |int |main|() |{ |return |0|; |}|
        vim:                  |int |main|() |{ |return |0|; |}|                                                                                                                                                                                                               
        emacs:                |int| main|() { return| 0|; }|
        
        Right to left
        -------------
        
        Visual Studio 2022:    |int |main|(|) |{ |return |0|; |}|
        vscode:                |int |main|() |{ |return |0; |}|
        Kate:                  |int |main|() |{ |return |0|; |}|
        Qt Creator:            |int |main|()| |{| |return |0|;| |}|
        vim:                   |int |main|() |{ |return |0|; |}|    
        emacs:                 |int |main() { |return |0; }|
        

        It looks like vscode behaves like emacs and Qt Creator like vim.

        Pete CarterP Offline
        Pete CarterP Offline
        Pete Carter
        wrote on last edited by
        #3

        @cristian-adam I have never used vim, i think it's horrible, why would anyone use something like this in the first place 😅.

        It would be nice to be able to configure this behaviour is QtCreator. I think it's logical for the pointer to stand after the word when moved, considering the space is a character, it should not be skipped.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved