Friday, March 3, 2023

Re: Vimdiff editing text

Thanks, I actually posted this about a week ago.
I figured out I just have to manually delete, yank and put.
I was hoping vimdiff would do and dp.
The biggest headache was sorting the lines, as dates were majorly messed up due to a very old syncing error before the iPhone came out.
I have just watched some awesome vim tutorials and learned about the command 'sort'.  Hopefully this well save time for future edits coming up.
Perhaps once lines are sorted by date, the do and dp my work.

On Friday, 3 March 2023 at 22:58:14 UTC+10 Tim Chase wrote:
On 2023-02-24 22:50, K otgc wrote:
> I'm having trouble moving text from file2 line1 to file1 line8.

If it's just one line as part of a larger change, you can yank it
and either paste it normally or visually-highlight the line with
"V" and paste to replace it (or paste it and then delete then line).

If it's a whole block, you can use "dp" or "do"

:help do
:help dp
:help :diffput
:help :diffget

to obtain the diff from the other window, or put the current diff
in the other window.

This assumes that, in your example, that diff mode has aligned
line 1 of file1 with line 8 of file2. If not, diff-mode won't help
you much in this case, so you'd have to revert to the yank/paste
method.

If that's what you're doing and you're still having trouble, you'd
have to expand on what you mean by "having trouble moving text."

-tim




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/e6ab741e-6c5f-456d-bce6-b13d9a6b9bf8n%40googlegroups.com.

No comments:

Post a Comment