Can IntelliJ make spelling suggestions? - intellij-idea

IntelliJ tells me that I write words wrongly. That is cool. However, it does not give me any suggestions how to write them correctly, making this feature only half as useful as it could be. Can I get IntelliJ to make spelling suggestions? Working on KDE, many of my usual programs use the KDE spelling and thus are able to make suggestions...
I am using IntelliJ IDEA 2016.2.4.

Right Click on the misspelled word -> Spelling -> Typo: Change to...

Right click or press
Alt + Enter
on the misspelled word. It will display a menu like this -
On the first option, you have a sub menu which you can expand on the right but to access the spell check options, you need to select the option itself that is highlight in the screenshot above, and it will replace the context menu with another one, listing the possible spelling suggestions -
I too struggled finding this option. The menu option available (first screenshot) looks like "can be expanded only" and is not at all selectable, visibly.

Related

IntelliJ: Move to next typo

IntelliJ IDEA has an inspection that checks for spelling. In the analysis overview, I can see how many spelling mistakes were found, e.g. 12 typos found. In the code they are highlighted using a wavy green line.
However, I find it very hard to look manually for those wavy lines. Is there a keyboard shortcut or a search function which will automatically skip to the next highlighted typo?
F2 and Shift + F2 shortcuts will navigate you to the Next / Previous highlighted error. You need to configure the error navigation first to Go to next problem instead of default Go to high priority problems option(from the context menu of editor right side bar):
See help for details. Another option is to use double click (F4 shortcut) from the Inspection Results window to go to the source.
IntelliJ IDEA 2016.3
If you want to fix all typos from the project, you can list all of them and iterate through them using double click (or F4 to open the source):
Analyze > Run Inspection by Name...
Type "Typo"
You will be able to see a list containing all typos grouped by file:
In Settings -> Editor -> Colors & Fonts -> General, you can add an 'Error stripe mark' color to Typo.
With the default settings of IntelliJ I find it difficult to spot the typos. So I do the following hack to spot and correct them once in a while.
Temporarily change inspection setting to show Typos as Errors.
IntelliJ then highlights the typos as Errors, making it much easier to spot them in the editor. I correct them and then revert the inspection setting changes. The changes can be kept permanently but I don't prefer that!

Turn off Intellij signature popup

In IntelliJ 12, how do I make the popup stop...popping up when I hold Ctrl while hovering over a field/method with the mouse? (see picture)
That is the "Brief Info" action (or at least that is what it is called in the Keymap reference.) To the best of my knowledge (i.e. 10+ years of daily IDEA use including all beta/EAP builds), there is no way to turn it off. Searching the settings for either "Brief Info" or "Info" does not show any pertinent setting. Likewise, searching key mappings for the same does not reveal a mapping. In fact in the keymap settings, you can only map mouse clicks, not mouse pointing (i.e. hovering). You can submit a feature request asking for a setting to disable this feature.
Just put of curiosity, why do you want to disable it? I guess I would never see a case where one would Ctrl+MousePoint unless they wanted to see this. The only case I can think of would be if you disliked it popping up when you go to Ctrl+Click on a symbol. If it is the latter, note that you can use Ctrl+B in place of Ctrl+MousePoint
Try turning off the "autopop" options under /Settings/IDE Settings/Editor/Code Completion.

Wrapping comments with line breaks in PyCharm

I have comments that gets balloon (PEP 8: Line too long ... > 120)
I wish there was a command that will wrap the lines with few keystrokes.
Right now, even if I type Alt+Enter and press enter on Reformat file, nothing actually changes. Is there a setting or plugin I could use to accomplish the formatting easily?
Under the Edit menu, there is a Fill Paragraph option, which does what I believe you want. You can assign a key command to this in Preferences, under Appearance & Behavior -> Keymap (search for "fill").
Personally, I choose first stroke Esc, second stroke Q, because that's what I've always used in Emacs...
Firstly, reformatting won't work, not in Python at least, where whitespace is important. PyCharm's "Wrap when typing reaches right margin" option is what you're looking for. Now this will not work when you copy and paste code, but in the places where it gives you trouble, just press enter, and it will work.
To be able to auto-reformat comments (and code, for that matter) to honor a right margin after the fact, go into Project Settings under Code Style and then further under Python. Click the Wrapping and Braces tab, and check the "Ensure right margin is not exceeded" checkbox.
Now if you select a region of lines and then run the Code/Reformat Code... command, PyCharm will do its best to wrap the comments or code appropriately.
You will probably have to do some tweaking of the results to suit your stylistic taste. For example, I wish PyCharm would do aggressive filling of text in block comments, at least optionally so.
PyCharm will not reformat code such that it becomes invalid Python, so sometimes it will still leave a line longer than the margin (120 or whatever you set under Project Settings/Code Style/General).
With recent PyCharm this now is located at "Editor -> Code Style", with the checkbox named "Wrap on typing"
The Screenshot shows PyCharm version 2016.2.1 Professional.
Updated Answer:
Use "soft wraps." You can search for it in the help bar.
View > Active Editor > Use Soft Wraps
It won't work for existing text or text that's copied in, but will for any newly typed text.

intellij ide shortcut

I was wondering, if anyone know about this kind of shortcut:
lets say I'm searching for something and get a results window with many results, is there a shortcut that can navigate me inside the list without mouse help?
In IntelliJ IDEA 11.0.2
Whenever I do a "Find in Path" using Ctrl+Shift+F and the search completes, the focus is already in the search results and the arrow keys can be used to navigate.
If the focus isn't in the search window, there can be an Alt+# combo that will take you to the window. In my setup, it is Alt+3 (the label on my "Find" tab is "3: Find", so it's easy to see that Alt-3 is the right combo.)
I suspect that I may not understand what you're looking for, but maybe it is helpful.

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).