Intelijj IDEA: Autocompletion on spacebar does not work - actionscript-3

IntelliJ IDEA (ActionScript, SDK: air + asc 2.0).
Need auto-completion on the SPACE:
myVa -> [SPACE] -> myVariable
Now when I press on the spacebar just insert a whitespace. Input , . ; works as it should. The problem occurs in .as files. In java, xml files everything works fine.
Option is enabled (see screenshot).
Intellij IDEA autocompletion settings
enter code here
UPDATED. Workaround:
Settings > Keymap > Editor Actions > Choose Lookup Item > add keyboard shortcut "Space"

There is an open bug:
IDEA-80502 Code completion: selecting an element with the Space (ActionScript)

Related

Search through methods in a class PhpStorm

I used to work in Eclipse and had this very neat hotkey (Ctrl + O) which is used to search through the methods within a class.
I mean, if you are in the editor viewing a source of a class, and if you hit Ctrl + O, a pop-up comes up with all the methods listed. The list will get filtered if you start typing in. If I type in get, I can see a list of getters..
This is very helpful. I moved to PHP and PhpStorm and I miss this feature here, or I do not know if PhpStorm has this.
Do you guys have any idea of such a key combo in PhpStorm?
I have never used Eclipse .. so not 100% sure how that popup looks and works .. but here is the PhpStorm functionality:
Navigate | File Structure (Ctrl + F12 using Default keymap)
Alternatively just use Speed Search (just start typing) in actual Structure panel.

Sublime Text 2 + Emmet - not expanding correctly

I have installed emmet for Sublime Text 2...
And it works - kind a strange way
When I enter d it starts showing possibilities, but as soon as I press: : emmet shows completely different tip:
b (bottom)
So I need to press esc to close fuzzysearch box and press tab to allow Emmet do what it is used to do.
Dow, if I don't press esc before the tab key the resould is: d:bottom:, is I press esc, it desoults in correct: display:block.
Do you have an idea how can i fix that?
This happens because Emmet tries to respect default ST completions and due to lack of API support to properly handle built-in snippets: https://github.com/sergeche/emmet-sublime#tab-key-handler
By default, Emmet will not expand abbreviations by Tab if there’s autocomplete popup visible to allow users to work with default ST completions and snippets. You can override this behavior:
Go to Preferences > Settings — User
Add "disable_tab_abbreviations_on_auto_complete": false option. Make sure this file contains valid JSON.
After that everything should work fine, but you’ll no longer able to complete items from autocomplete popup with Tab key, use Enter key instead.
I had a similar issue but my fix was different to that of the accepted answer.
I had to go to Preferences > Settings — User and remove "emmet" from the ignored packages and everything started working again!

Disable Chrome developer tools ⌘-[0-9] keyboard shortcuts?

Is it possible to disable the ⌘-[0-9] keyboard shortcuts in Chrome's developer tools? It's frustrating to accidentally hit them when I intend to switch tabs (ex, when I hit ⌘-1 because I want to switch to the first tab, but instead being taken to the developer tools "Elements" panel).
Update: This feature has landed in Chrome 28.
Open the devtools.
Click on the Gears icon in the bottom-right corner
Select the General tab
Use the checkbox before "Enable Ctrl + 1-9 shortcut to switch panels" to toggle the preference. This option is found in the bottom-right corner of the Settings -> General tab.
Previous answer, which shows how to easily change the source code of your devtools.
There's no preference or flag to change the shortcuts, so you either have to edit the source code and build Chrome yourself, or change one byte in resources.pak.
First, locate resources.pak. This archive (format described here) contains several static files. resources.pak is located in the following directory:
OS X 10.7.3: /Applications/Google Chrome.app/Contents/Versions/26.0.1410.65/Google Chrome Framework.framework/Resources/resources.pak
Linux (ArchLinux): /usr/lib/chromium/resources.pak
Windows XP: %AppData%\..\Local Settings\Application Data\Google\Chrome\26.0.1410.65\resources.pak
Windows Vista/7/8: %LocalAppData%\Google\Chrome\26.0.1410.65\resources.pak
If you cannot find the file at the specified path, use your common sense. Adjust the version, Chrome/Chromium for example. Locate the Chrome executable, and find resources.pak close to it.
Create a back-up of resources.pak in case you mess up.
Open resources.pak (use vim or any other hex editor).
Find _keyDown:, and move a few lines forward (see below). Change ! to ~. What does this do? For all given inputs, ~value will return a negative number, which is truthy, so the _keyDown: function always ends early.
I've confirmed that the Ctrldigit shortcut is disabled in Chrome/Chromium on Linux/Mac/Windows by following these steps.
What could go wrong?
You trashed some bytes, e.g. by using Notepad to save resources.pak.
You did not edit one byte, but added/removed a byte. Remember, the resource's size is fixed!
In any of these cases, the developer tools will show up as "Not found". Chrome itself is still usable though: Sites can be browsed. If you forgot to make a backup at step 3, re-installing Chrome will fix any issues.
For future reference, part of the source code (source with comments at InspectorView.js):
(in the boldfaced line, replace ! with ~)
_keyDown: function(event)
{
if (!WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event))
return;
if (!event.shiftKey && !event.altKey && event.keyCode > 0x30 && event.keyCode < 0x3A) {
var panelName = this._panelOrder[event.keyCode - 0x31];
if (panelName) {
this.showPanel(panelName);
event.consume(true);
}
return;
}

