bulletmark / edir

Program to rename, remove, and copy files and directories using your editor
139 stars 8 forks source link

Feature: make filenames more aligned for block-visual mode #18

Closed ppwwyyxx closed 1 year ago

ppwwyyxx commented 1 year ago

When batch-editing file names I often rely on the "block visual" mode in vim. This is useful when I need to add/remove/edit common prefix to file names. However, a problem with both vidir and edir is that line numbers can have different width, e.g.:

2023-06-29_08-20

This causes filenames across lines to not left-aligned.

Here are some ideas that make them more aligned:

bulletmark commented 1 year ago

I also use block visual mode in vim all the time and don't see this problem because edir writes a tab after the number. Have you configured your vim in a non-standard way to filter tabs?

bulletmark commented 1 year ago

I guess I have been around long enough to realize that attempting to rely on any consistent approach to how users deal with TAB chars will always be futile. So commit c1e881f enhances edir to format the line number with a consistent width, without TABS at all. This is new release 2.20.

ppwwyyxx commented 1 year ago

Yeah, now I notice that set ts=4 fix the alignment for me. Thanks for your commit!