Chrome Dev Editor (CDE) Default Shortcut Key Bindings? - polymer

I am having lots of fun playing with the new CDE, BUT, I have not been able to find much documentation on it.
Does anyone know the default shortcut key bindings? And secret commands?
I understand it is based off of the Ace Editor, but it seems to not follow the default key bindings:
https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts
The one I need NOW is Find and Replace, it is not CtrlR, which appears to be RUN.
I know creating and maintaining documentation is dull, but at some point a simple link to basic features would be nice. Good thing to do while is super cold out right now (Canada).

CDE uses the ACE editor. Here are the default key bindings for it:
https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts

It's complicated...
A cross-OS way to get to Replace in CDE is to press Ctrl-F (Command-F on a Mac) twice. Every subsequent press will alternate between Find and Replace. That's the default Ace behavior, as can be seen it its own proof-of-concept "Ace kitchen sink" page.
I'm not even sure whether Ctrl-R is up-to-date: I've checked a couple of other IDEs that use Ace, and it doesn't work there (Ace's own Cloud9, Zed, ...).
Ctrl-H works on everything except Mac. Unfortunately, on a Mac, its equivalent Command-H is reserved by the system and hides the current window.
I've filed a bug against Chrome Dev Editor to do something about it: https://github.com/dart-lang/chromedeveditor/issues/3803.
Currently, there is no way to see the shortcut bindings in CDE: it's bad, and we (the CDE team) are going to fix that sometime soon.

Related

Is it possible to change the default comment string in Octave GUI?

In Octave GUI Editor the Ctrl+R shortcut comments the selected lines out with the Octave default string ##. But I share my code with other colleagues who use MATLAB. I was wondering if I could change the above keyboard shortcut and the Ctrl+Shift+R to use the MATLAB commenting character % by default? I'm aware of the Ctrl+Alt+R shortcut where one can choose the string, but that is not very handy given the muscle memory and the extra step.
P.S. I posted this question also here on the unofficial Octave Discord channel.
OK, I think I found the solution, and it was way easier than what I had anticipated. Basically, the Octave GUI team had already thought of that. Just go to Edit > Preference, and then in the Comments (Octave) section, select the % option:

How can I stop PhpStorm optimizing imports when reformatting code?

OK, I've scoured the internet trying to figure out which bit I have to change in PhpStorm to make it stop doing this.
Right now when I run "reformat code" on some PHP, it also decides to optimize imports for me. While normally I'd say "gee, that's great" - in some cases PhpStorm doesn't recognize that some of the imports it thinks are unused are, in fact, actually used.
Comments as code, and all that.
Please tell me someone out there knows how to make PhpStorm stop doing this. It's driving me mad that I have to undo changes to my imports whenever I auto-format my code.
As it turns out, #LazyOne hit the nail on the head in the comments up above. Once I opened the reformat file dialog, all of my problems suddenly went away.
Very obscurely hidden setting, since it's not something easy to find in general preferences :-)
Mac users can use keyboard shortcut: ⌥⇧⌘L
This available to all Jetbrains products.

Determine if a key sequence has already been assigned in Sublime Text

