Tuesday, January 2, 2024

Re: DirDiffVim for folders, but files are missed?

Thanks, I actually did use Meld, great GUI.
However, the sorting process needs digital automation.
Manually moving 1000's of files on several accounts is too slow and I haven't figured out how Meld could do that?

On Wednesday 3 January 2024 at 05:30:06 UTC+10 meine wrote:
On Mon, Jan 01, 2024 at 07:03:31AM -0800, K otgc wrote:
> Hello,
> I have Google Photos downloaded and I'm trying to sort out the mess of
> duplicates.
> I usually use vimdiff for file content, however this needs files in
> directories compared.
>
> Running command vim -c "DirDiff dir1 dir2" -> select Enter -> DirDiff.vim
> correctly shows folders only in dir1 and dir2.
> However, I need dir1's files that aren't duplicates of dir2, to move into
> dir2.
> How can I manage this please?

Since you are looking for a difference or resemblance in files and not
per se contence, I suggest using a command line tool like `diff` or a
graphical program like `meld`.

Both will provide you with differences and alikes in name, date, size,
etc.

Vim and vimdiff are for comaring text files, and you seem to need
something different.

KR,

//meine

--
--
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/cf15af56-f3a2-4705-9f40-9581efba719cn%40googlegroups.com.

Re: Function to find all matches in a string?

On Saturday, December 23, 2023 at 2:35:52 PM UTC-8 Tim Chase wrote:
I was looking for something similar to Python's re.findall()/finditer()
function to answer a question on Reddit[1] but was surprised I
couldn't find anything in

:help function-list

The general intent would be to take an input string and return a
List containing all the sub-strings matching a pattern like

let matches=findall('amwenxipyuqz', '[aeiou]')

would set matches to

['aw', 'en', 'ip', 'uq']

I was able to cobble together a hack-job in this case, but I'd hoped
to be able to do something like

:let a=[] | g/#\w\+/call extend(a, findall(getline('.'), @/))

Does such a function exist and I just missed it?

Thanks!

-tim

[1]
https://www.reddit.com/r/vim/comments/18pcd84/the_vim_way/kenedxq/


[Retrying.. as my first attempt to post did not seem to go anywhere. Apologies if this is a repeat]

It looks like substitute() is the closest to what you want to achieve. Perhaps you can add submatch() to get the result appended to the list. Something like this in mind:
   :let a=[]|g/#\w\+/call substitute(getline('.'), @/, '\=extend(a, [submatch(0)])', 'g')

Regards,
-Arun 

--
--
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/803cdfe5-8ca4-44ba-850c-d3a81985ca7an%40googlegroups.com.

Re: Function to find all matches in a string?

On Saturday, December 23, 2023 at 2:35:52 PM UTC-8 Tim Chase wrote:
I was looking for something similar to Python's re.findall()/finditer()
function to answer a question on Reddit[1] but was surprised I
couldn't find anything in

:help function-list

The general intent would be to take an input string and return a
List containing all the sub-strings matching a pattern like

let matches=findall('amwenxipyuqz', '[aeiou]')

would set matches to

['aw', 'en', 'ip', 'uq']

I was able to cobble together a hack-job in this case, but I'd hoped
to be able to do something like

:let a=[] | g/#\w\+/call extend(a, findall(getline('.'), @/))

Does such a function exist and I just missed it?

Thanks!

-tim

[1]
https://www.reddit.com/r/vim/comments/18pcd84/the_vim_way/kenedxq/


I think substitute() is the closest, perhaps you can use submatch() for appending to the list. Something like this in mind:
  :let a=[] | g/#\w\+/call substitute(getline('.'), @/, '\=extend(a, [submatch(0)])', 'g')

Regards,
-Arun

--
--
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/326eaaa2-334b-4fff-999c-86e95a72bff2n%40googlegroups.com.

Re: DirDiffVim for folders, but files are missed?

On Mon, Jan 01, 2024 at 07:03:31AM -0800, K otgc wrote:
> Hello,
> I have Google Photos downloaded and I'm trying to sort out the mess of
> duplicates.
> I usually use vimdiff for file content, however this needs files in
> directories compared.
>
> Running command vim -c "DirDiff dir1 dir2" -> select Enter -> DirDiff.vim
> correctly shows folders only in dir1 and dir2.
> However, I need dir1's files that aren't duplicates of dir2, to move into
> dir2.
> How can I manage this please?

Since you are looking for a difference or resemblance in files and not
per se contence, I suggest using a command line tool like `diff` or a
graphical program like `meld`.

Both will provide you with differences and alikes in name, date, size,
etc.

Vim and vimdiff are for comaring text files, and you seem to need
something different.

KR,

//meine

--
--
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/ZZRkMSb44ZGixvIm%40trackstand.

Re: Building a Reactive Library from Scratch in Vim 9 Script

Whatever happened to "as effective as possible with as little code as possible"? ;-D

(Yeah I know. I don't either. Type checking library, anybody? No bonus points for guessing which language I'm using!)


--
--
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/CADAJKhBZ5MnoNFftDJS6MuUahuaCJb%3DSNrEhKfLF68YH-aYpUA%40mail.gmail.com.

Monday, January 1, 2024

Re: DirDiffVim for folders, but files are missed?

Here's my plan for ProjectGooglePhotosCleanUpDownloads:
Process1: copying and pasting 241 (TakeoutAlbumYears/Google Photos/Photos from YYYY) +12 (TakeoutAlbumsMade/Google Photos/VariousNamedDirectoriesIMade) directories;
Process2: sorting duplicate files in a Main directory;
Process3: copying non duplicate files to a new directory TakeoutAlbumsMade/Google Photos/VariousNamedDirectoriesIMade/PhotosNotInAlbums.

Any suggestions on which software robably (Vim, Vimdiff or Vim-dirdiff) and commands to use please?
On Tuesday 2 January 2024 at 01:58:36 UTC+10 K otgc wrote:
Hello,
I have Google Photos downloaded and I'm trying to sort out the mess of duplicates.
I usually use vimdiff for file content, however this needs files in directories compared.

Running command vim -c "DirDiff dir1 dir2" -> select Enter -> DirDiff.vim correctly shows folders only in dir1 and dir2.
However, I need dir1's files that aren't duplicates of dir2, to move into dir2.
How can I manage this please?

--
--
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/d5ce90d7-89f3-4e79-8d75-823552f8e743n%40googlegroups.com.

DirDiffVim for folders, but files are missed?

Hello,
I have Google Photos downloaded and I'm trying to sort out the mess of duplicates.
I usually use vimdiff for file content, however this needs files in directories compared.

Running command vim -c "DirDiff dir1 dir2" -> select Enter -> DirDiff.vim correctly shows folders only in dir1 and dir2.
However, I need dir1's files that aren't duplicates of dir2, to move into dir2.
How can I manage this please?

--
--
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/d3fc2677-9372-4890-b655-e7442896faeen%40googlegroups.com.