XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.14.0
    • Editors
    • None
    • macOS

    Description

      In visual studio code when you type "if" it shows you a possible completion of a code snippet with the condition and the scope. It allows to avoid typing keys like (){} and enter.

      Same thing with "for",  it uses the following code snippet 
       

      for (size_t i = 0; i < count; i++) { /* code */ }

       
      very convenient. It allows you to type faster and lesser.

      By default in Qt creator, if you type if nothing happens, you need to type the whole statement by yourself. I have changed the character threshold in completion preferences to 2 and to 1.

      At 2 no completion is shown for "if", with a value of 1, a "if" snippet is shown when you type only i and nothing is shown if you have already type "if"

      if (){}

      But this snippet is useless since the cursor is set on the condition statement but if you hit tab, it will add a tabulation instead of going into the scope.

       

      Same thing for for, it will show you

      for(;;) {}

       

      the cursor is just behind (, if you hit tab it will add a tabulation instead of going to the second expression.

      Moreover  the completion list when you type "for"  have several useful suggestions  but the first one is always the useless mentioned above forcing you to use the arrows to select the one you really want.

      It will be great to have somthing similar to visual studio code and maybe a mecanism in the preferences to deal with some degrees of priorities to force Qt Creator to display the one you really want or in a given order.

      Maybe a list of expressions to exclude may also be interesting

       

       

      Attachments

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

        Activity

          People

            davschul David Schulz
            trackvegeta track vegeta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes