Skip to content

Plugin creation: How do you loop over all selected files #1117

Closed Locked Answered by sxyazi
thepsauce asked this question in 1. Q&A
Discussion options

You must be logged in to vote

It is not recommended to use ipairs(folder.window) since it needs to iterate over all files, which is inefficient and can only get the visible files in the window.

  • If you want to access the selected file(s), use cx.active.selected
  • If you want to access the yanked file(s), use cx.yanked

They both need to be used in a sync context.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thepsauce
Comment options

Answer selected by thepsauce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
1. Q&A
Labels
None yet
2 participants