Skip to content

4.2 Official Style Guide Error with Ctrl + K Shortcut #8560

@Dis-One-Games

Description

@Dis-One-Games

Godot version

4.2.stable

System information

Windows 11 - v4.2.stable Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1050 with Max-Q Design

Issue description

The Official Style guide found here

https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html

says its updated for 4.2 and if you still find outdated information, please [open an issue] linking here so sorry if this isnt the correct place.

Under the Comment spacing subheading there is a note saying:

Note:
In the script editor, to toggle the selected code commented, press Ctrl + K. This feature adds a single # sign at the start of the selected lines.

While this is correct in 4.1.x if 4.2 it seems the Ctrl + K shortcut was changed to add a # sign before the first character is a line instead of at the start of the selected line.

For example if i use the shortcut this is what would happen in 3.5-4.1 and in 4.2 to the following line

Before Ctrl + K

	I want to comment this line

3.5 - 4.1 Ctrl + K

#	I want to comment this line

4.2 Ctrl + K

	#I want to comment this line

I am unsure if this is an error with the Ctrl + K shortcut in 4.2 or a error is the style guide documentation not being updated after an intentional change.

Steps to reproduce

Create / Open a project in 4.1 and a project in 4.2 and compare how the Ctrl + K shortcut functions with tab'ed code.

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationtopic:gdscript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions