Updated the documentation for Code Editor hotkeys


#1

http://developer.playcanvas.com/en/user-manual/scripting/code-editor/

I’ve added some more of the most common hotkeys for the Code Editor to the documentation that I have found useful including, replace, replace all and auto indent as well as some other less known but very useful features :slight_smile:

Enjoy!


#2

Love you @steven Lol It’s very useful :smiley:


#3

Some popular editors, such a Sublime Text for example, has Ctrl + D to dublicate current line.
I think it would be useful here. Now this hotkey removes current line and is not documented, how I can see.


#4

Our Code Editor is based on Code Mirror and shares the same hotkeys. We only document the most useful and frequently used hotkeys but you can look at Code Mirror’s list (link in our documentation) if you would like to see what else you can do.

It’s also worth bearing in mind that other editors have different functions binded to Ctrl + D (sometimes to delete line in Eclipse for example).

That said, duplicating a line shortcut is a valid feature request and I can see places where that would be useful.

At the moment, you can Ctrl + C to copy the line (if you have nothing selected) and then Ctrl + V to duplicate the line.


#5

Yea, but IDE’s from JetBrains are most widely used and I used to these hotkeys.
That’s my problem, I see.


#6

Ctrl + D is Sublime and Atom actually does “select next occurrence of current selection”.
I agree it should not be delete line, as simple Ctrl + X without selection is easiest way to delete the line.

We do use codemirror for our IDE, and some things are available out of the box, and some needs to be written as custom plugins. Project is Open Source, and any contribution as plugins that would make IDE better - would be really valuable to us.

We do empathise the urge to make our IDE more comfy and integrated to PlayCanvas specifics. This work happens gradually. Some major big things we’ve though of: Find in Files and Files Tree with Tabs.


#7

When you filter the assets wouldn’t be useful to have an orphans option that show you the files not used. In large projects or after multiple uploads can happen to have files ‘forgotten’. :smiley:
Ops maybe i would have put this in suggestions :stuck_out_tongue: sorry


#8

There is already a feature to find out if you asset is “possibly” unused: http://developer.playcanvas.com/en/user-manual/designer/assets/#checking-references


#9

Yes but you have to check it one at time…is doable but is a long way. Anyway i will do that.


#10

The thing is, that by providing a tool that will show all assets that are “possibly unused” will lead to people simply deleting them all, and then realising they’ve deleted too much. The feature as is now is helping, but by no means making decision for the user.

It is up to a developer to keep his project clean and tight, and this feature helps to do it.


#11

I know…but at midnight i’m lazy :stuck_out_tongue: