Word-Sliding - Million Dollar Software Idea ;-)

@First_Ape_Kid :
Please correct me if I am wrong. You would want to move a sentence / parts of a sentence / a word to some place else with in the same section / paragraph / sentence.
On Windows version: We could double-click on the part / word or sentence to be moved and once highlighted, we could drag-and drop this selection onto its destination. Please let me know if this solves your requirement.

Sorry, but I don’t get it.
If we are talking about a group of words, it implies that there is first a selection established, in which case it already works so by drag and drop.

If we are talking about moving a single word, there would need to be a modifier key involved (as otherwise you couldn’t drag select anything), which is no harder than double click then drag.

What did I miss ?

Personally, the only thing that I could see improved as regard to reordering words in a sentence is auto-space management. So that you could move words around without worrying about the spaces.

You haven’t missed anything. It’s just as you say.

But different people have different needs.

So imagine the cursor is in a certain word. Now you could use a shortcut to highlight that word and use the arrow keys to move it to the left or right in the sentence.

I am not dismissing anything.
As I said: What did I miss?

Having such a special function for arbitrary selections does not make a lot of sense to me, nor does it for single words. The trouble is that there would too often be a lot of subsequent arrow-keying (moving char by char or word by word). More efficient to just use the existing drag and drop.

To my mind, the only case which might make good sense here is keystrokes to move one sentence among others. This is comparable to the existing function that moves one paragraph among others. In both cases there is a fundamental unit of selection and movement.

(There would inevitably be annoyances with such a function — when it failed to grab just the sentence chunk you had in mind — because sentences take a lot of forms.)

Interestingly enough, that is one of the main reasons my sentences in my early drafts are actually paragraphs.
And when I need to go back, I use this:

U la la! This is my man!

at least on the same page. i think if I am moving it from top to the bottom of a document it doesn’t make sense. but to move one word in a sentence why not

Ookay. I thought of a mouseless solution, but that is also new to me. thanks for that. When did I miss that? better I won’t ask in how many software this works and how long this is already with us. This can only have been was addressed in the unread newsletter.

yes and with words it would be the same as with paragraphs: if you move one paragraph nothing has to be selected it depends on your cursor-position. would be the same situation with words, or you have doubled spaces

thanks to you too for pointing out that function. Talking means learning.
And sure - involved modifier keys are necessary and welcome. And I can’t, and I don’t want to disagree to your point: it’s easy and not hard. I’m with you. It isn’t really hard with cut and paste, either.
please don’t get me wrong here - at the end of the day this doesn’t matter to me, I will sleep as deep as ever. But there’s some kind of mouseless “movement”. With Alfred and these apps - just look to the new functions in Spotlite on macOS. Because of some screen workers - who have two or three monitors to work with the whole day - it’s mostly not just drag and drop. It’is grabbing the mouse. It’s searching where the mouse pointer was. And that with a cursor besides or in the word you want to re-order…? You got it I think… it is easy and it is not hard for no one - so true - and … sometimes (in the end, I guess) it’s a workflow question - for some of us. And I won’t fix it my lifetime, that’s for sure - I can promise, I’m just a user, and don’t belong to the code side. So I shared what came up, because I can’t see that I am the only one who is confronted with these unnecessary thoughts. :stuck_out_tongue_winking_eye:

I’ve never heard of… and don’t know what you mean by this. but perhaps that the spaces could be the breaker for a smooth working solution? :slightly_smiling_face:

Which words ? How would Scrivener know ?
(If you mean the ones you just selected, technically you already have your mouse under your hand.)

That already clarifies a lot of it.

Take the forum for example. If you edit something you write as a new post, the space is selected as well as the word when double-clicking, and is in many text editing software, logically handled afterwards.

Forum: image

Scrivener: image

