Scroll from source keymap / go to file / locate file in project view - android-studio

I've searched throu lots of articles but not found an answer, some has come up with workarounds but not really answered the question.
I want to locate a file in the project view over the files in Android Studio.
There is in the project view a button named scroll from source, this one does what I want. But I want it as a keyboard shortcut, like the command in Visual Studio many has as shift alt l. The resharper command is locate in solution explorer
There is also an option in the project view to mark always scroll from source.
These options are useful but do not solve my question.
One might think this would do it, but I don't want the project view over the files to scroll up and down all the time. I want a keyboard short cut because that is what feels fastest to me to work with and makes it more comfortable.

It's possible to achieve this by typing Alt + F1 followed by Enter. If you want to change that to one button press then your best bet is to record those commands as a macro.
To do this go to Edit > Macros > Start Macro Recording. Then press Alt + F1 followed by Enter. Then go to Edit > Macros > Stop Macro Recording and give your macro a name when prompted. Now that your macro is saved you can assign a key binding to it. Go into Settings > IDE Settings > Keymap > Macros and there you will find your macro which you can then bind.
It didn't seem to work for me unless it was a single keypress so I bound the macro to F10.

Related

How to undo/redo user operations?

The situation is:
Open a file
Drag minimap to the middle of this long file
Click somewhere on the line I want to edit
Intend to press Home to go to the head of the line.
Accidentally press Ctrl + Home
Am taken to the head of the file.
QUESTION
Is there a shortcut to return to the line I want to edit?
From the creator of Sublime Text at https://forum.sublimetext.com/t/soft-undo/307
Undo/redo in Sublime Text normally only steps through actions that modify the buffer, skipping over those that simply modify the selection. Changes to the selection are still part of the undo history, and can be stepped through using Ctrl+U/Ctrl+Shift+U (softUndo/softRedo commands). These key bindings aren't displayed in the menu, and I'm wondering if anyone has discovered them on their own.
I rarely use them myself, but did today, so it got me wondering if anyone else does
Change Ctrl in the above to Cmd if using a Mac.

Can't go to next/previous edit point in Brackets with Emmet

Support for Emmet's next and previous edit point seems to be missing or what? Every time I press CTRL+ALT+--> my screen rotates. This is happening on windows only.
EDIT: You can disable the default keyboard shortcuts in control panel but in that case any application won't be able to use those too, nor is there a way remap the keys in Brackets easily!
All available keybindings are defined in keymap.json.
source: https://github.com/emmetio/brackets-emmet
To open this keymap file, first open Brackets, then go to Help > Show Extensions Folder. Open the user folder, then modify keymap.json to however you prefer your shortcuts. Reload Brackets Editor when finished.
My keymap was located inC:\Users\%username%\AppData\Roaming\Brackets\extensions\user\brackets-emmet
You will need to change these two lines:
"next_edit_point": "Ctrl-Alt-Right",
"prev_edit_point": "Ctrl-Alt-Left",

VS2012: Ctrl+F now synchronizes with Ctrl+Shft+F

In Visual Studio 2012, I want different context for Ctrl+F and Ctrl+Shift+F. However, when I enter data in the Ctrl+F dialog (in the upper right corner of the text editor), it synchronizes that information to the dialog shown by Ctrl+Shift+F. I don't want that. I want Ctrl+Shift+F to do a search in the Entire Solution for now and forever. How can I disconnect these dialogs? I'm using Resharper 7.1 and VSCommands11, if that changes things.
(And why does Ctrl+F take three seconds to show the dialog in the upper right corner? It bugs me when I press Ctrl+F and start typing only to find that it changes my source file.)
Open the options-window. (Tools->Options). In the tree on the left side select Environmend->Keyboard. There are two entries relevant for you:
Edit.Find is for the Search-Box at the right upper corner (Ctrl+F)
Edit.FindinFiles is for the SearchDialog (Ctrl+Shift+F)
Maybe any of your VisualStudio-Extension has set these Commands to other commands.
In my studio both searches are separated from each other. If I set Entire Solution in the Ctrl+Shif+F-Dialog, that does not affect the Ctrl+F-Dialog
Please try this: Tools/Options/Environment/Keyboard > click reset button

"Find and Replace" text box holds the cursor

