How to stop Clion tab key behaviour
Asked Answered
L

2

7

When on a C++ line of code like the following

aType.aMethod(
     std::make_shared< T_1>();
^^^^^-- Press tab here 
)

Clion tries to move to the next parameter(i guess), but being the only parameter it goes nowhere. I want to have the tab to just insert characters(tab or space that is) and not to try to cycle the cursor among the method parameter. Is there a way to stop this alternative functionality?

I searched to no avail in

Settings|Editor|CodeStyle|C/C++

Thank you

Lave answered 4/7, 2017 at 15:15 Comment(5)
Same issue here. Cannot find the way to turn this off.Medeah
Try changing the "Next parameter" and "Previous parameter" keybindings to something else than Tab.Factfinding
@EldarAbusalimov it worked. If you write it as an answer i can just give you the the correct answer mark, otherwise i'll answer to myself.Lave
@Lave it's OK, please feel free to answer yourself and accept the answer! =)Factfinding
Donating rep to new users... that's true SO love <3Brackett
L
6

"Try changing the "Next parameter" and "Previous parameter" keybindings to something else than Tab."

– Eldar Abusalimov Jul 5 '17 at 9:02

Lave answered 6/7, 2017 at 13:21 Comment(0)
T
2

In addition to the accepted answer, i found that tab was assigned to Next Live Template Parameter Under : Main Menu | Navigate | Navigate in File (This is in the keymap section in settings, not the actual main menu). So when i generated definitions for the methods in my class and it jumped into the cpp if there were any auto generated functions with return initializer; as the method body it would jump to these instead of letting me indent code so i turned that off too and now i can happily implement the methods in order and fix those up when i get to them. Alternatively if you like that setting and want to keep it turned on, Hopefully knowing that you have to tidy up all instances of return initializer; before the tab key will indent code again is useful to you, i found it very confusing.

EDIT: i realise this wasn't part of the original question, but this is where googles top result brought me, so i hope you don't mind me adding this info here as its still related to the tab key doing weird things in CLion.

Tracitracie answered 6/5, 2021 at 20:36 Comment(1)
Thank you so much, this was driving me nuts and I find it insane that this is the default behaviour....Damaging

© 2022 - 2024 — McMap. All rights reserved.