Sublime Text 2 auto completion popup does not work properly

I got problem with jQuery Snippet that i installed throughout package control. After installation I do not have popup with jQuery code hints and intalisance. Look at this video:
http://code.tutsplus.com/courses/perfect-workflow-in-sublime-text-2/lessons/adding-snippets-through-package-control
On 0:50 after typing . he got popup with code hints - I don't have this one. I have to type . on and then press Tab to display popup with snippet...
And yes, I'm in JavaScript file and I got default settings.
And after . he also got all jQuery functions like add or addClass. I do not have this one even if I press Ctrl+Space.
If you hit CTRL-SPACE you'll get the dropdown of available completions for what you've just typed.
http://www.sublimetext.com/docs/2/tab_completion.html
If you want the autocomplete dropdown to appear as you type then add this line to your User Preferences.sublime-settings file:
{
"auto_complete_selector": "source, text"
}
That should do what you're looking for :-)
Consider changing User Settings to the following:
{
// By default, auto complete will commit the current completion on enter.
// This setting can be used to make it complete on tab instead.
// Completing on tab is generally a superior option, as it removes
// ambiguity between committing the completion and inserting a newline.
"auto_complete_commit_on_tab": true,
// Controls if auto complete is shown when snippet fields are active.
// Only relevant if auto_complete_commit_on_tab is true.
"auto_complete_with_fields": true,
// As Richard Jordan suggested, this item
// controls what scopes auto complete will be triggered in
"auto_complete_selector": "source, text"
}
Open your User Settings by pressing Cmd+, on Mac or Ctrl+, on Windows
And if you want to fully grasp Sublime Text 2, I do recommend this course: Perfect Workflow in Sublime Text. It used to be free by the time I first posted this answer. I still recommend it anyways.
Which OS are you using? I'm guessing Windows.
The problem here seems to be that the jQuery snippets in the available plugins have <tabTrigger> attributes that start either with a $ or a ., which causes trouble.
Try the following: Find the jQuery package that contains those snippets (Under Preferences -> Browse Packages) and open the .sublime-snippet file of a snippet that doesn't work properly. The one you named in your post would be defined in the file event-on.sublime-snippet.
Find the line
<tabTrigger>.on</tabTrigger>
and remove the . as follows
<tabTrigger>on</tabTrigger>
Save and return to your .js file. Now see if the snippet shows up when you type o. This works for me.
I guess this is a bug in Sublime Text 2 for Windows (maybe Linux, too?), since it obviously works fine on OS X as we see in the video course you've linked.
There was an issue created on GitHub on this specific package and I now commented this info. I guess the only way to get this working is to have snippets that do not start with special characters.
I also filed a bug for Sublime Text on Userecho.
The creator of the video is using SublimeCodeIntel. What you see at 00:50 isn't Sublime Text 2's autocompletion popup, it's SublimeCodeIntel's import autocompletion popup:
Imports autocomplete - Shows autocomplete with the available modules/symbols in real time.
See the Github page for more information.

Assign the Shortcut key for Chrome Extension Option page

How can I assign my Google chrome extension option page with shortcut key.
The following works almost as good as a shortcut,
Go to location bar, press Ctrl+L
Type "ce" OR "cs",
Press Enter.
After setting it up as follows,
What I do is, I set them up as search engines on
chrome://settings/searchEngines
Name - Shortcut - URL Chrome Extensions - ce - chrome://extensions/
Name - Shortcut - URL Chrome Settings - cs - chrome://settings/
http://productforums.google.com/forum/#!topic/chrome/hqYtz15LrgQ
Hope this helps!
Currently there is no better way other than injecting content script to all pages with keypress listener. As you would imagine this approach not only isn't very effective, but wouldn't work on some pages (chrome://newtab would be the most annoying one).
Unless assigning a shortcut to your options page is crucial, I wouldn't bother doing it.
I think the options page is meant to be open only from the extension control panel links. However, to solve the shortcut part of the problem you can use the new commands API which will free you from having javascript listeners injected on every page. The shortcuts will work even if you don't have a page loaded in your tab.
You could use this autohotkey script:
#IfWinActive, ahk_class Chrome_WidgetWin_1 ; Shortcut functions only on Chrome
^q::Send, ^t chrome://extensions/ {enter} ; functioning script
#IfWinActive
The second line is the script and means that if you press Ctrl+q (^ stays for Crtl) the script opens a new Tab (Ctrl+t), type the address (chrome://extensions/) and press enter.
You can change the shortcut key changing what is before the ::.
Then I suggest you to put the file .exe in the startup folder.