Qt Creator editor: Can we insert a column of sequential numbers?
-
This seems to me that it would be a very useful addition to have, if it is not already implemented.
The Geany editor on Linux is based on the same Scintilla software as the editor in Qt Creator. Geany has a plugin with this capability. There have been many occasions where I had to copy a block of code from Qt Creator, paste it into Geany and insert the numbers there.
I am using the latest version of Qt Creator at the moment (17.0.0) on Ubuntu Linux 24.04.3.
-
This seems to me that it would be a very useful addition to have, if it is not already implemented.
The Geany editor on Linux is based on the same Scintilla software as the editor in Qt Creator. Geany has a plugin with this capability. There have been many occasions where I had to copy a block of code from Qt Creator, paste it into Geany and insert the numbers there.
I am using the latest version of Qt Creator at the moment (17.0.0) on Ubuntu Linux 24.04.3.
Hi!
A column with numbers for each row or what numbers do you have in mind?!
Or do you mean the "cursor" position likerow: 24, col: 42
?Isn't it already in there?'
(I guess)Maybe you only have to make it visible/enable it first
-
Hi!
A column with numbers for each row or what numbers do you have in mind?!
Or do you mean the "cursor" position likerow: 24, col: 42
?Isn't it already in there?'
(I guess)Maybe you only have to make it visible/enable it first
@Pl45m4 What I meant is like this:
#define FIRST 1 #define SECOND 1 #define THIRD 1 #define FOURTH 1 // etc.
Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:
#define FIRST 1 #define SECOND 2 #define THIRD 3 #define FOURTH 4 // etc.
-
@Pl45m4 What I meant is like this:
#define FIRST 1 #define SECOND 1 #define THIRD 1 #define FOURTH 1 // etc.
Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:
#define FIRST 1 #define SECOND 2 #define THIRD 3 #define FOURTH 4 // etc.
Ah... so this "auto-step" feature that programs like MS Excel also have... I don't know what the "official" / professional name for this is.
You select two or more cells with data, then drag the cursor down in a straight line and it automatically fills the cells below with data folllowing the "rule" (step-size)// initial data A B C 0: 2 1: 4 // after selecting row 0 and 1 and "pulling the data down" it adds steps of 2 // (or any given logic in the selected cells) A B C 0: 2 1: 4 2: 6 3: 8 4: 10 5: 12 6: 14 7: 16
Mh, honestly I think this is a niche feature for an IDE. Might be more helpful in generic text editors.
But yeah, better have features like this and don't need them, than not having them but missing them :))
-
@Pl45m4 What I meant is like this:
#define FIRST 1 #define SECOND 1 #define THIRD 1 #define FOURTH 1 // etc.
Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:
#define FIRST 1 #define SECOND 2 #define THIRD 3 #define FOURTH 4 // etc.
@Robert-Hairgrove said in Qt Creator editor: Can we insert a column of sequential numbers?:
@Pl45m4 What I meant is like this:
#define FIRST 1 #define SECOND 1 #define THIRD 1 #define FOURTH 1 // etc.
Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:
#define FIRST 1 #define SECOND 2 #define THIRD 3 #define FOURTH 4 // etc.
This works with ... AI. See https://forum.qt.io/topic/163001/local-llm-assisted-text-completion-for-qt-creator for details.
Below you can see it in action (
--fim-qwen-3b-default
on MacBook Pro M3):
-
@Robert-Hairgrove said in Qt Creator editor: Can we insert a column of sequential numbers?:
@Pl45m4 What I meant is like this:
#define FIRST 1 #define SECOND 1 #define THIRD 1 #define FOURTH 1 // etc.
Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:
#define FIRST 1 #define SECOND 2 #define THIRD 3 #define FOURTH 4 // etc.
This works with ... AI. See https://forum.qt.io/topic/163001/local-llm-assisted-text-completion-for-qt-creator for details.
Below you can see it in action (
--fim-qwen-3b-default
on MacBook Pro M3):
@cristian-adam
Purely ooi, why does it change from cardinal words to ordinal ones afterSEVENTH
? :) -
@cristian-adam
Purely ooi, why does it change from cardinal words to ordinal ones afterSEVENTH
? :)@JonB said in Qt Creator editor: Can we insert a column of sequential numbers?:
Purely ooi, why does it change from cardinal words to ordinal ones after SEVENTH? :)
Because:
@cristian-adam said in Qt Creator editor: Can we insert a column of sequential numbers?:
This works with ... AI
:))