How can I get rid of these arrows in VS Code? - visual-studio

I mistakenly placed some key on the keyboard and as a result of which these arrows have started to appear whenever I select some text. How can I get rid of these?

Those look like tab characters. Maybe View -> Render Whitespace is checked?

Related

Xcode 8 and 9: how to disable code completion when clicking "Tab"

I often use Xcode snippets which contain fields to fill (like <#time_interval#>), I jump between those fields with tabulator. Sometimes, when I fill a field with a word and click tab to jump to next field, Xcode automatically changes word to first suggestion from autocompletion dropdown, e.g. HelloWorld. I don't want to disable suggestions, I just want to disable completing my code on clicking tab. Is there a way to do so? I feel extremely dumb because I make iOS apps for over 7 years already and this setting drives me crazy. It should be something simple somewhere and I must have missed it over and over.
UPDATE for clarification (images):
Click tab and enter one field to fill it:
Type what you want to have there e.g. "literal" word:
Click tab again to pass onto next fillMe field. Expected result:
Actual result (instead of word "literal" you get Color Literal there which is the first position in autocompletion list):
You may use CMD+Z as a workaround - it will revert Xcode autocompletion and leave everything else as is.

Sublime Text 3 unable to find text that is plainly there

Hitting cmd+f to find text in SublimeText, I frequently see something like:
Clearly 'someText' exists on the page. Why can't Sublime find it?
Note this sometimes seems to work, and sometimes fails. I can't work out the difference though.
How can I reliably find text with Sublime Text?
I've tried to reproduce this problem with Sublime Text 2 and this is what I found:
If you place caret before the text and the hit find, the text will be found
If you place the caret after the text and then hit find, the text will not be found
It seems that Sublime Text doesn't wrap search by default. You can enable it by toggling the button with the arrow icon (second one from the left of Find what, its tooltip should say Wrap). Then the search works regardless of the caret position.
Look at the buttons right before search box. Sometimes they are just get disabled accidentally, mis-click, or the short-cut get trigged, then the search doesn't behave as expected.
From left to right, RegExp, case sensitive, whole word, wrap(search whole doc, not just below current line), you can see them with mouse pointer hover.
I strongly suggest you to disable those shortcuts to prevent unexpected toggle of these :)
Also, turning off the regex may help you in searching for symbols which have special meaning in regex. For instance, someText(foo) will not be searchable in regex mode without escaping the brackets or putting the search string in quotes.

What are these yellow spacers in Xcode?

Just came back to my desk and Xcode keeps highlighting/underlining white space in files. If I type something it goes away, but if I switch tabs and come back, they reappear.
UPDATE: this isn't caused by the "show invisibles" option. That looks different (try it).
You seem to have a search active. Look in your search bar at the top and you should find a " " character. Xcode is highlighting all instances of the matching space character.
Go to Editor > Hide Invisibles in the toolbar. It's showing all the invisible characters in the document, including spaces.

Xcode4, I use to be able to select some text and right click and search on that text in xcode3?

In Xcode 3 I use to be able to select some text, right click and search for that text.
However in Xcode 4 this seems to have disappeared ?
Is there a quick alternative instead ?
EDIT
I'd select some source code and it would find all occurences in the rest of the source code.
Select text; cmd-E
Then Shift-cmd-F; return
Boom.
Select your text, hit command-E ("use selection for find") and command-G to iterate through results.
Find in Workspace appears to be fundamentally broken in Xcode 4.
Someone else posted a workaround: toggle the Assistant Editor button to enable the menu item. However it still is not available for text in the debug output area.
Search in workspace (you can read the keyboard abbreviation in Edit -> Find -> find in workspace
You can always try some keyboard shortcuts combination once your text is selected:
command+C
command+F (if you want to
search in the current file, otherwise
shift+command+F to look into the
whole project)
command+V
Then you can iterate through the results with command+G to go forward or shift+command+G to go backward.
Hope this helps.

Xcode auto-completion - replace text keystroke?

Say we have a TestClass with the 2 methods, -getSomeString and -getAnotherString, and we are editing the following code and the cursor is in the location shown:
NSString *aString = [TestClass get<cursorIsHere>SomeString];
Say I want to change it to use -getAnotherString. If I bring up the auto-completion popup and select the other method via hitting enter or tab, I'm left with:
NSString *aString = [TestClass getAnotherStringSomeString];
i.e., it doesn't replace the existing text but rather just inserts.
Is there a special keystroke to make it replace the remaining text?
See IntelliJ for reference.
I don't think that there is a one step operation to achieve this. My suggestion would be similar to Thomas Templemann, but rather than two steps of forward word select and then Delete, I would expand to the desired autocomplete, by bouncing on Control + . and then hit Option + forward delete, which kills to the end of the word.
I don't think so. I have always used the following
double click on getSomeString
press Escape (or your autocomplete key)
find replacement method
that double click step has never really bothered me, but I would be interested if anyone knows better!
My work-around for this problem is this: Since the cursor will be right after the inserted text, I just press Shift-Option-Rightcursor, which selects the word past the cursor, then I hit the Delete key.
You can use the Tab key to perform "replace" instead of "insert" when choosing the method from the auto-complete popup in IntelliJ 9 (don't know if it's available in previous versions).

Resources