How to select non-url text with Vimperator? - firefox

I'm using vimperator 3.5 with firefox 17. Everything goes well except non-url text selecting. It seems that nothing about this described in the official help document. Everytime when I want to select some non-url texts I have to use my mouse to finish it. It's really annoying.

Jumping to the point to start your select
You can use / to find whatever you want to search and use n to go to specific locations.
Selecting
Once you are there, type c to enter CARET mode where you can use hjkl to move around and use v to select just like vim.
Coping
Also use y to yank. Happy vimp!

If you select wanted text with mouse, use
Y
to copy selected text.
Good cheatsheet:http://sheet.shiar.nl/vimperator

The answer by xxinerKYU is great but according to the reference page at liberator://help/various#various is seems that i is the key to caret mode.

Related

Change hard-coding number along all my code

I have to take some long code that I wrote when I didn't know too much and change all the hard-coded numbers to something else .
The numbers are positions on screen, and now I need to make them relative to screen size.
So every 160 on code should turn into winSize.width/2, and 80 = winSize.width/4.
Is there a simple way to do that in Xcode?
Press
Command+F
when you are ion the file which needs changes.
You will see a bar at the top. On left side there is Find written. Click on it. Yoy will get an option Replace.
Choose Replace.
In String Matching write 160.
In below filed write winSize.width/2. Click on Replace All button.
Do it for value 80 as well.
Or Right Click -> Refactor... -> Rename also works as well as F&R. It gives you an automatic diff like preview of the changes as well, which I think F&R does but you have to click an additional button to get at it.
You can use the Find and Replace from the Project Navigator view

Sublime Text 2—Quickly find something on a page

I've been trying out Sublime for the past few days. Long-time TextMate user.
The one thing I struggle with most is finding stuff in a document. I can use CMD+r to find a selector, but what if I'm looking for something else, a comment maybe, or something else?
If I use CMD+f, Sublime will put a box around all of the instances of my search term, which isn't what I want either. Worst, it keeps a box around all of the instances:
http://cl.ly/1T3x0i2L0j2u1a0E0M12.jpg
I need to "disengage" the find before I can move on.
Is there a TextMate "QuickFind" (Ctrl+s) equivalent in Sublime Text?
I find searching/navigating through a document in Sublime to be really, really frustrating.
After looking for a very long time, I've found it. The Sublime equivalent to Textmate's quick search/find is Find > Incremental Find, or cmd+i.
Now, I'm officially a Sublime convert.
Worst, it keeps a box around all of the instances (see screenshot: http://cl.ly/1T3x0i2L0j2u1a0E0M12). I need to "disengage" the find before I can move on.
To disengage find in sublime text 2 just press Esc key.
On top of using Find as per usual, if a find is for a small amount of characters that would appear 50 times on a page, use the EasyMotion plugin which does that old Vim deal:
You hit the EasyMotion key, hit the character you want to match, then Sublime replaces all visible instances of that character with a letter, number, etc - you then hit that replacement character on your keyboard and the cursor moves to that particular instance of the character you wanted. It's a bit confusing to explain but basically, it lets you teleport to absolutely arbitrary points on any page in 3 key presses.

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.

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".

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