context, Find and Replace "window" in VS2012 (rc)
Anyone know how to either alter the behavior or get back the old find and replace?
When you execute a search in the new "Find and Replace" you can press F3 to cycle through the results (same as old behavior). However, you have to click ESC to put the active cursor location in your code. With the old setup (if you have the search window auto-close) the cursor is already in the code. Pressing down without pressing ESC requests the history of searches dropdown list to open.
Basically, I just want the old search window, it worked perfectly.
Nope, this is the new search box, and the old one basically isn't available anymore. What you can do it file a bug report on the Connect site, but honestly it will probably be ignored because MS has decided that usability is not important for this new version of Visual Studio (in my own humble opinion)
Good luck!
As an alternate, I guess that you could make an extension that repeats the previous behaviour (like I am doing for all of my Macros) but that is kind of in the territory of overkill.
If you hit Ctl-Shift-F or Ctl-Shift-H, you'll open the Find/Replace in files dialog, which is very similar to Visual Studio 2010. Even though it says "find in files", you have the option of searching in selected text and the current document.
Taking the information above, I went into Tools / Options / Environment / Keyboard and switched the Ctrl+F and Ctrl+Shift+F hotkeys around.
I then dragged the "Find and Replace" window to the right and docked it as a tab (along with Solution Explorer, Properties, etc), as I haven't found a way to have it close automatically after starting a search.
I can now place the cursor anywhere in my document, press Ctrl+F, enter my criteria and press F3 to start the search.
Repeated F3's, even after moving the cursor, behaves just like the good-old-times! (but as bobobobo mentions, be prepared to curse if you accidentally start your search with ENTER instead of F3 :()

Shortcut for deleting a line in dreamweaver?

What is the shortcut for deleting the current line where the cursor positioned.
ex: eclipse have crtl+d
To delete line(s)
Mac: Command+Shift+D
Windows: Ctrl+Shift+D
https://helpx.adobe.com/dreamweaver/using/keyboard-shortcuts.html
There are no direct shortcuts as far as I know but here is a list of commands for dreamweaver.
http://cpaoffers.com/design/dw-shortcuts.php
My typical method to do this is to hit the home > shift+end > del.
Or you could try shift+up or shift+down to select the line above or below and then hit delete.
Danilo Celic's answer helped me with CS6, just use the second one. Although it's in Japanese, just install and use it.
If you want to know more: Then, find the installed files in your own
C:\Users\[your user name]\AppData\Roaming\Adobe\Dreamweaver CS6\[your CS6 language]\Configuration\Commands
There you can open the just-installed files and check them. The comments are in Japanese. The code are in Javascript and are easy to read.
There are 5 commands in that file. To use only the "Delete line" function: In CS6, open history panel, go to design mode, do any action like press a key, right click on that action from history panel and record that action. Then you can find the record action in the Commands folder mentioned above, and then you can copy the javascript from the downloaded one into your own recorded action file.
I've seen two extensions that add the delete line functionality:
http://xtnd.us/dreamweaver/codeextras
http://yoropan.com/en/archives/544
I haven't used either one. I've been told that the first one may not work in Dreamweaver CS6, no idea about the other one. once installed, you should be able to add a keyboard shortcut (Edit -> Preferences, Dreamweaver -> Preferences on Mac) for functionality that you're looking for.
You can add a custom keyboard shortcut for deleting lines in Dreamweaver.
Dreamweaver uses Brackets for its text editor, and this is what handles the Delete Line command, not the traditional Menu system for rebinding most other Dreamweaver commands.
Create a Brackets keyboard shortcut configuration file.
Windows: %APPDATA%\Adobe\Dreamweaver CC 2019\en_US\Configuration\Brackets\keymap.json
Mac OS: ~/Library/Application Support/Adobe Dreamweaver CC 2019/en_US/Configuration/Brackets/keymap.json (untested)
Create an override in this file, according to the Brackets User Key Bindings JSON Data Format. Make sure you use the - separator between key names, not +.
{
"overrides": {
"Ctrl-E": "edit.deletelines"
}
}
Rebind any conflicting keyboard shortcuts in Dreamweaver. In my Ctrl+E example above, it collides with Quick Edit.
In Dreamweaver, go to Edit → Keyboard Shortcuts.
Make a new Set if you're using the default Dreamweaver Standard Set.
Find the command you want to change. Quick Edit is in the Code Editing section.
Highlight the shortcut you want to modify.
If you want to unbind that shortcut, click the - button.
Otherwise, rebind that shortcut by typing the new shortcut in the Press Key field, and then clicking Change.
Click OK to save your changes.
If your change is not persisted, you can usually fix this by editing the following files.
%APPDATA%\Adobe\Dreamweaver CC 2019\en_US\Configuration\Menus\Custom Sets\*.xml
%APPDATA%\Adobe\Dreamweaver CC 2019\en_US\Configuration\Menus\menus.xml
Restart Dreamweaver for your new Brackets keyboard shortcuts to be read.
To bind other commands besides Delete Line, see the full Brackets Shortcuts command ID column.
I used these steps with Adobe Dreamweaver 2019 (19.2) on Windows.

Resources