Is it possible to turn off autocompletion to prevent repetitive poor suggestions?

Here is some sample c++ code:

        VkRenderPassBeginInfo renderPassBeginInfo = {};
        renderPassBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
        renderPassBeginInfo.renderPass = render_pass;
        renderPassBeginInfo.framebuffer = framebuffers[i];
        renderPassBeginInfo.clearValueCount = 1;
        renderPassBeginInfo.pClearValues = &clearColor;
        vkCmdBeginRenderPass(command_buffers[i], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
        vkCmdEndRenderPass(command_buffers[i]);

        renderPassBeginInfo.renderArea.offset = {0, 0};
        renderPassBeginInfo.renderArea.extent = swapchain_extent;

I wanted to convert it to a more compact form:

        VkRenderPassBeginInfo renderPassBeginInfo = {
            .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
            .renderPass = render_pass;
            .framebuffer = framebuffers[i];
            .clearValueCount = 1;
            .pClearValues = &clearColor;
        };
        renderPassBeginInfo.renderArea.offset = {0, 0};
        renderPassBeginInfo.renderArea.extent = swapchain_extent;

        vkCmdBeginRenderPass(command_buffers[i], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
        vkCmdEndRenderPass(command_buffers[i]);

Unfortunately the AI keeps trying to do the same for the last two lines:
renderPassBeginInfo.renderArea.offset = {0, 0};
renderPassBeginInfo.renderArea.extent = swapchain_extent;
which is illegal. But every time I try to tab to indent, it rearranges the code wrong. What’s a reasonable way to stop this? Can I just turn off autocomplation wtih a keystroke, get the job done, then turn it back on?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.