Author Topic: First Impressions  (Read 244 times)

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
First Impressions
« on: August 26, 2023, 03:10:18 am »
Firstly, great job guys, always nice to see the newest/latest/greatest. 

I discovered a slight regression. The listing below shows a block of code with all the constructor parameters on the same line as the constructor, I typically place the constructor parameters on separate lines to make the code more readable.  I do this by manually pressing enter before the colon and comma separators and expected these to be on separate lines - each one indented by the tab indent settings (4 spaces in my case).

If I press enter before the ':' separator (in the second , SlickEdit correctly places that on column 4, however when I attempt to place the second parameter 'mOptions' on the next line (by pressing enter before the',' parameter separator, it is placed on the next line indented by 5 characters, then when I place the 3rd constructor parameter 'lineNumbersArea' on the next line (again by pressing enter before the',' parameter separator) the ',' parameter separator is set to column 0.  The way I was expecting this to work (like visual studio) is to align the commas with the first ':' (see last code snippet below).

This is the code I want to manually edit - placing constructor parameters on separate lines:
Code: [Select]
CodeEditor::CodeEditor(QWidget *parent, const Options &rOptions) : QPlainTextEdit(parent), mOptions{rOptions}, lineNumberArea{std::make_unique<LineNumberArea>(this)}
{
  . . .
}

This is what I get (after pressing enter before the ':' and ',' separators
Code: [Select]
CodeEditor::CodeEditor(QWidget* parent, const Options& rOptions)
    : QPlainTextEdit(parent)
      , mOptions{ rOptions }
, lineNumberArea{std::make_unique<LineNumberArea>(this)}
{ . . .

This is what I want
Code: [Select]
CodeEditor::CodeEditor(QWidget* parent, const Options& rOptions)
    : QPlainTextEdit(parent)
    , mOptions{ rOptions }
    , lineNumberArea{std::make_unique<LineNumberArea>(this)}
{
 . . .
}

Another thing that has been bothering me for some time is that there is no way to customize the whitespace space and tab characters.  They are too bright - Visual Studio makes them much dimmer and less distracting - see attachment.




Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6582
  • Hero Points: 511
Re: First Impressions
« Reply #1 on: August 26, 2023, 02:45:08 pm »
You can configure the Special Characters color to something less bright here: Tools>Options>Colors>Special Characters

We will look into this smart indenting issue. Not simple.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6582
  • Hero Points: 511
Re: First Impressions
« Reply #2 on: August 28, 2023, 01:22:45 am »
Smart indenting for this fixed for v28 beta 3

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
Re: First Impressions
« Reply #3 on: September 02, 2023, 03:24:01 am »
Thanks the smart indentation will be great, especially if it indents 4 spaces from the left column in the example I showed - in the current version of SlickEdit 27.0.2 it aligns to the leftmost column (0) which is wrong.

I agree smart indenting is difficult to get right, I'm using clangTooling on a project to modify code its very challenging.