What is the name of the keyboard shortcut &/or method in an IDE which allows me to jump past automatically generated </endtags>? - ide

This question relates to a prior question which was answered for all practical purposes with a fellow telling me I simply needed to press the "End" key to skip the cursor to the end of the line. But a second respondee told me of other IDE's abilities to this (his words): "In some IDE, pressing the tab key will move your cursor to the next placeholders in the currently auto replaced element, and if there is no more placeholders, brings you past the end of the auto replaced text."
What is this ability called?
I'll show an example very quickly, if you or I were writing some code in Aptana or RubyMine (my two favorite IDE's)...
<table summary="Subject detail view">
<tr>
<th>Name*</th>**
</tr>
</table>
We'd eventually run into the location(*), where the single asterisk is. We would reach this point and be forced to either use our mouse to click past the auto-generated </endtag>, or our keyboard arrows, or, most recently, the "End" key which would skip our cursor to the end of the line.
But can't I just do this with tab like my friend told me? In order to be able to do this I need to know what this keyboard shortcut is called. I need a searchable keyword. Any additional feedback about keyboard/IDE shortcuts etc would also be appreciated.

RubyMine (and IntelliJ IDEA platform it's based on) doesn't have this feature yet. There is an open feature request in the YouTrack issue tracker:
IDEA-74666 Add Eclipse Style Paren/Bracket/Quote Completiton

I have figured out the king of all answers for this question, which is my own.
Create your own macro. It is stupid how easy this is to do (with Komodo Edit, at least).
To do this in Komodo Edit, for example, first set yourself up so your cursor is a position where you need the custom command, whatever that might be.
So, let's say your at the end of an xml tag with your cursor where this ("|") symbol is
<xmltag>blahblah|</xmltag>
Now the < /endtag> has been generated automatically, just to make sure you know that.
Now, go to Tools, Macros, Start Recording. Click it. relax, you can do this as many times as you like...it only records keystrokes, by the way, so do this only with your keyboard. To skip to the end of the tag without the arrow keys, use the 'End' key. And I don't mean to insult your intelligence, but in case you didn't know this, you need to use the End key and not the arrows because future tags could be any length.
OK so do this:
<xmltag>blahblah</xmltag>
|
So you're there. Good, now go to Tools, Macros, and stop the recording.
Next, click on tools, macros, and save the macro.
Then, go to your macro library (same tools submenu) and you should see in the toolbox the file which you named which contains your macro.
Right click it, Properties, Key Bindings tab, then set your custom command in the 'new' form. Apply. OK. You're done.
Test it out, and pat yourself on the back, you just learned something really, really, really useful.
Btw, here's another one I've created.
<!-- | -->
That is a macro command as well. Obviously, you could create an entire form with a simple macro command.

Related

How to make my own Code abbreviation in intellij idea

in IDEA ,I can type soutto represent System.out.println();and I want to know how to make my own code abbreviation.For example, alias System.out.print(); to sounor any other names
This is called a Live Template in IntelliJ.
Go to File > Settings > Editor > Live Templates. From there, select Java and on the right, you'll see a plus sign. By clicking it, you'll get a 1. Live Template and that will get you a new abbreviation.
Name it soun and the text should be
System.out.print($END$);
Once you're done, make sure you've enabled that abbreviation by clicking the check box next to it.
The docs of IntelliJ cover in detail what the syntax is for these templates.
The $END$ syntax indicates the position of the cursor when the code snippet is complete, and you can no longer press Tab to jump to the next variable.
There are more variables to look at as well and other configurations to do!
Edit: there is an answer here for this question, but it looks like it doesn't necessarily answer the question asked on that post, so that's why I've decided to post a dedicated answer (tackling the issue at hand).

Vscode "next search result" shortcut does not work

When I use the shortcut associated with "search.action.focusNextSearchResult" in vscode while searching something nothing happens.
This action is initially associated with F4 which is also used for other shortcuts. I thought it may be the problem so I reassigned it to an unused shortcut but it did not help.
I am using the extension "Emacs Friendly Keymap" (don't know if it can cause the problem).
Do you know how I could make it work?
That shortcut, used to go to the next search result, only works in a search editor. It has these context keys:
hasSearchResult || inSearchEditor
Are you using it in a separate search editor? It does work there. Here is one way to open a Search Editor:
If you are using the Find widget then use either of these:
Enter when focus is still in the Find widget or F3 when focus is in the editor.
If you are doing a search across files, then just a downarrow will go to the next result.

Visual Studio 2013 VB intellisense

Apologies upfront if this is a silly question, but it's annoying me to no end and I can't figure it out.
I'm using Visual Studio 2013 Professional, and I usually code in C# where when using the Intellisense, when I press Enter to select a method or something it adds my selection and I can continue typing on the same line.
But at the moment I'm working on a project which is in VB.NET, and when I use the Intellisense in the same way it puts my cursor in the next line, i.e. I press Enter to select whatever, it adds my selection and starts a new line, so I have to press the Backspace to go back to the previous line. It's so annoying!
Is there a way to change this behaviour so the cursor doesn't go to the next line? I've looked at the settings available in Tools > Options but can't figure it out, and searching Google for anything similar hasn't been successful.
Found it here (paragraph List Members)
You have toggled to suggestion mode instead of completion mode.
You can also change to suggestion mode, in which only the text you type is inserted into the code. For example, if you enter an identifier that is not in the list and press TAB, in completion mode the entry would replace the typed identifier. To toggle between completion mode and suggestion mode, press CTRL+ALT+SPACEBAR or click Edit/IntelliSense/Toggle Completion Mode.
So, either use TAB/SPACEBAR (as I said in the comment) or press CTRL+ALT+SPACEBAR to switch back to completion mode.
EDIT: I've found out that whenever you type Stri (String will show highlighted in the list now) and you press . (dot) it will autocomplete and stay at the same line.
I think your way of doing this in C# isn't possible in Visual Basic.
I had the same problem and discovered that Auto list members was not enabled on my machine. It's under Tools > Options > Text Editor > Basic > General. This gave me the intellisense I was looking for.
Simple thing which can be used when you face this kind of issue is to press
tab key instead of Enter key when the IntelliSense provided me prediction list.

Saving a position while coding?

Back in olden times, I used to code with an editor that allowed you to mark where you were in the code with a keypress. You could jump to another point in the same or another file to check a reference or somesuch. When you were ready, you could hit another keypress and return to the point you saved.
I've long since migrated to Dreamweaver and wanted this functionality. Does it exist in DW? If so, I missed that part of the manual. If not, any suggestions on an editor that DOES have that functionality?
Scott.
There is no official way to do it, but you could use the code collapse feature to create something like a bookmark. Collapse the single line and DW will have a mark at that line number until you clear it.

Rename using suggested var name with resharper

I'm Using resharper 6 nighty builds and VB.net. I've a big medium project with multiple files that don't follow the code style conventions of my company.
I've configured resharper with my own convenctions and It suggest to me the right name for each variable (perfect!).
But I can't find any automagic way to make the current name to be replaced with the suggested name.
Are there any way to do it? If not ... did you know ane fearure of coderush Xpress to achieve it?
Thanks.
If you've configured ReSharper with your naming conventions, then it should show a warning (blue squiggly underline) under any identifiers that don't comply. If you put the text cursor on one of those misnamed identifiers, you should see a pyramid icon appear near the left margin. Then you can press Alt+Enter (or click the pyramid icon) to drop down a quick-fix menu. There should be an option in the menu to "Rename to '_myField'". Usually it's the first item in the list, so you can just press Enter again to do the rename.
If you want to do this on everything in a source file, you can use the ReSharper > Inspect > Next Issue in File command (or its keyboard shortcut -- F12 in the IDEA keymap) to move the cursor to the next warning in the file. Then, if it's another name warning, you can use Alt+Enter, Enter again to fix it.
Unfortunately, there isn't a way to automatically fix every instance of a warning at once (though it's been requested; please feel free to vote for RSRP-126551 in their issue tracker).