Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From Sublime Text to Webstorm

I'm starting to use JetBRAINS webstorm. I have a few keyboard shortcuts I frequently use in Sublime text. I would like to know what the equivalent is in webstorm.

  1. in Sublime I could select a line of code with Ctrl+L. If you press Ctrl+L again it would select an additional line. This was handy for quickly selecting entire methods etc.

  2. In sublime you can have multiple carets allowing you to create mass amounts of code. Does webstorm have anything like this (built in or plugin).

    EDIT: Now in webstorm 8 you can do this by Center Clicking your mouse and dragging down the code. Neat.

  3. in sublime you could re-indent selected parts of code: Edit > Line > Re-indent.

I think that's all for now.

Sorry for the n00b questions I just wanna get back to coding quickly and efficiently with my new toy.

like image 740
etoxin Avatar asked Jan 08 '14 23:01

etoxin


2 Answers

1) Ctrl + W (Edit | Select Word at Caret) few times in a row.

2) Available in PhpStorm v8/WebStorm v8/IntelliJ IDEA v13.1 (not sure about PyCharm and RubyMine versions -- must be build 136.1153 or newer)

More details in blog post here.

3) Code | Auto-Indent Lines I guess (sorry, I do not know what original one in ST does exactly -- never used ST myself).


Sorry for the n00b questions I just wanna get back to coding quickly and efficiently with my new toy.

a) Help | Default Keymap Reference for quick overview.

b) Help | Find Action... (Ctrl + Shift + A) is very handy tool for new (and not only) users / does miracles.

like image 185
LazyOne Avatar answered Nov 01 '22 23:11

LazyOne


On a Mac (I'm on OS X Mountain Lion, Webstorm 8), you could

1) hit Alt + Up Arrow. Doing so repeatedly selects the next bigger block of text, right up to a function and eventually the whole file.

2) do what the guy said above

3) select your text and select Code->Reformat Code (or hit Cmd + Alt + L)

HTH.

like image 22
JamieJag Avatar answered Nov 01 '22 22:11

JamieJag