Monodevelop curly braces (or brackets) and ALT keypad numbers - character

Good day all,
I realize this is an ugly subject, but I'm desperate to find a solution since this bug is barring me from using javascript in the editor.
Basically, the only way I can type the curly braces { and } is to use their corresponding numeric keypad codes, ALT + 1 2 3 and ALT + 1 2 5, however when I press ALT and a number, monodevelop will just jump to the open script in the current window, where ALT 1 switches to the leftmost script.
To add insult to injury, code templates don't work either. If I right click the editor area and select 'insert template' from the context menu, nothing happens! Additionally, the shortcuts window doesn't even have an "ALT + number" combination, so I can't get rid of it to see if that's the cause of the problem!
I am thus practically unable to use monodevelop to code with javascript, so I am here hoping that anybody knowledgeable with monodevelop can explain what's the problem, or propose a workaround (I've read about code snippets or other advanced functions, but without more insight can't tell if they can help me or not).
I am using monodevelop 2.8.2, but I've tried 2.6 and the problem is the same.
Thanks in advance.

Through much indirect searching, I've found out that there's an additional 'special key' combination, consisting in
ALT GR + SHIFT
Specifically, ALT GR + SHIFT + [ or ] will output { or }.
Hopefully this might help some of you with a similar issue.

Related

In VSode, is there a way to add a toast notification that a shortcut has been used?

I'm still new to VS Code and learning the litany of shortcuts and features.
Some shortcuts have multiple steps and it isn't immediately apparently if it's been fired.
For example, remove trailing whitespaces is CTRL + K, CTRL + X.
The only way to tell if it worked is to move my cursor to a line that has whitespace and see if it's gone.
Is there a way to add a small notification that announces when a shortcut is used?
I know I could alternatively use the Command Palette but I'd like to be more efficient as use KB Shortcuts.
Thank you

how do you select only the entire string in vscode?

I tried looking up this questions but they were for the entire line.
My question is for example let url = "https://robohash.org/hello.png?set=set4";
here, is there any shortcut to select only the url or basically anything enclosed between "". Is it possible?
I just found a magical shortcut :)
For expand selection we can use shift + alt + ->
I had installed a stupid plugin before!
AFAIK this is not possible without an extension. You can download Quick and Simple Text Selection, the use ctrl+k " shortcut.
If you're familiar with Vim, you can use the vim extension, and then click v i " to enter visual mode, and choose everything between double quotes
For the sake of completeness, vscode also includes a smart select option, which has the keyboard shortcuts ctrl+shift+right_arrow and ctrl+shift+left_arrow (The shortcut has been changed to alt+shift+left/right_arrow). The problem with it is it doesn't specifically select everything between double quotes, and in the case of a URL, it doesn't simply work as intended. If it's only a simple string, it would also select the double quotes in addition to the string between them
There is actually another expansion called expand_region with the ability to
expand_region and undo_expand_region. The default keybindings are ctrl+w / shift+ctrl+w .
I find this one to be more convenient.
It stops before and after " and it will work for the url-fetch scenario.
What it doesn't do is to stop at a complete line (with and without indentation) which smart select seems to do. There are probably more differences that I don't know about.
Update: You have to press multiple times to expand further. For the example line in the original post this means 3 times.
ctrl+w, ctrl+w, ctrl+w
let url = "https://robo[cursor-here]hash.org/hello.png?set=set4";
1. https://robohash.org/hello.png?set
2. https://robohash.org/hello.png?set=set4
3. "https://robohash.org/hello.png?set=set4"

Find Replace Hotkeys In Eclipse

