In- and out-points in TextMate.app - textmate

This could be more of a Superuser question, but here goes:
I find myself deleting large amounts of text all the time, I do so by holding Shift-Arrow followed by Delete. However I would love to be able to delete in the way you edit in a video editing application, by adding in- and out-points.
You would press the "IN" keyboard shortcut where you would like the edit to begin and the "OUT" where it should end, followed by delete.
Is this crazy? Is there a way to do this in Textmate?

The cursor doesn't move when you use page-down or page-up, so you could just place the cursor at the beginning of the text, move the pointer to the end of the text, or page-down to where the end of the text is and move the pointer to the end, then hold the shift key down as you click after the last character you wish to delete, and all of the text between the first point and the second will be selected. Then you can hit delete. This will work in either direction (select start then end or select end then start).

Related

VS: Shortcut to delete word

I've been looking all over, but can't find the following shortcut:
Does MSVC 2022 have a shortcut, either builtin or via an extensions, to delete the word under the cursor?
I know that Ctrl+Del deletes from the cursor to the end of the word. Ctrl+Backspace deletes from the cursor to the beginning of the word. Ctrl+w selects the current word. But, I can't find deleting the word under the cursor in just one shortcut. I usually do Ctrl+w, followed by backspace.
Another shortcut I wish it had, but which I'm pretty sure it doesn't, is jumping to the vertical and/or horizontal middle of the text window. This is to complement Ctrl+PageUp/PageDown, which jump to the top and bottom of the text window.

Xcode Editor text selection issue

If I want to delete few lines of text in most of text editors, not touching some words on the bottom line and the whole upper line, I put cursor on the bottom row leaving all unnecessary words to the left of the cursor. Then I select few lines vertically by holding Shift + ↑. I stop on upper row and get some selection: part below + right part of the upper row:
In this example I want to get rid of if word and an empty space between the function header and the code, not touching the function header (even hough let will stick to the opening bracket {).
Normally (not in Xcode) I would still hold Shift and will press cmd + ➝ to deselect the right (selected) part or the top row.
Result will be like this:
I can simply press Delete and job is done.
However, in Xcode such shortcut usage makes bottom row fully selected (till the right) and not changes upper row selection:
Same thing happens if you select from top to bottom and you need to remove extra selection from the bottom line.
I tried to rebind shortcuts in Preferences but didn't find a solution.
This example is very particular and maybe not the best, however I face such selection problems only in Xcode and have to use mouse which is not handy.
This is a rather old question, but what you want is fairly simple to achieve. If your cursor is between the if and the let, you would only need to press option-shift-left arrow twice. The first time, it would select the if and the leading tabs, and the second would select the empty line.

Cursor between the wrong characters when clicking an inactive NSTextField with the "Truncate Head" Line Break

I used Interface Builder to create an NSTextField and set its Line Break to Truncate Head (because if its text is too long to display all at once, I'd rather see the last few words than the first few).
My problem is that the modified Line Break compromises my ability to place my cursor in a specific position when making the NSTextField active (a.k.a. First Responder) by clicking the mouse. In this example, the NSTextField is not active, and I attempt to place my cursor between the "L" and "A" in "lazy".
After clicking, the cursor appears before the word "over".
Clearly, the NSTextField is ignoring the modified Line Break, and positioning the cursor as if it were the default. Can I achieve the effect of Truncate Head but keep the ability to place the cursor in a specific location by clicking?
I had the idea to record the mouseDown location, compare that to attributedStringValue's size, and calculate where the cursor should go, but I quickly got in over my head.
Original question: NSTextField keep scrolling at the end
I have the following silly problem:
I placed a single-line NSTextField on my View. The idea would be that it contains a long URL, but in my case mostly the ending is interesting.
So I would like the content to appear like scrolled to the end (so the beginning is not visible if it is longer than the textfield). The problem is that I do not know how to set this properly. I tried the "Text Direction" option to Right To Left which then displays properly, but as soon the user clicks on the field it jumps back to the beginning, thus confusing the user.
Please let me know what I am missing.
Thanks!

Visual Studio: Is there a keyboard shortcut for search in the current line?

When editing code in VS, I typically use Ctrl+G to move to the line number that I want. It would be really nice if there's another keyboard shortcut that would allow me to move to the word that I want on that same line as well regardless of the cursor's position.
Example:
Say, I just moved to this line:
quint32 beamNum; // Number of beams
and say I want to move to the word "Number"
typically I have to press Ctrl+→ a few times (in this case exactly 4) to get to the word that I want. Imho, this is not fast enough.
I did try using Ctrl+F but it doesnt work for all cases because sometimes I want to search backward and if "Search Up" is not checked, it then becomes too slow.
Just wondering if anyone knows of such shortcut, if one exists.
So, Ctrl+G will take you to the first column of the line. Then, you can press Ctrl+I (not an L) to begin an incremental search. Now, start typing the word that you are looking for (case sensitive) and the IDE will move to the first match of what you're typing. Hit Enter to end the incremental search.

how can i move the cursor in insert mode in viemu (w/o using the arrow keys)?

sometimes i just want to move either left or right a couple of characters (or go to the end of the line) but don't really want to leave insert mode just to move a couple chars.
I don't know about viemu and visual studio, but in vim, you can use <Ctrl-o> to enter a single command while in insert mode, so <ctrl-o>2l will move you 2 characters to the left, and <ctrl-o>$ will move you to the end of the line.
There is no way of moving the cursor which is easier than just using the arrow keys, thats what they are there for. Insert mode is for inserting text, not navigating the file. If you would like to be so pedantic about not using the arrow key then there is a solution for you:
press
use 'HJKL' keys until at destination
press 'i'

Resources