I sat down and made a pair of Keyboard Maestro shortcuts for moving sentences with respect to other sentences. Crucial to this is Scrivener’s handy Select Sentence function. While the thing is definitely doable in KM, the chief challenge is accomplishing it in a way that is not visually disconcerting. This basically means the routine must select both sentences and replace them with the switched order in one go. Ideally this would give the visual impression of simple movement. I only got close to this with KM: getting the whole selected at the end, yes, but then only got so far as pasting the sentences and obligatory space in sequentially, so there is still a confounding visual disruption. Tried to composite the parts in a variable and then paste , but that didn’t work for some reason. (Maybe if you were a markdown person and worked in just plain text that part wouldn’t be a problem either.)

Such a macro will be thrown by inconsistency in spacing, and mine won’t cross paragraph boundaries.

And, yes, sorry to tell you F_A_K, dragging selected text around is a well established thing!

I have a macro that uses parts of that for other purposes…
My point being:
Have your paste operation be like → space - paste - space.
Follow this by Ctrl-Space, programmed or not ; (that clears any double spaces).

Yep

Like others mentioned before: When it is about moving something somewhere Drag & Drop is the solution as something could be anything and somewhere anywhere.

And if the position where something is supposed to be moved to is fixed it can get tricky: Moving per paragraph? Easy because paragraph endings are defined. Per pages? In Scrivener? Per sentences? The period used at the end of abbreviations does reliably fool the automatic spell check. And so it would fool the moving script. On the other hand, it would be the user triggering it who could just hit the key code twice or even more. That would not be perfect but faster than without.

That said, I don’t at all think these suggestions are a bad idea. The text movements needed just might vary strongly from user to user. (For example back in the dark ages when I wrote in Word I had a macro—linked to a function key for most easy access if I remember correctly—that swapped the two characters left of the cursor to correct a typo common for me. Why I don’t use an equivalent today? These kinds of typo became less common when I got slower I guess…)

And that is why I think scripts are the solution. Scrivener in general is not scriptable but the active window (of a Mac app) is. That means a script would work in any writing app which is a huge gain—the muscle memory loves it!

The aforementioned Keyboard Maestro which I for some reason unbeknownst to me do not use could be one solution. On mobile devices there isn’t anything like it but in Drafts you can get any text manipulation you can dream of.

One very specific caveat at the end: Try whatever script/action/macro or whatever it is called on a text chunk that has inspector footnotes. Because when the clipboard is involved theses footnotes might get broken.

Hmm it didn’t work for me. Must be doing something wrong.

Make sure you have focus on the editor?

I see, it only works in Scrivener.

This does seem to work in Scrivener only, but I didn’t check thoroughly.

This is useful, esp. in metered poetry, maybe legal stuff.

Works as advertised for me. I’ve never heard of this in all my years and will be using it until I can’t. :grin:

I find drag & drop, since Monterey, to be finicky, so this is great for how I work.

Pretty sure this feature belongs to Scrivener (it doesn’t work in TextEdit or Pages). But it’s not the only software, e.g. CotEditor moves lines up and down with the same shortcuts. Obsidian can do it, but doesn’t come with shortcuts for these functions out of the box. Assigning (and ) works.

I use it all the time.
When outlining a chapter, I make each idea and detail a paragraph, and this makes reordering them and trying out stuff easy.
BTW, it also works with multiple consecutive paragraphs selected. :wink:

Moving paragraphs up and down works also in Word. It is a provision for their Outline view mode, but works in any mode. The command items are called ‘Outline Move Up’ and ‘Outline Move Down’. I set key commands for these ages ago – super useful. (Ditto in Scrivener.)

In current MS Word, I am not seeing these commands under Customize Keyboard > All Commands, so they may be hidden or deprecated.

While we are on the topic:
you could also click on “Control” key (before clicking on the highlighted section) and then drop at destination for a “Copy and Paste” effect.

It has just come to my attention that Scrivener has a feature to highlight the sentence the cursor is in. In combination with “move” this is really useful.

Embarrassing, I have been working with Scrivener for many years and had no idea about this feature.

Now that I know, it helps me a lot. :joy: