How to insert a new line above current in Webstorm? - webstorm

The equivalent behavior in Sublime Text and Visual Studio is "Shift+Control+Return." and I would like to figure out a solution.
Either I can not find this in the documentation or no such functionality exists within Webstorm.
I suspect that one could create a macro to do this, but I can not figure out how to get the cursor position correct after execution.
Has anyone else found a solution for this?

In the OSX edition of IntelliJ (just a beefed up version of WebStorm), there is a key binding called "Start New Line Before Current". I think this is what you want.
Open up Settings -> Keymap -> Search for "line"
For me, it's Alt+Cmd+Enter
For you it might be Ctrl+Alt+Enter (instead of Cmd)

Related

How to highlight everything up to a certain point

I am new to SAS Enterprise Guide, and I'm beginning to get familiar with some of the useful keyboard shortcuts. I just figured out that Shift+F8 highlights the current step and F8 runs it, but I was wondering if there is a way to set up a shortcut that highlights the current step AND everything before it.
For those of you familiar with RStudio, what I'm looking for is analagous to the "Run all chunks above" option.
Thanks!
I've tried looking at the Macros menu to see if there is an existing option, but I didn't find one.
CTRL+SHIFT+HOME will select everything from a line up to the start of the program

Intellij show intention actions [Alt + Enter] doesn't work

The problem occurred after I had added Groovy Unit Testing .jar to my project (it is sole activity I suppose which could 'damage' my Intellij but it is quite likely that the reason is something else because the problem is global - it appears in all projects).
For example I get message like this:
but after I press Alt+Enter nothing happen.
If I append another keyboard shortcut for "show intention actions" it doesn't work either. However if I append Alt+Enter with another action then that another action works properly using this shortcut.
It is also interesting that shortcut Alt+Enter is reserved not only for action "show intention actions", but if I remove another associations it still doesn't work.
Every intentions in Intellij are enabled and power save mode is disabled.
I have read
IntelliJ, Alt+Enter doesnt work
Auto errors detection in IntelliJ IDEA
but it doesn't solve my problem.
Your IntelliJ IDEA installation seems to be corrupted, some jars are missing.
Caused by: java.lang.ClassNotFoundException: groovy.lang.Closure PluginClassLoader[org.intellij.groovy, 9.0]
The solution would be reinstall the same version you have from this link or install the current version.
The solution was: missing groovy-all-2.4.6.jar file in my /home/user/idea-IU-162.2228.15/lib folder.
How have I removed it?
According to jetbrains page I chose Groovy JUnit test library and press fix. After few minutes I decided not to use Groovy JUnit so I deleted this library from my project, but in practice I removed .jar from my folder and that was the reason why alt+enter didn't work. After the .jar is restored everything is as normal.
Thank you CrazyCoder and liro Alhonen
You don't have the libraries stated that you are using. You can do this manually if it does not fill them automatically. It should if you select from the list and hit enter.
In my case i just try to use left alt:
LEFT Alt + Enter
LEFT Alt+Enter
Looks like some languages override Right Alt behavior, at least in
case of Lithuanian Left Alt is working fine with Lithuanian enabled,
Right does not, when switch to English, everything is fine again. Was
pulling hair to figure out why out of nowhere it stops working, thanks
I hava same problem that can not auto import package by ALT+ENTER in MacOS. solved by next step:
Preferences --> Editor --> Intentions
search Refactorings
enable introduce local variable

How to make Vim format C++ code automatically as I type

I have setup clang-format to reformat the current line/selection when I press Ctrl-K in Vim (see the official documentation how to do that). However, it's annoying to be constantly pressing Ctrl-K whenever I edit a line.
Is there a way to make Vim call clang-format as I type or edit code automatically, without me having to press Ctrl-K? In other words, probably after each key stroke in insert mode?
I haven't seen anybody setup vim this way --- what are the potential problems with this setup?

Finding C++ references in Eclipse

In eclipse C++ (with CDT), I would like to find all C++ references of the selected text. Ideally with the following constraints:
accessible via keyboard shortcut
a working set can be selected to restrict the search
I do NOT need to right click on my working set directory in Project Explorer > Index > Update with Modified Files, so that search results are relevant
Currently, I know:
Ctrl+Shift+G : but it searches in the whole project which is just huge. For those who know Visual Assist Plugin in Visual Studio, it is more or less the equivalent of shortcut Alt+Shift+F except Visual Assist indexer seems really faster to me, and I have never been bothered by the latency before.
Ctrl+H, then Enter : cool but if I can skip the Enter, and have a direct shortcut somehow, it would be just better
So, I have three questions:
Have you got this issue, in a big project with thousands of files, that the indexer gets in a wrong state (it is not in a running step who could explain that, it just seems wrong), so that if you modify a file, a next references search shows weird results, except if your right click on a directory in Project Explorer > Index > Update with Modified Files ? I tried to play around with Window > Preferences > C/C++ > Indexer but had not luck to improve that.
Is it possible to have a shortcut for Ctrl+H, then Enter ?
If not, is it possible to record/tune some kind of macro to avoid repeating these uncomfortable and distracting steps ?
Thanks,
Eclipse details:
Eclipse Version: Luna Service Release 2 (4.4.2)
CDT Version: 8.6.0.201502131403
Try to find "References in Project" instead of in the whole workspace. If you have several projects in your workspace, the search is slower than in only one project. First try References > In Project from the context menu to see if this command works well enough for you.
If you are satisfied with it, assign a hot key in menu Windows -> Preferences > General > Keys. Filter by text "References in Project", select the item with "Source" category. Change its hot key below and change "When" field to "C/C++ Editor".

How do you enable auto-complete functionality in Visual Studio C++ express edition?

Please guide me, how do you enable autocomplete functionality in VS C++? By auto-complete, I mean, when I put a dot after control name, the editor should display a dropdown menu to select from.
Thank you.
Start writing, then just press CTRL+SPACE and there you go ...
When you press ctrl + space, look in the Status bar below.. It will display a message saying IntelliSense is unavailable for C++ / CLI, if it doesn't support it.. The message will look like this -
It's enabled by default. Probably you just tried on an expression that failed to autocomplete.
In case you deactivated it somehow... you can enable it in the Visual Studio settings. Just browse to the Editor settings, then to the subgroup C/C++ and activate it again... should read something like "List members automatically" or "Auto list members" (sorry, I have the german Visual Studio).
Upon typing something like std::cout. a dropwdownlist with possible completitions should pop up.
All the answers were missing Ctrl-J (which enables and disables autocomplete).
Goto => Tools >> Options >> Text Editor >> C/C++ >> Advanced >>
IntelliSense
Change => Member List Commit Aggressive to True
VS is kinda funny about C++ and IntelliSense. There are times it won't notice that it's supposed to be popping up something. This is due in no small part to the complexity of the language, and all the compiling (or at least parsing) that'd need to go on in order to make it better.
If it doesn't work for you at all, and it used to, and you've checked the VS options, maybe this can help.
Have you tried Visual Assist X ? Sort of lights up the VS editor.
I came across over the following post:
http://blogs.msdn.com/b/raulperez/archive/2010/03/19/c-intellisense-options.aspx
The issue is that the "IntelliSense" option in c++ is disabled.
This link explains about the IntelliSense database configuration and options.
After enabling the database you must close and reopen visual studio
for autocomplete use 'ctrl'+'space'
'ctrl'+'space' will open C/C++ autocomplete.
Include the class that you are using Within your text file, then intelliSense will know where to look when you type within your text file. This works for me.
So it’s important to check the Unreal API to see where the included class is so that you have the path to type on the include line. Hope that makes sense.
It's enabled by default. Probably you just tried on an expression that failed to autocomplete.
In case you deactivated it somehow... you can enable it in the Visual Studio settings.
Step 1: Go to settings
Step 2: Search for complete and enable all the auto complete functions
I believe that show help