Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33142

fakevim module ":q" is inconsistent and weird.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 16.0.2
    • Editors
    • None
    • Linux/Wayland

    Description

      The FakeVim module has inconsistent and weird behavior with regard to the usage of the closing of a single file. The vim shortcut :q

      Consider the simple case of one view. No spits. A bunch of files are open.
      Hitting :q in that case (notice, after hitting escape) will close the file. Nothing else. Which is quite similar to what vim does. And expected.

      Then, instead of one view use multiple views. For instance using the vim command :vsplit
      and naturally different files in the different views.

      In this case, hitting the :q shortcut has a diametrically opposed behavior.
      What happens today is that the view closes. The file is not closed.

      What I expect is

      1. the file closes.
      2. the split view setup remains unchanged. Simply an already open file is shown in the affected view.

      Rationale:
      closing views does not have an equivalent in vim. It happens to be tied to a file in vim. Which is likely the reasoning how we got to the behavior of today.
      Based on the idea that there is no explicit closing of a view in fakevim, the file-close option (or any other not specific view based option) should NOT have destructive side-effects like closing a view. (anything you can't press 'undo' to revert is destructive).
      Closing a file with fakevim should in all usecases actually close a file. Which is not the case today.

      Edit; additional reason is that the closing of a document in a specific view has a keyboard shortcut (on Linux: Ctrl-w) which is not accessible to users of fakevim. As such the ability to close files is something that would be nice to be replaced by fakevim in the multi views scenario since otherwise I'm forced to go for a mouse.

      As an aside, personal option. The :qa (close all files) should in qtcreator leave all open editors and splits as they are, but without any file content. Just stating this for consistency sake, not really relevant for this bugreport.

      Attachments

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

        Activity

          People

            davschul David Schulz
            tomz Tom Zander
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes