How do I stay on the current search match? - visual-studio-code

I have not been using vscode for more than a year. Today when I used it again I can't find out how to stay on the current match for a search. Very confusing:
Control-F
Enter word to search for
Hit ENTER until the wanted match is highlighted
Hit ESCAPE
So far everything seems ok. But. When I hit for example LEFT-ARROW (or any other keyboard key) the character position jumps back to where I was before I started 1).
What is going on? I can't remember it worked like this?

Related

Is it possible to move the text cursor/ caret multiple characters at once using C++?

I'm writing an application that pastes strings into any given editor. After selecting something to paste my application programmatically looses focus, giving it to the application that had focus before. It then sends Ctrl+V to the OS to paste it in the other application. I want to be able to set the position of the cursor after pasting. Currently a pasted text will always leave the cursor at the end of the text.
I already tried sending multiple Arrow Left presses to the OS, so for example if I wanted:
Hello $CURSOR_POSITION$World
54321
I would send 5 times ArrowLeft after pasting "Hello World". This is very slow tho as every single Arrow Left key is processed serparetly (moves left about once per second). As the strings can get very long using Ctrl+ArrowLeft to skip entire words does not solve the problem.
I already looked into ANSI-Codes, they only seem to work in consoles though, I want it to work in every editor.
Is there a way to achieve this using C++? Something like moveCursorLeft(5)?
Thanks in advance!

Autohotkey only replace text in URL field

I'm trying to set up AHK only when I'm typing it in to the URL portion of a browser. That way I can continue to use my keyword other places.
Is this possible? I've been trying to mess around some with `ifWinActive("ahk_exe chrome.exe") which almost works, however when I try to type it not in the URL it simply deletes the text (and also will still make the replacement even if I'm typing in to a separate text box in the browser, not the URL box.)
You are on the right track. Once the command is limited to chrome, you have to do a conditional test to see if you are in the address bar or not. If not, simply "return" without doing anything.
For chrome, window spy however does not indicate the "focused Control" that you could use with "ControlGet" and its related commands:
https://www.autohotkey.com/docs/commands/ControlGet.htm
Oh well, so in your hotkey result, you may have to first do a quick copy all from your current caret position to clipboard and then see if the clipboard result is text only and starts with "http" and has a "://" and at least one "." and is otherwise a fully formed url address, and if so, then go ahead and run your hotkey result because now you can be pretty sure you actually are in the address bar.
Klugey, but certainly possible.

How can I "accept" the autocomplete in Netbeans?

Sorry if this is a stupid question, for the last ten years I've worked solely in a text editor.
In Netbeans, I'd like to be able to quickly accept the autocomplete and move on. For example:
$foo["bar
Netbeans will have automatically completed this to:
$foo["bar"]
My caret/cursor is after the 'r' of bar. At this stage I would love to be able to hit one key and move to after the ] or even the " and then the ]. I can use the right keyboard arrow but that is impractical/painful. They must have thought of this by version 8? It really interrupts my flow and right now I'm just retyping the characters myself as it's quicker than moving my hand to the arrow keys.
I've scoured Netbean's menus, help, StackOverflow, Google. I think the answer will be very simple but I'm not sure what I should be searching for. I may just be very dim.
I use the end key to jump past the autocompleted characters.

IE9 : Arrow Keys not working in text area field in popups

We are just testing our application on IE9 and I found an issue regarding the arrow keys behaviour in text area in popup window.
Two arrow keys are not working fine:
1) Left arrow key - When we enter some multiline text in the text field and try to move the left arrow key in last line. Repeated left arrows movement on the line result in the cursor going to the left THEN back to the end of the same line. It does not move to the last of the previous line (as expected).
2) Up Arrow Key - When we enter some multiline text in the text field and try to move to the previous line using the Up arrow key. It does not work.
It will be great if somebody can help me on it.
Thanks in Advance :).
Regards
I have seen many posts on this in other forums, and had some issues with it in web-based applications we use at my work. It seems to be something weird associated with IE9 and ieSpell.
While some forums have said pressing F7 allows you to get around the problem, it doesn't actually solve it, and there doesn't seem to be any acceptable permanent solution. Some say to dump your browsing history, others to turn caret browsing off in IE options.
Generally, there are lots of suggestions to get around the problem, but none to actually solve it.

How can I make the Home key put me at position 1 in Eclipse?

I'm using Eclipse Galileo, with a plugin for PHP development. I use the same editor at work and at home for my personal projects (at work, I do not use PHP or the PHP plugin, however).
One thing about using it is driving me crazy, though, and though I've spent a couple of hours digging through all the different options under Window->Preferences (as well as searching around the Internet), I can't find out how to do this one thing. Maybe someone here can help me?
Here's what's happening. I've got a line of code:
<?php
echo "Hello world"; // <-- I'm talking about this line
?>
and my cursor is on the 'w' in 'world'.
I hit the 'Home' key on my keyboard. In my key mappings, it claims this is supposed to take me to the beginning of the line ('Line Start', to be exact). To me, 'start' means 'there is nothing to the left of this position', aka position 1. As in, no tabs, no spaces, no nothing, and if I hit the 'Left arrow' key on my keyboard, I should then move to the end of the previous line. You know, how your browser works inside of a textarea, and how Word, Notepad, Excel, and almost every other program works.
Instead, when I hit 'Home', my cursor moves to position 5, the very beginning of the word 'echo'. This, in case it's not clear, is NOT the start of the line. It's the start of the non-whitespace content on the line, but that's not the way I expect this key to function. If I hit 'Home' again, I get to the REAL start of the line - position 1. Hit it again, and I'm back to 5.
It's possible that it's not a matter of the 'Home' key at all, but potentially a side-effect of the 'Smart Indenting' function. I also can't figure out how to turn that off (I've seen a few posts here that indicate that it can't be done), and it frequently messes up my formatting which causes me to waste my time fixing it, as I'm particular about how my code looks when I'm coding. For example, when I copy/paste a line, the indenting gets all messed up (the pasted line tabs in to where Eclipse thinks it should be, in spite of all of the preceding whitespace I've copied along with the text on the line). This may be related to the operation of the 'Home' key, or to Eclipse's conception of what the 'start' of the line really means.
I realize that people out there who don't code like I do will have an initial reaction of 'change the way you type', or 'ignore the messed-up formatting and let Eclipse auto-fix it later' or something similar. That's possible, but will take quite a bit of time, and is actively hindered by the fact that I'd be changing the way I work on this one app (in this one setting, as it doesn't do this at work), while all the others will continue to operate as I expect them to. So for me, that sort of suggestion is not a very viable option.
Thanks in advance for any help, advice or assistance you can offer.
PS. If you know of a way for me to keep 'Auto-indenting' on but turn off 'Smart Indenting', please let me know that too.
Untick General > Editors > Text Editors > Smart caret positioning at line start and end. Note that this will apply to all Eclipse editors, not just the PHP editor.