Anyone know of a set of hotkeys that can perform a find/replace in eclipse?
Currently the flow looks like:
Select line or lines
Ctrl+F
Type phrase
TAB
Type replacement
And then I have to do the unthinkable and grab my mouse, choose selected lines and then click on replace. It doesn't sound like much, but it seriously disrupts my flow when i'm doing a bunch of word replacement. I wish their was a way to choose "selected lines only" and "replace all" using keystrokes only besides having to hit TAB 12 times. Or maybe i'm using the wrong tool within eclipse for this sort of thing...
Using Ubuntu and Eclipse Luna 4.4.2
Using Find/Replace for refactoring seems like a smell. You should instead use the refactoring operations
Rename : Alt + Shift + R
Extract constant : Alt + Shift + K
Extract method : Alt + Shift + M
Extract variable: Alt + Shift + L
Inline : Alt + Shift + I
Change method signature : Alt + Shift +C
Introduce indirection
Introduce parameter object
and so on, which all do a kind of replacement by themself, but always work on the syntax tree and not on the text. However, the refactoring support depends much on the language used in the project, and while Java has really good support in Eclipse, this might not be the case for other languages.
I had been trying for this for a long time and ended up in multiple pages without help. I figured it out myself after playing around
For the first time, you need to do the below
Ctrl + F - to open the search box on the top right corner of the IDE (as in image)
You might have to drill down (using the small icon on the left of the search box) to see the replace text
This setup stays from now onwards.
Now you can simply use
Ctrl + F, Tab, Alt+Shift+Enter combinations to do the search and replace
I use eclipse 2020-03 on windows. I am pretty sure many of the previous releases had the same functionality on linux as well.
Screenshot of the feature:
I found thath ctrl+K works in my ide (Neon.3 Release (4.6.3) on windows)
First use Ctrl+f to set a term for search, then use ctrl+K to move to next.
If you need to replace something, keep in the clipboard the text and use ctrl+K, ctrl+v.

How to turn off a weird "box" cursor and selection behavior in Netbeans?

I have some kind of weird behavior in Netbeans. I guess I accidentally entered some key combination which messed up the cursor and selection behavior. In the image you'll see what I mean: normally, if you select text across multiple lines, you'll see the behavior on the right screenshot.
But I have the behavior on the left screenshot. Also, trying to insert text at a certain position with Shift, inserts it some positions to the right (= not where the cursor is). Additionally, when the cursor blinks, it appears dashed.
The fact that the selection in the left screenshot is drawn nicely doesn't make me think of a bug, but rather of a feature. I can't seem to find the key combination to turn it off again.
So my question is, what is this feature? Why does it exist and with what key combination did I turn it on?
One possibility is you have the Rectangular Selection plugin installed.
However, the more likely candidate is the rectangular selection feature in the editor core. Find the button on your edit toolbar, and toggle it off. As per helpful comments below, this can accidentally be switched on (and toggled back off again) using:
On Windows and Linux: Ctrl + Shift + R
On Mac: Shift + Meta + R
On Mac, if the above does not work: some folks have reported that Shift + Command + R worked for them
This key combination (Ctrl+Shift+R) is used to open types etc. in Eclipse, so when switching to Netbeans many people will get stuck with this.

Eclipse's Ctrl+1 in IntelliJ and Android Studio

I really like the Ctrl+1 shortcut (hints for errors and mini refactorings) in Eclipse. Is there an equivalent for it in IntelliJ and Android Studio?
Alt+Enter
Personally I don't think AltEnter is particularly correct. Ctrl1 does lots of code generation like generating local variables given a method call etc.
CtrlAltV ... generates a local variable
CtrlAltF ... generate a field
AltInsert ... generate (drop down menu to generate all sorts)
Now, unrelated to the question but maybe helpful and in the same ball park is that the "foreach" short cut in IntelliJ is iter rather than for.
I also don't think ctrl+enter is the answer.
I'd say ctrl+alt+shift+t (Refactor this...) which I remapped to ctrl+1 is the closest thing to ctrl+1 from eclipse. It allows you to inline, extract code (variable, method, field etc.), move code, pull members etc.
Ctrl + 1 was one of my favorite shortcuts but unfortunately there is no exact equivalent shortcut for that. You can search for Quick fix in: File-->Settings-->Keymap, but you'll find nothing.
Although many people would say Alt + Enter is the nearest answer. but I think there are better equivalents such as Ctrl+Alt+Shift+t. It will give you some magic options.
You can also remap it to Ctrl + 1 by going to:
File-->Settings-->Keymap
Try pressing CTRL + ALT + v.
It will give the return type exactly of that method.
I think the "Other -> Show Context Actions" is very close to Ctrl+1 in Eclipse.