Caret going back to the beginning of the line
Hello everybody,
I'm a new user of WebStorm and I really love it, but there is only one little detail that is driving me crazy.
If have a block of code indented with tabs like this:
line1
line2
If the caret is placed at the end of line1:
line1|
line2
And I tap the down arrow key on the keyboard, the caret goes to the beginning of next line:
line1
|
line2
I want it to go to the end of the line instead (the line actually contains a tab):
I couldn't find a way to solve it in the preferences, any ideas ?
line1
|
line2
I couldn't find a way to solve it in the preferences, any ideas ?
Thanks.
请先登录再写评论。
Hi Yann,
If your 2nd line (the empty one) is really empty (no spaces/tabs) then that is exactly where cursor will go (beginning/real end of the line).
You have "kind of" 2 options here:
Other than that -- there is no such option that would do exactly as you described. In any case -- check other options available on "Settings | Editor" screen.
Hi Andriy,
thanks for your answer.
I don't really wanna do 1) since I just want to move around the code, and I tried two and it has over side effects that I don't like (you can place the cursor on places where there are no spaces or tabs).
Actually, my second line actually contains a tab.
I activated the "show spaces" settings and my code looked like this:
------>line1
------>
------>line2
Which is what I want, and in this situation, the caret behaves as expected.
Doing this however, I noticed that the tab on the second line got automatically removed when I saved the file !
I am going to look more into this, maybe I can deactivate this auto cleaning feature.
Settings | Editor | Strip trailing spaces on Save
Perfect, thank you very much !