Computer: Programming
move into code block - key   (-1)  [vote for, against]
keyboard shortcuts help you move the next block of code into this one

IDE code editor enhancement:

You have code like abcd } efgh ijkl
and you want to move the curly bracket down past the ijkl.

Or: You have code like abcd) efgh ijkl
and you want to move the closing parenthesis past the ijkl.

You are standing on the space past the abcd. Click the alt+ctrl+rightArrow it skips to the first letter after the parenthesis/bracket/semicolon. A second press moves on past the next parenthesis/bracket/semicolon.

Shift+rightArrow or Ctrl+Shift+rightArrow as usual to mark. now alt+ctrl+leftArrow cuts the marked text, goes back to the place you where at when beginning the action, and paste-inserts it there.

The text is initially newly formatted (with indentation, new line and all) but a ctrl+z will bring it to unformatted. A second ctrl+z will undo the whole action.
-- pashute, Aug 24 2015

A list of text editors https://en.wikipedi...ist_of_text_editors
A long list of text editors [popbottle, Aug 24 2015]

vi ?
-- FlyingToaster, Aug 24 2015


Seems as if a fairly simple key macro could accomplish this. My favorite editor with macros is b (brief) by underware.
-- csea, Aug 24 2015


Linux has an editor called "nano" that can delete 1 line at a time with a control-key stroke. Multiples of that yield multiple lines deleted. Another control-key stroke can restore all the deleted lines at once --and if you have moved the cursor to a different place in the text, that is the place where the restoration happens.

I do understand that you are looking for a finer degree of text-moving than that, but so many editors have been around for so long, that it is difficult to think what you want hasn't been implemented somewhere.
-- Vernon, Aug 24 2015


It's likely that what you're suggesting has already been baked, somewhere, since many text editors offer extensibility so you can add your own keystroke shortcuts to do whatever you like, including finding the previous trigger character and marking it as the start of something, then finding the next trigger character and marking it as the end of something, then cutting that something, then finding the required target position and pasting something in. The smart ones even have access to the whole of your machine and the internet, so they could theoretically order up a freelance coder in Chennai to do the find-mark- cut-move-paste operation for you. How far do you want to go with this new shortcut?

By the way, I hate this idea. There are already more keystroke shortcuts in my preferred editor than I can remember.
-- Tulaine, Aug 25 2015



random, halfbakery