Does Sublime Text (2|3) have an API method or some way of determining if a shortcut or hot key sequence has already been assigned? I have lots of plugins and macros installed, and when making new ones it can be difficult to determine what key sequence to assign it to so I don't conflict with something else. Key bindings can be assigned in .sublime-keymap files in Packages/Default, Packages/User, and whichever plugin wants to assign them. To make things more complicated, I work on three different OSes, and there are different keymaps for each platform. Do I have to keep manually searching all the keymap files myself, or is there a better way to do it?
You might try installing and using FindKeyConflicts.
You can also open a console ctrl + ` and enter sublime.log_commands(True). You can then enter your shortcut/key sequence and see what, if anything, is bound to it.

Refactor keyboard shortcuts in MonoDevelop

Are there keyboard bindings to the refactoring commands in MonoDevelop?
A direct answer: Yes, there are.
A bit more useful answer: depending on what you're looking for, quick examples:
Alt+Return is quick fix (given you've got source analysis turned on)
Alt+Insert is code generation (properties, overrides, etc.)
F2 is rename
And, in case you're not aware, all the refactorings for the symbol you got under your cursor are available in the right-click context menu (available by pressing the relevant keyboard key, so it also kind of counts as a keyboard binding ;) )
Apart from that, you can look up and/or change all (or at least many, I'm not exactly sure) the bindings in Options > Preferences > Key Bindings.
Does the above answer your question?
It depends which version of MonoDevelop you are using. With the late 2.x series then there were individual key bindings for "Create Method", "Extract Local Variable" and a few others (see the documentation).
Renaming (including renaming files in the explorer view and renaming variables, classes or anything else in the text editor) is a separate key binding under the "Edit" section and defaults to shortcut key F2.
As of v3.x, these key-bindings seem to have disappeared. Edit > Preferences > Key Bindings still has a "Refactoring" section, but it now only lists Import Symbol, Quick Fix and Show Fixes (none of which I'd necessarily even call refactoring - they're more code completion features). Instead, the refactoring methods are all available as "Quick Fixes" (default: Alt+Enter when Source Analysis is turned on from Edit > Preferences > Other > Source Analysis).
The reason for the change appears to be that the refactoring mechanism has been overhauled and now relies on source analysis, but this isn't quite perfect yet and so isn't enabled by default. As they're part of the Quick Fix system then they've not been given separate key bindings (as I believe there are more of them now).
For me, Source Analysis menu is:
Tools>Option>Source Anyalysis (Under Text Editor) > Enable
Well it does make some changes to the Editor screen, it doesn't really give me useful suggestion for correction (auto fix) like Eclipse, regardless of whether I've press Alt+Enter.

What have you done to customize your IDE? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What tweaks / addins / themes do you have rigged up to make your IDE awesome? For example, in Visual Studio I color themes, CodeRush draws lines between braces, I always install and use the Consolas font and I have it setup to sync my settings across computers for when I change hotkeys and whatnot with the help of FolderShare.
Also, this isn't Visual Studio specific, please feel free to mention what you do with Emacs or Eclipse or whatnot as many of us use a few.
ReSharper 4.1 for Visual Studio 2008. It's a beautiful thing. It looks for all kinds of code errors, optimizations, etc. My code is cleaner thanks to this handy Visual Studio plugin.
Optimizing the IDE will be the first step. Resharper helps a lot but sometimes some simple macros are more than enough.
First things first. Change the font from the default crappy one. Then start fiddling with the 'Options' dialog box.
At the recommendation of a friend, I installed Visual Assist for Visual Studio 2008 -- it is awesome. I swear it can read my mind.
[Note: I have no affiliation with them -- just a very happy customer]
I've done a lot, but I really shouldn't have. So in the last few years, I've toned down the number of macros, custom key mappings, custom toolbars, etc. For the most part, I'm of the opinion that developers should get used to the default behavior and appearance of their IDE. Then when you need to work on your colleague's machine, you still know how to get around and manage to help them out. Not to mention that a whole slew of customizations will get broken or rearranged or otherwise reset when an update comes out.
That said, there are a few things that I still do every time I set up an IDE to work on... for example, setting the number of concurrent builds in Visual Studio to be 1, because that feature is so broken that nothing will compile correctly with any greater setting. Apart from that, being an ace with the default behavior will ultimately make you more efficient than spending hours tweaking the software to make it just a little more fluid.
I like CodeSmart VB6 and CodeSmart VS.NET from Axtools http://www.axtools.com/
for advanced syntax highlighting, drawing lines between parts of If..then..else..endif, Do While ... loop and all other constructs. It also has great code auditors and many add-in functions.
Vi plugin!!
I use Emacs. My .emacs file is only a few hundred lines long, but does customize settings based on my machine's hostname and operating system, so that I can use the same config file pretty much anywhere.
Colorization - Custom - White Text on GreyishBlack, Consolas Font
HotKeys - CTRL+SHIFT+ALT+Z (Attach to Process) probably some others too...
Addins - DPack, Coderush, GhostDoc.
Toolbars Off
All Windows set to collapsed
I am not doing presentations with this machine - If I was it would be barebones.
eclipse plugins make my ide exactly the way I want it of course.
eclipse plugin central
I kinda like the default setup of VS, I only make sure about Consolas as the editor font, and tabsize 2 (tabs to spaces), and change the color of numbers (red).
For Java development using Eclipse I have a few plugins that are indispensable. The MyEclipse Workbench adds a lot of functionality to most of the built-in modules. It makes it very easy to deploy an application to multiple application servers, and enhances a lot of the built-in editors. The PMD plugin is great for searching for potential code issues. As mentioned in a previous post today, the Ganymede plugin really helps to highlight log entries.
I dont care much for fancy visual addons, so I left my IDE (Visiual Studio) in the standard look (other than MS Reference Sans Serif font).
I usually change the color scheme to have a black background instead of white.
I use the Zenburn color scheme with Proggy Clean for a font. It's like a comfy chair for my eyes.
Nothing. I hate dealing with all the breakages that inevitably result from updates, etc. So, I adapt myself to my IDE instead.
I've using a combination of ViEmu and ReSharper with a dark theme.
Oh, and I also hide most of the toolbars and turn off the animations to try to speed things up.
Silver background, 8pt Consolas, disable all toolbars and set tab spacing to 3 spaces. :)
For Visual Studio
Most important - Resharper - I bought my own copy so I don't have to badger my employer about it.
Change the colourisation/font - choose whatever suits you
Optimisation (vote up Gulzar's post with the link in it)
Don't try and make the IDE do everything, just because you can. (Kind of ironic seeing I use emacs as well). I personally really dislike integrated source code management.
Change some defaut file associations so double clicking certain file types doesn't kick off Visual Studio
Aside from Resharper I've actually found most other beneficial thing is not customising the IDE, but customising yourself to learn the keyboard shortcuts. Start with the big gains like Ctrl -, Ctrl Shift -, Ctrl Shift V, Ctrl Alt L etc. etc. and then gradually learn the rest of the shortcuts in order of how often you'd use them
Rather than customizing the IDE, I customized my error messages. I have a macro that expands to a #pragma warning statement that generates a compile-time message in the same format as MSVC++. Visual Studio can parse the resulting warning, so a double-click on the message opens the offending file in the IDE and takes me right to the line in question.
I've used the macro:
To "bookmark" a section of code, so developers will be nagged to fix it each time they build.
Within #if blocks to test for various compile-time conditions.
In headers, to see who #includes them, and where.
From vim you can set the makeprg (make program) variable to a command that will build your project, and the errorformat variable to a scanf-style string that describes the format of the build errors. From there:
:make will build your project
:cl lists all of the errors that match errorformat
:cc takes to you the current error
:cn takes you to the next error
:cp takes you to the previous error.
Out of the box, vim sets makeprg and errorformat to work with make and gcc, and all of the commands are documented within vim's built-in help.
I do Java development in Eclipse. Here are some of the plug ins I find useful:
Mylyn - hides project elements not relevant to the current context.
eUML2 - UML editor.
FindBugs - Static analysis tool to find common bugs in Java.
Crap4J - Another static analysis tool.
EclEmma - Code coverage plug-in for unit tests.
Edit: I forgot one:
Disable the spellchecker. :)
In visual studio 2005 I do these:
Bind F11 to fullscreen mode
Enable a vertical line at 80 characters: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor\Guides = "RGB(196,196,196) 80" (Guides won't be present in the registry.)
Add the "Start Debugging", "Break All" and "Stop Debugging" buttons after the "Help" menu.
I am using Vim Cscope plugin.
Cscope is like 'ctags' on steroids and makes traversing code much easier.
I usually use it along with tags to find where a function is declared and then go directly to whatever code is calling this function.
I also use Vim's Rgrep plugin (recursive search) to search for files in the code hierarchy.
Create some basic macro such as printing bug fix code comments:
Public Sub WriteBugFix()
Dim TS As TextSelection = DTE.ActiveDocument.Selection
TS.Text = "'Edited for Bug Fixed By JK - " & Date.Now.ToShortDateString
End Sub
(This answer assumes the workstation is a GNU/Linux computer.)
Emacs makes an excellent IDE specifically because it can be greatly customized.
You customize Emacs by editing the .emacs file in your home directory. My .emacs is a symbolic link:
$ ln -s /home/bzimmerly/bin/emacs/emacs24/wbz.emacs.el .emacs
Since Emacs offers a variety of specialized major modes for program development and debugging, you can easily "roll your own" IDE design that works best for you. For example, when I'm programming in C or assembler, I like to have the left side running GDB mode, with the right side displaying the source being traced.
A little bit of LISP skill goes a long way to turning Emacs into a very powerful IDE. It is well worth the investment of time to learn how to use this powerful tool!
Finally, tools like Youtube are valuable places for learning how to do this. Just entering "Emacs as an IDE" on the Youtube search form will show videos of how people have modified Emacs for just such a purpose. There are videos on editing Python code, Javascript, Java, C, etc.