How can i change the word separators in QtCreator ?
-
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
iinint:
If i hold
Ctrland press theright arrowbutton, the pointer will move 4 characters and will now stand beforemat the beginning ofman:
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
manwhile holdingCtrl, it will stand after the_, right afterman_, i want it to stand aftermanand not skip the underscore, just like vscode.
This bug highlights the problem:
https://bugreports.qt.io/browse/QTBUG-64360?jql=text ~ "caret" -
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
iinint:
If i hold
Ctrland press theright arrowbutton, the pointer will move 4 characters and will now stand beforemat the beginning ofman:
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
manwhile holdingCtrl, it will stand after the_, right afterman_, i want it to stand aftermanand not skip the underscore, just like vscode.
This bug highlights the problem:
https://bugreports.qt.io/browse/QTBUG-64360?jql=text ~ "caret"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.
-
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.
@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.