Uploaded image for project: 'Qt Creator'
  1. Qt Creator

Remove extraneous whitespace from indentation



    • Type: Suggestion
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 3.5.0
    • Fix Version/s: None
    • Component/s: FakeVim
    • Labels:


      This applies to the FakeVim mode. I'm not sure what expectations are in non-vi-style editors.

      In Vim, when you create a new line (e.g. by hitting “o”), it is indented properly, as expected. However, if no text is added to that line before switching lines, the indentation is removed. As a concrete example, if there are a few lines of code and I want to add new code below it, but with a blank line in between, what I can do is go to the last line, hit “o”, hit “enter”, and then start typing the new lines. Vim will indent on the line below when I hit “o” but when it sees I didn't actually add anything to that line, it removes all space. This is done in realtime, not on save.

      QtCreator keeps all the extra whitespace. If I hit “o” then “enter”, there is now a line with a few spaces at the beginning and nothing else. I find Vim's behavior much more intuitive (you almost never want a line composed purely of extraneous whitespace), and think it would be a useful addition to QtCreator.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              hjk hjk
              cspiegel Chris Spiegel
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes