Bug 159132 - Indent wrapped lines with a tab
Summary: Indent wrapped lines with a tab
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: indentation (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-11 12:22 UTC by Jakob Petsovits
Modified: 2015-10-08 08:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2008-03-11 12:22:39 UTC
Version:            (using KDE 4.0.2)
Installed from:    Ubuntu Packages
OS:                Linux

Currently, when lines are wrapped the stay on the same level of indention as where the line started. Example (<wrap> and <\n> added for demonstration purposes):

$presets['versioncontrol_registration_message_unauthorized'] = t('<p>The<wrap>
Concurrent Versioning System (CVS) is a software development tool<wrap>
available to volunteers with experience in software development, translation,<wrap>
theming, or documentation who wish to participate in the Drupal project.</p>');<\n>
$presets['versioncontrol_registration_message_authorized'] = t('<p>The<wrap>
(...)

You can see the issue here: it's difficult to tell where the line actually started, and more importantly it makes it hard to recognize the start of the line after that one. I'd *really* appreciate if wrapped lines get additional indention (standard indention size). Example, with the standard Drupal indention size of two spaces:

$presets['versioncontrol_registration_message_unauthorized'] = t('<p>The<wrap>
  Concurrent Versioning System (CVS) is a software development tool<wrap>
  available to volunteers with experience in software development, translation,<wrap>
  theming, or documentation who wish to participate in the Drupal project.</p>');<\n>
$presets['versioncontrol_registration_message_authorized'] = t('<p>The<wrap>
  (...)

Looks better, doesn't it?
Comment 1 Jakob Petsovits 2008-03-11 12:27:18 UTC
You know what, let's just assign this to the kate product instead of kdelibs, so that those people get to see it that it's intended for. (Plus I have some votes left for kate, but not for kdelibs :D )
Comment 2 Jakob Petsovits 2008-03-11 12:29:15 UTC
And the correct component, too. (Couldn't select it before, as it still contained the kdelibs components.)
Comment 3 Matthew Woehlke 2008-03-11 17:12:23 UTC
kate/part is the correct assignment for this bug anyway :-) (even though katepart lives in kdelibs).

Meanwhile, turning on line numbers might help a little.
Comment 4 Jakob Petsovits 2008-03-11 18:47:34 UTC
> Meanwhile, turning on line numbers might help a little.

Well, it's not like I don't do that anyways... so, determining if it's a new line is not the real issue to me. It's more just the feeling of randomness that I get when everything is indented the same way. Well, whatever.
Comment 5 Milian Wolff 2010-01-13 00:35:33 UTC
I'd second this which request, I'd personally like to see it implemented, and did so:

http://milianw.de/files/bugs/kate/indent_wrapped_lines-1.png

patch:
diff --git a/kate/render/katerenderer.cpp b/kate/render/katerenderer.cpp
index 3bccc8c..e6237a9 100644
--- a/kate/render/katerenderer.cpp
+++ b/kate/render/katerenderer.cpp
@@ -868,7 +868,7 @@ void KateRenderer::layoutLine(KateLineLayoutPtr lineLayout, int maxwidth, bool c
     if (needShiftX) {
       needShiftX = false;
       // Determine x offset for subsequent-lines-of-paragraph indenting
-      int pos = textLine->nextNonSpaceChar(0);
+      int pos = textLine->nextNonSpaceChar(0) + m_view->doc()->config()->indentationWidth();

       if (pos > 0) {
         shiftX = (int)line.cursorToX(pos);

(yes, that is all...)

Should I commit this for 4.5 with a config setting (default to on, imo?). Or should this be always on, i.e. can we omit the setting?
Comment 6 Milian Wolff 2010-02-18 18:36:27 UTC
will add a setting for that in 4.5
Comment 7 Christoph Cullmann 2015-10-08 08:52:08 UTC
Dear user,

this wish list item is now closed, as it wasn't touched in the last two years and no contributor stepped up to implement it.

The Kate/KTextEditor team is very small and we can just try to keep up with fixing bugs. Therefore wishs that show no activity for two years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users.

If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in two years again.

We have a nice website kate-editor.org that provides all the information needed to contribute, please make use of it. For highlighting improvements our user manual shows how to write syntax definition files.

Greetings
Christoph