Get rid of black blinking cursor [duplicate] - eclipse

When I edit code in the middle of statements, it replaces the current code around it. I cannot find a way to replace this with a normal cursor that only inserts data instead of replacing it. Is that functionality possible in Eclipse?

The problem is also identified in your status bar at the bottom:
You are in overwrite mode instead of insert mode.
The “Insert” key toggles between insert and overwrite modes.

It sounds like you hit the "Insert" key .. in most applications this results in a fat (solid rectangle) cursor being displayed, as your screenshot suggests. This indicates that you are in overwrite mode rather than the default insert mode.
Just hit the "insert" key on your keyboard once more... it's usually near the 'delete' (not backspace), scroll lock and 'Print Screen' (often above the cursor keys in a full size keyboard.)
This will switch back to insert mode and turn your cursor into a vertical line rather than a rectangle.

You might have pressed 0 (also used for insert, shortcut INS) key, which is on the right side of your right scroll button. To solve the problem, just press it again or double click on 'overwrite'.

This problem, in my case, wasn't related to the Insert key. It was related to Vrapper being enabled and editing like Vim, without my knowledge.
I just toggled the Vrapper Icon in Eclipse top bar of menus and then pressed the Insert Key and the problem was solved.
Hopefully this answer will help someone in the future.

In my case, it's related to the Toggle Vrapper Icon in the Eclipse.
If you are getting the bold black cursor, then the icon must be enabled. So, click on the Toggle Vrapper Icon to disable. It's located in the Eclipse's Toolbar. Please see the attached image for the clarity.

This issue can happen not only in eclipse but also in any of the text-editor.
On windows systems, windows-10 in my case, this issue arose when the shift and insert key was pressed in tandem unintentionally which takes the user to the overwrite mode.
To get back to insert mode you need to press shift and insert in tandem again.

Related

Access mouse over hover in VSCode

Is there a way to access the mouse over popup in VSCode via Keyboard and navigate in it?
I often use the mouse over to get the namespace of function or variable ...
So I want to place the cursor on "bar", popup the hover (Show Hover Ctrl+k Ctrl+i), focus it, mark some text (eg. namespace::functioname), copy and close the hover.
namespace foo{
void bar();
}
First problem, the hover doesn't get the focus and I don't know how to focus it. But there is another feature "Show defintion preview hover", which actually gets focused. So far so good. But I still cannot mark or copy text inside the hover via keyboard.
Show hover (not focused):
Show definition preview hover (focused):
But I still cannot mark or copy text inside the hover via keyboard.
That should change with VSCode 1.68 (May 2022):
Lock hovers to more easily mouse over them
Some custom hovers cannot be moused over and others are tricky to mouse over without hiding it because of other things in the way (eg. like a scroll bar).
Holding alt while a hover is active will now "lock" it, giving it a wider border and preventing moving the mouse outside of the hover widget or whatever triggered it from hiding it.
This is primarily an accessibility feature to make hovers play nice with screen magnifiers but it is also useful for copying text from certain hovers.
Note that this feature only applies outside of the editor because editor hovers can always be moused over unless specified otherwise via a setting.
This will be helpful for other views (debug, terminal, ...) where variables with their popup can appear as well.
In the editor, see microsoft/vscode issue 63296
ctrl+K ctrl+I to show the hover and focus it
ctrl+A to select all the hover content
ctrl+C to copy to clipboard
It does indeed work for me (on windows) for the first two steps, however ctrl+C does not copy the text selected with ctrl+A.
It seems like there are two different selections possible in the hover:
ctrl+Aselects everything with a dark blue.
When selecting some text in the hover with the mouse (i.e. press the left mouse button while near/over a char, move mouse, release left mouse button) the selected text is shown in a lighter and brighter blue.
The two selections can coexist.
ctrl+C always copies the text selected with the mouse, or nothing if there's no such selection, no matter whether a ctrl+A selection also has been done.
If there's only a ctrl+A selection, ctrl+C doesn't copy anything.
The two selections can be selected in any order. The order doesn't change the behavior.
Think I found out what you were after.
The shortcut is: Ctrl+K Ctrl+I
See: Trigger advanced hover information with keyboard
please try control + mouse click
it may be help you

Disable ESC key to scroll viewport in IDE editor

