Shift + home no longer highlighting correctly - keyboard

As stated above, when trying to select the content of a field I have filled with Shift + Home no longer highlights the entire seelction, while Shift + End still will select the whole thing from the beginning of the field. Also, when holding shift and using arrows, it will only work when pressing the left arrow, leaving the field highlit. When pressing to the right I can see it high light letters one at a time, but it doesnt keep the entire selection highlit, it just moves on as if it's going to begin with the next letter, and drops the previous ones. I am sure I likely hit a keyboard shortcut combination that disabled this, but am unaware of what I may have struck, and I have been unable to find someone with the same issue while googling the problem.

Related

Text with a dash in the cell but not in the formula bar (Excel)

In cell E1 it says You-Gov but in the formula bar it says YouGov.
If I copy/paste values it stays the same, the formatting is General. Using =CODE(MID($E$1,4,1)) I get a value of 173.
Any idea what is happening?
What you have got here is called the "Soft Hyphen". It's purpose is to let the system know where a word may be broken, if needed, for display purposes.
"The HTML standard states that a hyphen character should be displayed at the end of the line where the break occurs if a line is broken at a soft hyphen. On the other hand, nothing is displayed if the line is not broken at a soft hyphen."
And that is exactly what is happening in Excel. It may appear in-cell but the formula-bar will only show the Soft Hyphen when the word it's used in is actually broken in the editor itself. To test this out, try to squeeze Excel and it's formula bar to a very narrow pane. You'll notice the Soft Hyphen will appear on-and-off depending if it's needed to be shown. It's rather funny that MS even mentioned the Soft Hyphen in their docs but it won't show in the matrix, probably for the same reason.
To solve your issue:
Press Ctrl+F
Select 'Replace'
Search for: Hold Alt and type 0173 on the numpad.
Replace with: - A normal hyphen.
Here is a fun little demonstration from here full of "shy" hyphens. Resize the window to make them visible one by one:
Margaret­Are­You­Grieving­Over­Goldengrove­Unleaving­Leaves­Like­The­Things­Of­Man­You­With­Your­Fresh­Thoughts­Care­For­Can­You­Ah­As­The­Heart­Grows­Older­It­Will­Come­To­Such­Sights­Colder­By­And­By­Nor­Spare­A­Sigh­Though­Worlds­Of­Wanwood­Leafmeal­Lie­And­Yet­You­Will­Weep­And­Know­Why­Now­No­Matter­Child­The­Name­Sorrows­Springs­Are­The­Same­Nor­Mouth­Had­No­Nor­Mind­Expressed­What­Heart­Heard­Of­Ghost­Guessed­It­Is­The­Blight­Man­Was­Born­For­It­Is­Margaret­You­Mourn­For

Select entire text from current line in Linux using a keyboard shortcut

I've been using Ubuntu/VS Code for a week and I've been struggling with text selection.
In my mac if I want to select text starting from a position until the end of the text I can easily do that with Command + Shift + arrow, but I just can't figure out how to do the same in Linux (Ubuntu), CTRL + Shift only works selecting word by word, and sometimes we just want to select an entire row or the entire text from the current position.
Appreciate the help
Put your courser on the point you want to start. Press Shift+End for the end of the line.
If you want to copy the whole line from first to last simply place the cursor somewhere in that line and hit CTRL+C.
Press Home key to get to the start of the line.
For Selecting multiple lines, use Up/Down key.
The best way is, Put your courser on the point you want to start. Press Shift then click the point you want to end using mouse/touchpad.
I tried the CTRL-C suggestion above without any result. (Mint 19.3 Cinnamon)
Accidentally, I found found that the left mouse button, triple-clicked, selects (highlights) the entire row the cursor is in. [Not seen that documented!] I suppose an expert on xdotools might write you a script for that.
Or position the cursor at the starting point and enter
Ctrl+Shift+End (or repeated right arrow) for a document,
Shift+End (or repeated right arrow) for a single line.

intelliJ -> is there any way to scope your search to be within a function

