Displaying the cursor position

The IDE 2.0 has the potential for me to replace the Notepad++ editor that I used until now. I just miss the cursor position display. The line number is currently displayed. It shouldn't be difficult to see the cursor position as well. E.g. LL / CC (Line / Column) in the bottom line left side.

Just out of curiosity, what do you use the column position for?

For me, I occasionally use it when I need to determine the length of a string, but that's something I don't do very often at all.

I suppose it might be useful when interpreting compiler errors/warnings, but they already have that carat to indicate the column visually so I have never had the need for it in that application.

There are two reasons that are obvious to me:

  • General: Every IDE I know (except Arduino) shows the row / column of the cursor.
  • Personally: I comment on my programs in detail and also use comments for optical formatting. I have an aesthetic standard there: same length. See example.
...
  if (xExecute)
  {
    switch(venBefehl)
    {
      case enEnd:
        iError = ERR_NOEND;
        return (false);
      case enDefV:  //---- Define a Variable --------------
        xOK = vars.execDefine();
        break;
      case enStoreA:  //---- Akku in Variable speichern ---
        xOK = vars.execSET();
        break;
      case enLoadA:   //---- Wert (Var|Const) nach Akku ---
        xOK = vars.execLD();
        break;
      case enAddA:    //---- Wert zu Akku addieren---------
        xOK = vars.execADD();
        break;
      case enFOR:     //---- Beginn einer FOR-Schleife ----
        xOK = execFOR();      // FOR initialisieren
        break;
      case enENDFOR:  //---- Ende einer FOR-Schleife ------
        xOK = execENDFOR();   // FOR Schleifenende
        break;
      case enBreak:   //---- Abbrechen FOR-Schleife -------
        xOK = execBreak();
        break;
...

I have a further argument for displaying the cursor position! The compiler error messages indicate the exact position of the error with “Line: Position”. The good user today has to count with the arrow key until he is at the fault location. Not exactly comfortable!
So once again my appeal: Show the cursor position next to the line number in the status line of the IDE.

Should not be necessary because the error message will also shown a ^ at that position on the line below the code that caused the error.

Dear Pert, if I only get explanations that this and that is not necessary, I lose interest in contributing to a better IDE.
From my intention it needs only a handfull instructions to add this feature.

1 Like

The primary focus of the Arduino IDE is to provide a gentle learning curve. This is what sets it apart from the many other excellent IDEs available to embedded systems developers. For this reason, every UI element that is added must have a clear benefit that outweighs the increase in complexity that makes it less friendly to beginners.

If we add every single UI element that any user requested without careful consideration, then we would just end up with another Visual Studio/Eclipse/Keil/etc. There is no need for another one of those.

Feature requests are always welcome, but the Arduino team is also welcome to reject some of them. I’m sorry if that gives you a bad feeling, but it’s just how it is. This is free open source software and if you don’t like the direction the Arduino team is taking it in, you are welcome to create your own fork and make it just the way you want it. Maybe the community will decide they like yours better.