WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] geany: how to disable autoindent on wrapped lines?  (Read 2378 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1348
[Solved] geany: how to disable autoindent on wrapped lines?
« on: August 14, 2020, 02:24:12 PM »
I can't figure out how to make geany 1.36 display traditional paragraphs (indented first line, subsequent lines flush against the left margin). I have a hard time believing that such a capable text editor can't do something so simple--I must be missing a configuration setting somewhere.

To reproduce the issue:

1. Turn on line wrapping (Edit -> Preferences -> Editor -> Features -> check "Line wrapping")

2. Turn off autoindent (Edit -> Preferences -> Editor -> Indentation -> for "Auto-indent mode" choose "None")

3. Start typing until the line wraps and you have two lines

4. Go back to the beginning of the text and press Tab

Expected result: First line should be indented and second line should continue to touch the left margin.

Actual result: Both lines are displayed as indented.

Please, how can I achieve the expected result (i.e., how can geany display the first line as indented but keep subsequent lines in the same paragraph touching the left margin)?
« Last Edit: August 14, 2020, 07:04:20 PM by Rich »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1348
Re: geany: how to disable autoindent on wrapped lines?
« Reply #1 on: August 14, 2020, 02:34:44 PM »
Oops, I meant to post this in the "TCE Q&A Forum" section.
« Last Edit: August 14, 2020, 02:37:22 PM by GNUser »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1348
Re: geany: how to disable autoindent on wrapped lines?
« Reply #2 on: August 14, 2020, 06:35:12 PM »
I asked on the geany mailing list and one of their gurus knew the solution: In ~/.config/geany/filedefs/filetypes.common, change
"line_wrap_indent=0;1;" to "line_wrap_indent=0;0;"

Gosh in retrospect it doesn't look that hard, but I was REALLY stuck on this one. Thread is solved :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Re: geany: how to disable autoindent on wrapped lines?
« Reply #3 on: August 14, 2020, 06:36:52 PM »
Hi GNUser
I think I can explain what is going on.
... 3. Start typing until the line wraps and you have two lines ...
Actually, you don't. It's  "Line Wrapping",  not  "Auto Newline".  Turn on line numbers  Editor->Display->Show line numbers.
Now type a long line and watch the line number when it wraps. Instead of displaying the next number, it is blank because it is part
of the same line.


Quote
... Please, how can I achieve the expected result (i.e., how can geany display the first line as indented but keep subsequent lines in the same paragraph touching the left margin)?
Turn off  Line Wrapping  and use carriage returns.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Re: [Solved] geany: how to disable autoindent on wrapped lines?
« Reply #4 on: August 14, 2020, 07:08:53 PM »
Hi GNUser
Oops, I meant to post this in the "TCE Q&A Forum" section.
And now it is. :)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1348
Re: [Solved] geany: how to disable autoindent on wrapped lines?
« Reply #5 on: August 14, 2020, 07:49:09 PM »
Hi, Rich. Thank you for moving the thread.

I realize it's just one long line, not multiple lines. Turning off line wrapping and using carriage returns is not an option when writing prose--later edits that would change line lengths would quickly lead to chaos.

I must say that the default way geany displays wrapped lines is very surprising to an old curmudgeon. Well, now it's behaving exactly as expected.

Thanks for putting geany on the radar for me several months ago. All things considered, it's the best GUI editor I've ever come across.