Very often while coding, I need to search for keywords which are common and happen throughout a large file, but I am looking for an instance within a function.
The default search functionality often gives me all results starting from the top. Is there any way/workflow to search only within a specific method/function or block of code?
Update
Do Ctrl + F
Then Ctrl + Alt + E
Type the text to search
On MacOS, it's cmd instead of Ctrl
Original Post
You can do it like this (mentioned keymaps are for Linux):
Let's take as an example the following code, where we will be searching for the word "key" inside the method "clear". As you can see there are many occurrences of that word (in red, highlighted the ones we want in our results, and in blue other occurrences, which we do not want to appear in our search results)
1- Select the area you want to limit the search scope to.
2- Press Ctrl+Shift+F. It will pop up a search window with the selected text pre-filled in the search box.
3- Select the options "Scope" and, in the combo next to it, "Selection" (if they are not selected by default)
4- Type the word(s) you want to search (in this example, the key word).
5- The results shown will be limited to the selected area. Notice how there are only 9 matches in the upper right corner ("Match case" option is checked), despite in the same file there are many other occurrences of the same word.
However, I was neither able to find a key combination in order to do this as a single action nor assign a new one. Also, notice how the search includes the text in the method documentation.
Tested using IntelliJ IDEA 2018.1.4 (Ultimate Edition), Build #IU-181.5087.20 on Ubuntu 18.04
Looks like we're finally getting this feature in IDEA 2019.3:
https://blog.jetbrains.com/idea/2019/09/whats-new-in-intellij-idea-2019-3-eap-2/ (Ctrl-F for subtitle "Ability to search in a selected area when using the Find action")
It’s now possible to search only in a selected area using the Find action (cmd+F / Ctrl +F). Simply select the code piece you need in the editor and invoke the Find action and the IDE will perform the search only in the selected area.
Screenshot from the article (was a GIF originally)
There is a way to search inside a method, however, it doesn't seem to work for other scopes.
When searching in file as usual, click "Find all"
You'll get a list of results in the bottom panel. If you enable "Group by file structure" (I had it disabled by default), you can get a list of matches for a particular method.
On IntelliJ in Mac:
In a file select the specific block in which we want to find
something
Press CMD + F
Press CTRL + OPTION + G
Notice that the cursor has automatically landed in the find toolbar's text field
Type in what is intended to be found
Press enter to move the cursor
to the first occurrence.

Vim real tab characters start at column 8- I can't move all the way left

I'm using real tab characters in my files, and when whitespace characters are set to invisible (which it is by default), then the farthest left I can go is column 8. But if I make whitespace visible (:set list!) then it still says that I'm at column 8, but it at least shows my cursor all the way to the left. What could be causing this?
This is not a matter of correct or incorrect. Vim just chooses to put the (single cell) cursor on the last cell of the Tab, and the jumping forward movement probably makes Tabs easier to detect, so most people like that behavior. Only with :set list, where a Tab is represented by a start and follow-up characters does this change.
If you really can't get used to it, the only workaround (short of modifying Vim's source code directly) is:
set list listchars=tab:\ \ " Note: trailing space after the last backslash!
Note that this has other side effects, e.g. when soft wrapping words.
It's not a bug or a problem, other than a visual annoyance. In the upper screenshot your cursor is at first character of the line. Try a character modifying command like rx on it, you'll see.

Vim: reverse visual mode perspective

Let's say you're using vim to select in visual mode. You hit v, then start moving to the right with l. Then, let's say you wish to extend your selection to the left, without changing the point at the right. That is, you're satisfied with '> but want to change '<.
How do you swap so that it is as if you started at '> and are selecting to the left, changing '<?
I have a vague recollection that I've seen this before, but it's hard to google for.
Oops, amazing how posting to stackoverflow can make reading the (F) manual that much easier...
3. Changing the Visual area *visual-change*
*v_o*
o Go to Other end of highlighted text: The current
cursor position becomes the start of the highlighted
text and the cursor is moved to the other end of the
highlighted text. The highlighted area remains the
same.
o
From the documentation:
o Go to Other end of highlighted text: The current
cursor position becomes the start of the highlighted
text and the cursor is moved to the other end of the
highlighted text. The highlighted area remains the
same.

Resources