IntelliJ Macro menu - macros

I've just started playing with macros in IntelliJ. I recorded several then played back until I decided to add keymap shortcuts to my macros. I went to Settings and pressed Alt+C to add a new child map because I couldn't edit the parent. Since then the macros are no longer accessible from the Tools menu, not to mention that the shortcuts don't work. I tried removing the shortcuts from the keymap but even though I press Alt+R or Alt+L, it still does not revert them back. And TAB has stopped working .. when writing sout +TAB ..nothing happens anymore... HELP

Sorted! sout+TAB is part of live templates..
If you open the IDE Settings window, you will see Live Templates.. Under output you should find sout(Prints a string to System.out).. if not, click Add and then type sout for the Abbreviation section, type in a description and then for the template text put System.out.println("$END$");
I use the Default keymap in IntelliJ now...
Thought this might help someone...

You can try to use the default keymap. When you modify the default keymap, a copy is created with your settings.
If that is not working, you can try to quit IntelliJ and to delete this file:
/.IntelliJIdea90/config/options/macros.xml
and check also for the folder
/.IntelliJIdea90/config/keymaps
To find the location of the config folder you should look for the file : idea.properties in the folder where the main executable for idea is.
Look for the line:
# path to IDEA config folder. Make sure you're using forward slashes
idea.config.path=${idea.home}/.IntelliJIdea90/config
And this is the location of the config. folder.
Restart IntelliJ.
Take a copy of any file you are going to delete!

Related

How do you reset an extension's settings in vscode?

I was trying to do some custom settings for the C++ and CMakeTools extensions. But now I want to reset/revert everything to defaults. How do I do that?
I tried uninstalling the extensions and re-installing, and they got re-installed with my custom settings wtf.
I see no reset buttons in the UI
I don't know where the per-extension settings are stored on my computer.
What am I not understanding? Why is this so unobvious?
As described in this feature request, you cannot do this directly. However, you can open your settings.json file and find the extension settings, then manually remove them.
Keep in mind, removing the extension won't remove its settings. So reinstalling the extension will not reset it at all, but keep your previous configuration.
There's a Settings tab (and apparently extension settings can be both in the User subtab and the Workspace subtab).
There's User, Workspace, and Default settings.json's which you can open from Ctrl+Shift+P, start typing "settings.j", and see the 3 suggestions (the user settings file is located at C:\Users\{USER_NAME}\AppData\Roaming\Code\User\settings.json (see docs for all OS paths).
Compiler settings are in c_cpp_properties.json, Compiling settings are in tasks.json, Debugging settings in launch.json. These are in your project folder under the .vscode folder, and you can search them in Ctrl+Shift+P (but don't write .json at the end or it won't show up).
Also check your system environment variables for "CXX" and "CC" env variables which can also overwrite the compiler (and the ui says nothing about this).
Apparently there's no way to reset all settings (the "permanence" is a giant source of ux confusion, a meme decision in my professional opinion).
Luckily you can just go to Settings and write #modified to see all the settings you've changed!
Ok, so to finally answer: HOW do you RESET an individual setting?
This cannot be "googled": There's an invisible hover hitbox on the left side leading to a hidden settings gear (red dotted line):
This ux is the source of the problem.
In VSCode, "removing"/"deleting" a setting means "resetting" it. Your settings are just "overwritings". So all auto-defaults should pop back into the UI after a VSCode restart, I hope. (also the aforementioned .vscode settings / env vars / build folder might still override)

Disable VSCode file editor re-use

In VSCode if I press Ctrl+P, I can type a filename and open it.
Since some recent update, these files open in the same editor, so it isn't possible to open multiple files one after the other.
I remember there being a setting somewhere but I can't find it. What's the name of it? And/or, how do I change this behavior?
As #Mark pointed out, the key word here is "preview".
Under Workbench -> Editor, there is Enable Preview from Quick Open.
Hopefully this helps someone else out who also doesn't know what the feature is called, and who is annoyed about VS Code constantly resetting their config when it feels like it. :-)

How to get VSCode to "open as new file" from Go To File dialog

I have recently switched to VSCode, and am loving it, except for one specific thing that drives me nuts.
My "goto" command is {Command+P}, the easy search-and-open-file bar. If I type the name of a file into this bar and it does not exist, I want to be able to hit ENTER and have it open a tab editing that file as a new file. This is the behavior I would get in old-school Windows Notepad, or in mvim :e <filename>, but I can't figure out how to do it in VSCode.
Is there a toggle or a plugin I can use to get this behavior straight out of the Go To File dialog?
Answering my own question:
No, there's no way to do this using {Command+P}. This is strictly a file finder and I've yet to see any plugin that changes the behavior.
If you're using the VsCodeVim plugin, an almost-as-good approach is just :e <file> - immediately open a new buffer editing the given file. There's no tab autocomplete this way, but you just have to live with that.

What is shourtcut for files in Netbeans

I realy dont know how to ask this one, so I will try to describe it.
I am pretty sure that there is a shortcut in NetBeans for files.
And when I want to get path to web/img/sample/fileWithStrangeName I dont want to type it and make some mistake.
What is shortcut in netbeans for that kind of navigation?
As you can see from the http://wiki.netbeans.org/Keyboard_Shortcuts there is no direct way to do this using a keyboard shortcut for any version until now.
What i do is right clicking on a file and then select properties. And then copy the value of the All Files property.
Another way is to use the plugin Explore from here, that opens the file in its location. And then copy the path from that window.

Eclipse treating file as plain text

I've got a small homework project, and for whatever reason Eclipse has decided to stop highlighting syntax or allowing intellisense or goto definitions or anything in this Main.java file. I've tried rebooting it, and the computer, but had no luck.
The thing that really has me confused is that it's still compiling and running the code correctly (eg, changes I make in Main.java are compiled and run - it's not running old Main.class files), so it's still in the build path ... right?
Any ideas?
Right click on the file in the Package Explorer and choose the Open With menu. You will probably find that Text Editor is selected, choose Java Editor to open the file with the correct editor.
The Open With menu selection is remembered so you should get the Java Editor in future, but equally if you choose the plain text editor that is also remembered.
I suggest finding a way to reset any setting you might have set by accident. Not saying that you did it. But just to make sure, just try it out. If you customized the preferences already, you could make some kind of note of the settings, then change it. If that doesn't work, let me know. Good Luck!
Copy the text somewhere, delete the file, and then add a new class (of the same name) and paste the text back.