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

Add a quick method to open .cpp file with matching .h file in split view (shortcut?)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • None
    • Editors
    • None

    Description

       

      A quicker more streamlined method to open a split view for a matching source of header file would be a welcome quality of life improvement. Currently the process involves multiple steps, opening the split view then changing one of them to the matching source or header file. These separate actions could be combined in a quick to access option.

      Possible implementations include:

      • Keyboard shortcut to open a matching header file or cpp file in a split view.  (Edit: apparently this one exists... my bad)
      • Holding Ctrl or Alt (or some other modifier) when pressing the split view option would open a split view as normal, but rather than opening the same file it will open the corresponding .h or .cpp file
      • An extra option in the split button drop-down with the same functionality as the previous option
      • When holding some modifier (Ctrl or Alt?) and double clicking to open a file in the project view, it will also open the matching .h or .cpp file in a split view.

      This feature mostly could be implemented using existing functionality - Using the keyboard shortcuts for splitting a view followed by the Toggle header file and source file shortcut has effectively the same functionality as the desired feature, just split over multiple steps.

      While possible to mimic the desired behaviour through existing shortcuts, this feature would improve workflows that use side-by-side .cpp and .h editing and improve ease of access to said functionality.

       

      Edit: 
      So there is already a shortcut (that I somehow missed) for opening a matching file in split view: Ctrl+E,F4 so as a result most of this suggestion is redundant. 
      Possibly there may still be some value in the suggested alternate methods such as the double clicking with key held opening two splits, but since there is already a way of doing this in a different way it might not be worth prioritising. 

       

       

      Attachments

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

        Activity

          People

            davschul David Schulz
            kinloch Jonathan Kinloch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes