Author Topic: How to get indentation and left justification working together?  (Read 6265 times)

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
I have an issue where long lines in PHP code are not getting wrapped with the proper left justification.  I have another code editor (E-text Editor) that does the word wrapping correctly.  I have uploaded two screenshots to show you what the differences are.

I am sure there is a way in SlickEdit to do what I am trying to do:  get the editor to respect the left justification on indentation -- and not just wrap the line all the way to the left without any indentation.

I am using SlickEdit 15.0.1.3 on Windows XP.

Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: How to get indentation and left justification working together?
« Reply #1 on: November 09, 2011, 06:56:27 PM »
Well, to start with, the SE picture shows that SE hasn't inserted a newline, just soft-wrapped it to keep the end of the line visible in the buffer.  I don't know if you are expecting it to wrap visually, or actually modify your code by inserting a newline.  If you want it to actually modify your code, you need to enable Word Wrap on the Document menu.  However, the documentation for Word Wrap says:
Quote
Note that Word Wrap is intended for plain text only.
That would explain why the actual behavior exhibited looks like it's intended for plain text editing.   ::)

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #2 on: November 09, 2011, 09:03:20 PM »
I am expecting the line to wrap only visually -- and not modify my code.  Is there any way that SlickEdit can look at the indented line and continue on a new line (without inserting an actual newline character) in an indented manner?  This would make the code look much more readable.

ehab

  • Senior Community Member
  • Posts: 285
  • Hero Points: 15
  • coding with SE is like playing music
Re: How to get indentation and left justification working together?
« Reply #3 on: November 09, 2011, 09:21:19 PM »
did you see

Tools > Options > Languages > All Languages > Word Wrap

i had such a line break problem, i forgot how i solved it but that was my starting point.

maybe check break line while adding a large width value etc ... or was it soft warp : )

Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: How to get indentation and left justification working together?
« Reply #4 on: November 09, 2011, 09:53:57 PM »
I am expecting the line to wrap only visually -- and not modify my code.  Is there any way that SlickEdit can look at the indented line and continue on a new line (without inserting an actual newline character) in an indented manner?  This would make the code look much more readable.
So you want Soft Wrap to indent it to the current level of indent.  It appears that isn't part of SE capability today, unless there is a def_xyz var that affects that.  I wouldn't find that particular arrangement useful anyway, but that's just me.  You could add that to the "What features ..." thread: http://community.slickedit.com/index.php/topic,4972.0.html

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #5 on: January 18, 2025, 10:48:15 PM »
I want to revive this thread that I started more than 14 years ago.

Is there any progress on the requested functionality? Just to add more color, all modern text editors (including Visual Studio Code) display the requested behavior when wrapping words. I have to switch to Visual Studio Code every time I edit HTML because SlickEdit's way of displaying information makes things visually less clear.

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #6 on: January 18, 2025, 10:58:44 PM »
I am adding the screenshots for both SlickEdit and Visual Studio Code to illustrate my point. As you can see from these two screenshots, it's much harder to visualize the code when using SlickEdit. There must be a setting SlickEdit; I probably just don't know where it is. I can't be the only person with this issue.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7043
  • Hero Points: 535
Re: How to get indentation and left justification working together?
« Reply #7 on: January 19, 2025, 12:57:50 AM »
It looks like SlickEdit isn't figuring out what embedded language to use. Please post a sample file as an attachment. That way, we know what the file extension is and not just the file contents.

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #8 on: January 19, 2025, 04:30:45 PM »
Clark, thank you for taking the time to reply.

The sample code I want to use is the very same forum post we are on. I copied the source code of this forum post and have attached it as "SlickEdit Forum Post.html." The two other attachments illustrate the behavior of SlickEdit and Visual Studio Code, respectively. I have selected only a small part of the code to illustrate the point. As you can see from the screenshots, VSCode makes it visually easier to understand the structure of the code as the code is (artificially) indented as it is wrapped. You can download a copy of VSCode to verify what I am talking about.

I would rather use SlickEdit than VSCode because SlickEdit makes my life easier in so many different ways. But, for HTML files, I have to switch to VSCode for this soft-wrap indenting issue. I want to clarify that SlickEdit does not have a problem with what the embedded language is, as I can confirm by going to the Document --> Select Mode menu.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7043
  • Hero Points: 535
Re: How to get indentation and left justification working together?
« Reply #9 on: January 19, 2025, 04:59:52 PM »
Are you using DJango in your HTML?

If so, do the following:
* Open an HTML file
* type "toggle_django_color_coding" on the SlickEdit command line.

That will enable DJango color coding for HTML files.

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #10 on: January 19, 2025, 07:33:32 PM »
Clark, to remove any questions about my personal configuration, I chose the HTML code from the very page we are on -- and demonstrated the problem. I also gave you steps to replicate the problem. (Save the source code of the page we are reading -- and then open it in two different editors.) I am dealing with pure HTML since that is the code the SlickEdit's forum site is sending to my browser.

To clarify, I am not using Django.

If, for some reason, you believe that SlickEdit is not going to work in the manner that I am requesting on this thread, you can just say so. I am raising an issue after waiting for 14 years.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7043
  • Hero Points: 535
Re: How to get indentation and left justification working together?
« Reply #11 on: January 19, 2025, 09:52:11 PM »
I don't see any attachment to your post?


TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #12 on: January 19, 2025, 10:10:08 PM »
Reply # 8 on this forum thread has all the attachments. I uploaded three attachments there.

I am uploading a screenshot here showing the three attachments. If you do not see them, let me know, and I will upload them again.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7043
  • Hero Points: 535
Re: How to get indentation and left justification working together?
« Reply #13 on: January 20, 2025, 12:30:30 AM »
I think I've gotten confused. I thought you were talking about a different issue.

There isn't an option for softwrap to wrap to the previous lines indent level. Is that what you are looking for?

TheHumbleOne

  • Community Member
  • Posts: 60
  • Hero Points: 1
Re: How to get indentation and left justification working together?
« Reply #14 on: January 20, 2025, 03:34:16 AM »
Clark, yes, that is what I was looking for.

I wanted soft-wrap to wrap to the previous line's indent level.

Thank you for your clarification. Is there any way you can add this request to the feature request queue? Almost all other major editors have this functionality.