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.
Related
Recently there is this "Search images with Google Lens" in the contextual menu (triggered from the right click) in Chrome browser, which is super useful.
For those who doesn't know yet, if you click on that item you can define a screenshot area and then Google Lens page opens with the image you just framed. And then it lets you search for "things" inside this image.
What I try to do is to find a way to assign a hotkey to trigger that menu item without being forced to use the mouse (e.g. ctrl + alt + s). The reason I want to do that is because I overuse this functionality and I am in a keyboard-over-mouse increase productivity mind of set.
My first thinking was to make a page script that would trigger that contextual menu and click the item but as far as I know there is nothing in the JavaScript API with that much power
(There is this " JavaScript - simulate click on contextmenu " but they are not talking about the native Chrome contextual menu I believe.)
Another option would be to use some key automation program like AutoHotKey in windows but there is one problem, the contextual menu is not always located in the same position relative to the mouse (e.g. if the menu is triggered at the bottom of the page it will appear above the mouse pointer).
Other than that I don't really see another solution.
I am digging for some idea and maybe you could help me if you are interested in the same outcome.
EDIT: For whoever may be interested
I made this python script
https://github.com/vdegenne/lens-clicker
It works on my computer, I can now get the result I want. But I keep this question opened for more ideas, seeking a better solution.
(You can also contribute to the project on the GitHub page).
I use Vimium, an extension to allow vim-like keybindings for browser navigation.
You can add search engines, for example Google Lens as so:
i https://lens.google.com/uploadbyurl?url=%S Google Lens
So once I have the URL of the image in the clipboard, I type o, i, Space, Ctrl + v, Enter
I'm working on finding a way of getting the URL of the image, but am not sure Vimium supports this. If not, using the URL template (above) to search Google Lens is still a much more robust way than by automating clicks on a menu, so hopefully that's helpful.
I started studying HTML on YouTube not long ago and have been using visual studio code. Whenever specific shortcuts are used, mine does not work. An example would be typing the exclamation mark and then the tab button("!" + tab) to automatically give you the default HTML skeletal template.
Also, tag suggestions do not work. Whenever I start to type a tag like , I don't get any suggestions whatsoever and it leads to a lot of mistakes and confusion for me. Can someone help me, please?
CTRL + Shift + P
Change language mode
Click on "Configure file association for .html"
If you scroll down through the list, you will see a label "Current association" next to the file type that your file is currently associated to.
Change it to .HTML if that's what you want .html files to be associated to.
Close the file and open it again.
Try ! - a tooltip should now pop up and then you hit tab.
You can go to VS code and tap on setting will show a pop-up, choose Keyboard Shortcut will showcase you all the keyboard shortcut.
You only need to change languague on status bar (below) from Django html to html.
Now retype the shortcut i.e. "!+Enter"
Change Setting Emmet
Go to Setting , CTRL + , for shortcut
Type Emmet Tab on search bar
Enable trigger expansion on tab
Try type ! + Tab
Suggest
Type ! on HTML File
Press CTRL + SPACE, to activate trigger suggest
And Enter
HTML:5
Type html:5
Enter or Tab
Right now I'm just using PhpStorm to work with some HTML, and it's great in that it auto indents and automatically closes out HTML tags.
The only problem is this feature doesn't really save me any time because I then have to use my mouse or arrow keys to navigate past the closing tag when I reach it. For example I type <p> and it closes it out <p></p> with my cursor in between, but when I'm done I either have to manually navigate past the closing bracket or use Shift+Enter to jump down to the next line (which isn't always what I want to do).
Is there a command that will just jump me to the end of the next closing bracket, or is there a way of setting this up? I've googled it but haven't been able to find anything.
I've googled it but haven't been able to find anything.
Well... Help | Default Keymap Reference has the most needed shortcuts and actions listed and the one you need is there.
In any case:
Ctrl + ] -- Navigate to code block end -- will jump to the closest closing tag (in HTML) or brace/closing keyword (CSS, PHP).
Ctrl + [ will do the opposite -- jump to the opening tag.
There are few other actions that can help here but may not have any shortcuts assigned by default -- check them in Settings (Preferences on Mac) | Appearance & Behaviour | Keymap (it has search by action name and even by already assigned shortcuts).
Another alternative (or better say -- advanced navigation) would be using AceJump pluign (you have to see it in action -- you either like or hate it).. or even Vim mode navigation (via IdeaVim plugin).
The simplest way to go about this is to press Command + -> (command+right arrow key) when your cursor is inside the brackets, and this will bring you behind the last bracket.
At least, I believe this is what you're asking.
hi, use mac os for: cmd + option + ]
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.
I'm using IntelliJ to do Java Development for an application where we use JSF in a few places. In the .jsp file I have defined my backing class and the code runs properly.
My question is: How do I set up my environment so that when I center click on the method names, which use EL format, IntelliJ navigates to the proper method in the proper class.
Having taken a quick look at my IntelliJ install, if you go to File->Settings, there should be a keymap section under the IDE Settings header. Make a new keymap profile other than default. You can probably just copy the default and give it a new name. In the actions window, open Main Menu->Go To and there should be an action called "Implementation(s)". The description of this action seems to match what you are looking for. Click Add Mouse Shortcut, and center click in the click pad area to set it. I didn't want to actually change my settings, so I didn't finish the steps myself, but this should do what you are wanting to do. It may warn you that you are overwriting a shortcut to another action, so be aware of that.
Hope this helps.
This is using IntelliJ Version 9 beta.
in JSP I am using something like this
<%--#elvariable id="owner" type="com.mysite.data.Owner"--%>
This is a comment specific for intellij I guess. In this way when the owner variable is used anywhere like:
${owner.name}
is known to intellij that is of a Owner type. Intellij then automatically go to the class definition by pressing CTRL+B or middle mouse button.
This is working with intellij idea 9 beta and I remember that this feature was broken in 8.1.1. Prob it is working again in 8.1.x
Probably the same approch will also work for JSF.