I'm using NetBeans 12.1 on Windows 10 with no plugins or other special setup. When editing any type of text file, pressing the escape key switches to a mode where the cursor keys scroll the viewport instead of moving the cursor. (In many editors, including NetBeans itself, this is typically done by Ctrl-cursor). Pressing escape again leaves that mode and returns to normal.
I often need to press escape to dismiss some window and frequently enter this mode by mistake. I then press the cursor keys to move the cursor but move the viewport instead.
I looked through key bindings to disable the binding, but couldn't find anything. How can I make NetBeans simply ignore the escape key in normal editing mode?

VSCode how to automatically insert Intellisense suggestions without having to press Enter?

Default VS Code Intellisense behaviour
User is presented with a menu of suggestions
User then has to press the Up or Down arrow keys to navigate through the menu
Finally user has to confirm with Enter to insert the suggestion and close the dialog
What I would like instead
Don't need to press Enter
Suggestions are automatically inserted (and cycled through) by pressing Up/Down
Pressing any other keys will close the dialog and resume typing
To be clear, I want to replicate the default behaviour of YouCompleteMe:
When you type, a completion menu pops up. If you like the completions, you use the <Tab> key (by default, can be changed to <Enter> or <Down> arrow or whatever) to select a completion string you want. The very act of "tabbing through" the list to select the item you want inserts the candidate string. When you tab to a different candidate, the editor code is replaced with the new candidate. There is no accept key because by the point where you have the candidate you want selected in the menu the candidate has already been inserted in the editor. There is nothing to "accept". You just keep typing, the candidate has already been inserted.
Is such behaviour possible with Visual Studio Code, either by default or through a plugin?
The editor.tabCompletion option is the closest thing currently available:
By default, tab completion is disabled. Use the editor.tabCompletion setting to enable it. These values exist:
off - (default) Tab completion is disabled.
on - Tab completion is enabled for all suggestions and repeated invocations insert the next best suggestion.
onlySnippets - Tab completion only inserts static snippets which prefix match the current line prefix.
(Emphasis mine)
... except that the first Tab press hides the suggestion window.
I did some digging about editor.tabCompletion, and I found that closing the suggestion window is part of the tab completion's option original design, and that while other users have asked about an option not to close the suggestion window or specifically YouCompleteMe-style behaviour, that this is currently not supported.
"editor.acceptSuggestionOnEnter": "off",
To disable Enter to accept suggestion.

Key binding for changing eclipse tab traversal

When using eclipse, I often use the find/replace tool without touching the mouse. I'll press Ctrl+F, type the text I want to find, press tab, type the replacement text, then press Shift+Tab 3 times, to bring focus to the "replace all" button, then I press Space to perform the action and ESC to close the window.
Today, I tried this and tab will only switch between the "find" text box and the "replace with" text box, meaning I have to go to my mouse to perform the "replace all" action, which takes forever (comparatively). I have had this problem before, and thought I recalled a key binding that changes the focus traversal policy for eclipse, but I cant seem to find it now. Googling has turned up nothing, but I don’t think I am searching for the right terms. I don’t think this is OS related, but I am on a Mac.
Thanks in advance!
I finally found this. It was OS related- Mac has a setting to allow tab navigation through buttons.
System Preferences-> keyboard, at the bottom select "all controls"

Is it possible to dock the "Find/Replace" window in Eclipse?

I could have sworn I saw it once before in a screencast where someone had the find/replace window docked in their Eclipse environment.
However looking through the list of options in "Window > Show" the closest thing I can find is the Search window.
I find that I use it quite a bit and with larger monitors these days I figure I could afford to have it open in my perspective all the time.
Is this possible?
Thanks.
One poor-man's workaround is to dock a view that you don't need in a part of Eclipse where you want the find/replace view and then place the find/replace dialog on top of that like this:
Clearly this is a huge kludge but it does work.
I am not sure about that, since Fast views are:
icons allowing users to quickly display different views that have been created as fast views
And the search/replace is a Dialog, not a View..
(source: bpsite.net)
(That Dialog box is not like Views, which support editors, also have their own menus. Some views also have their own toolbars.)
The help page mentions:
Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window.
This might not be an exact answer for the question. But this works like a charm.
Press ctrl + j and keep typing...
Use ctrl + k to go on
Use shift key wherever required.
Use Edit > Incremental Find Next (Ctrl+J) or Edit > Incremental Find Previous (Ctrl+Shift+J) to enter the incremental find mode, and start typing the string to match. Matches are found incrementally as you type. The search string is shown in the status line. Press Ctrl+J or Ctrl+Shift+J to go to the next or previous match. Press Enter or Esc to exit incremental find mode.