How to get differentiate between autocompletion and text entering - winapi

ALL,
Is it possible to differentiate between selecting the string in the autocompletion list or by just typing the string from keyboard?
Thank you.

Related

How to prevent auto-complete popup display after comma or colon?

I just updated my Sublime Text version (Build 4107), and it seems to me a new behaviour appeared - that I would like to avoid.
Whenever I write a colon or comma, the auto-complete popup automatically displays, which is problematic because most of the time in this situation I am about to go to next line by pressing Enter. Thing is, if press Enter, I select now the first occurence of autocomplete instead of going to next line.
I can avoid this by doing "Alt + Enter" or by pressing "Esc" before Enter, but it is not a convenient solution. Is there any way to prevent this autocomplete popup to display afer this particular punctuation signs ?
I read about punctuation.separator scope naming (https://www.sublimetext.com/docs/scope_naming.html#punctuation). But I can't figure out how to use it in auto_complete_foo settings to do what I want.
Example :
Thanks for the help !
If you have a package SublimeCodeIntel, try to disable it, and check the problem is saved or not
It helped me
You can set "auto_complete_when_likely": false, in your user preferences which should prevent this behavior.

Notepad++: last occurrence of string

I want to find the last occurrence of a string in a large text file in Windows. Is there a way to do this using Notepad++ (also do suggest methods beyond Notepad++ if you know a better method)?
I don't want to install any add-on or anything else, if possible.
Thanks.
Just press Ctrl+F or from the Menu - Search -> Find
and then type your string in search field.
In direction choose Up, and it will start from the end.(Make sure you haven't point your mouse anywhere on the text before all this, or it is before the first character in the file.)

Is it possible to Customize the Text input Scope of Textbox?

in my application I used a Textbox with input scope "text". When I type in Textbox, I can see a suggestion bar above the keyboard which contains some words.If I type a in Textbox I can see the words "and","are","at"...etc.I want to customize these words.
for example if I type "a" I want to show the names "alan","alex"..etc.
Is there any way to change this?
Please help me
Is there anyway to customize the words appearing in the auto complete suggestion bar for text input scope in
You also can't do anything AT ALL with the keyboard. If this is for a custom app, perhaps a list would work such as the list in the people hub for example. Pretty sure MS isn't releasing any keyboard API's for WP8 either, so the only alternative is a workaround or alternate method.
There is no way to control text suggestions in the auto-complete bar. You are only able to choose type of input scope and no more.

How can I find and replace inside a selection in Xcode?

In Xcode < 4, you could hold the "option" key, and the "Replace All" button would change to "Replace in Selection". As of Xcode 4, this does nothing. Anyone know if there's a new way to do it, or is it bug filing time?
This appears to be working again now, at least in Xcode 4.4.1.
When the find/replace bar appears at the top of the editor, holding down the option key on the keyboard causes "Replace in Selection" to appear in lieu of "Replace All."
I'm glad, because this was an ANNOYING omission.
Another workaround:
In Xcode, select the text, press copy
In a terminal session:
pbpaste|sed 's/SOURCETEXT/NEWTEXT/g'|pbcopy
Return to Xcode window, press paste
Since the original should still be selected, it will just be replaced. You could probably build a simple shell script to do this.
Doug
An few images to supplement the chosen answer:
And holding down Option:
See also
Find/Replace in Xcode using Regular Expressions
Seems like missing functionality. You should file a bug report.
I'm upset that they took out this functionality, as I used it constantly, but here's my workaround. Copy your selected text from Xcode4 to TextEdit or some other word processor, do the find and replace there, and then copy the results back into Xcode.
It's not sexy but it's worth it if you do a lot of these "find and replace on my selection", and you leave the word processor open in Spaces as you work.
They should add "my selection" as an alternative to "workspace" and "my scope".
There is another way only replace the matches you find, rather than just this one or all of them.
I suggest you save a copy first, just in case....
In Find and Replace, Show Find Options (you can do this by pressing the magnifying glass).
Press Preview.
Uncheck all the ones you don't want replacing.
Press Replace
Hope that helps, it did me.
Not ideal, but not too bad:
Do a find and replace in workspace (cmd-opt-shift-f) enter your desired find/replace
Enter your desired search term and hit return
Select the range of replacements from the list of matches on the left
Hit replace (not replace all)
To replace text in a selection using Xcode 9
Press Option-Command-F to bring up the find/replace box.
Enter the search and replace string. Changing the search string will lose any existing selection, so..
Make your selection (again). (If you don't do this, the selection will be the first search string found only)
Hold down the key and "Replace All" will change to "Replace Selection", then click it.
Once you understand that you make your selection AFTER you have entered the search string, then this is not that clumbersome and works fine.
I find alt-command-f easier for local find and replace (4.3) and then working around your selection.
EthenA.Wilson asked in a comment to the OP a couple of days ago:
"Is there a way to do this in Xcode 5?"
For the benefit of those who, like me, had been searching for it, here's how:
After you put your Find and Replace terms in the bars at the top left-hand side of the editor page, select the text you want to search in, then look at the top right-hand side (same bar). You'll see where it says "All", right next to "Replace." Now press the Option key. "All" will change to "All in Selection." Click it, and you're done. Could be a bit more intuitive, but the functionality is there in Xcode 5.
Naturally, good idea to take a snapshot before you click!
HTH!
Not sure which feature prior to Xcode 4 you're referring to, but the shortcut Command+Shift+E gives you "Use Selection for Replace". If you're talking about "Find and Replace in Workspace" (Command+Option+Shift+F), then what you need to do is run your find and then hold down "Shift" or "Command" on the selections shown and then hit "Replace".

How to make Xcode auto-complete act like bash auto-completes file names

If I type UITa, then it might show an autocompletion of UITableViewDataSource. So I press enter and that's what I get. But what I wanted was UITableViewDelegate. If this was when we input the file name in the command line of bash, then it would have auto-completed up to UITableViewD, and then I would have to enter a to get an autocompletion for UITableViewDataSource, or e to get UITableViewDelegate.
Is there a way to make Xcode work like that, or another way to avoid this problem?
In my machine (XCode 3.2.3 on OS X 10.6.4) the auto-completion works exactly as you described you want to behave.
Typing
NSMut
shows something like
NSMutableArray
Note that NSMut, able, and Array are all displayed in a different color/font in XCode.
Typing D here to change the completion to NSMutableDictionary does not work, but hitting Enter or the right arrow key changes the selection up to
NSMutableArray
Hitting D here changes the completion to
NSMutableDictionary
If you want the possible list of auto-completions, just hit the escape key. Hitting escape key is the general way to get the list of completion in any Cocoa app on OS X. In any Cocoa text box you'll get the list of English words which matches the first few letters you typed.
Xcode autocompletion can be inconsistent. Workaround: After typing some characters, hit ESC and Xcode will pop up a scrollable list of completion options. Continue typing to narrow down the list. Use the up/down arrow keys to navigate the list. Hit return to complete using the selected text. This approach can be helpful when Xcode autocompletion is acting flaky.

Resources