Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Mode #294

Open
jcjgraf opened this issue Nov 4, 2020 · 5 comments
Open

Visual Mode #294

jcjgraf opened this issue Nov 4, 2020 · 5 comments
Labels
discussion Topic that is open for general discussion enhancement New feature or request

Comments

@jcjgraf
Copy link
Contributor

jcjgraf commented Nov 4, 2020

I could imagine that something like a visual mode would be very useful. After activating the mode one could select a bunch of subsequent images in library or thumbnail mode. The selection could then be batch-processed (e.g. marked, or fed to an external command).

I do often have the situation that I have many different shootings on a SD card and often I only need to select one specific event and e.g. move it to a certain location. This feature would allow for a huge efficiency boost in my workflow.

What do you @karlch thing about such a feature?

@karlch
Copy link
Owner

karlch commented Nov 4, 2020

I am not sure what benefit a new "mode" would bring compared to the regular marking system, at least not for the usecase you mention. In this case you could mark the images in library / thumbnail mode using m and then e.g. move them using :!mv %m /new/location. Marking even offers the option to use simple unix patterns, e.g. :mark MyEvent*.jpg. What additional benefits do you see from this visual mode?

@karlch karlch added discussion Topic that is open for general discussion enhancement New feature or request labels Nov 4, 2020
@jcjgraf
Copy link
Contributor Author

jcjgraf commented Nov 5, 2020

I agree that one the desired images are marked, there are no limits in what one can to with the selection (thanks to the external commands, %m alias etc.). But for me, the marking process is troublesome and quite inconvenient.
Assume you need to mark n subsequent images, currently this required 2n keystrokes (n times x for the marking and n times n to go to the next image). While the unix pattern match may reduce the number of keystrokes (at least for larger selections), given the pretty much random naming of the images by my camera, I am bound to make an error sooner or latter...

Now my idea was that once this mode is activated, you can navigate to the last image of the desired range, and all images in-between are automatically selected (/marked ?). This reduces the number of keystrokes by at least the factor 2, for the thumbnail view even more, since you can jump down whole rows.
This could be even more improved the we would add typical vim movement shortcuts, like $ (move to end of line in thumbnail mode), 0 (move to beginning of line in thumbnail mode), CTRL + [d, f, u, u] to move up/down by whole/halve pages. But that does probably deserve its own feature request 😄

As I think about it, it does probably not make much sense to reinvent the wheel, but instead extend the functionality of the marker. I guess that should actually even be doable with a plugin.

@karlch
Copy link
Owner

karlch commented Nov 5, 2020

I have a simple keybinding in my vimiv config to at least achieve the factor of 2 you describe:

<alt>m: mark %% && next

Of course this doesn't help for more complex movements as currently there is no concept of "in-between". I have to think about this some more. I would probably accept a PR for this if the code is not too complicated, but may not work on it myself.

I opened #295 for the additional movement shortcuts.

@jcjgraf
Copy link
Contributor Author

jcjgraf commented Dec 31, 2020

I have created the little plugin BatchMark, which does exactly what I was missing from vimiv

To start the selection, one runs :batchmarkstart. With the last image in the desired range selected, running :batchmarkend will mark all images in the range. If all images are already marked, they are unmarked.

All logic to determine the images in the range was already present in vimiv, it just had to be found 😆 The logic for marking the images is a little hacked, though it works.

P.S. In case you @karlch change you mind and agree that having this functionality directly in vimiv would be useful, I am willing to open a PR and reimplement it in vimiv. If not, then this issue can be closed 😏

@karlch
Copy link
Owner

karlch commented Jan 3, 2021

This is really cool, I have to admit I like it a lot! Instead of writing a longer message here I will add some thoughts directly in the plugin as issues. If we can solve them all, I would almost certainly be happy to add this into vimiv directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Topic that is open for general discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants