arp242 / batchy.vim

A little plugin to perform batch operations on files
MIT License
4 stars 1 forks source link

Improve syntax file #1

Closed benknoble closed 3 years ago

benknoble commented 3 years ago

Further rational in commit messages.

arp242 commented 3 years ago

I think I put some stuff other stuff in there before – but yeah, syntax is clearly the better location.

As for the colours; before it looks like (with the default colour scheme, which is what I happen to use):

screenshot_2021-07-09-10-05-23_border

After:

screenshot_2021-07-09-10-05-16_border

The intent was to de-emphasise these things, but this change has the exact opposite effect.

Of course, this depends how your colour scheme defines "Comment"; I don't think these standard groups really work all that well for these kind of things, as it's not really a "comment" as such, or at least not in the same way as you have in code.

On the other hand, the standard groups ensure that you have something which fits with whatever background colour you have, although the grey/blue should work fairly well on both a light and dark background colour:

screenshot_2021-07-09-10-16-15_border

The blue isn't especially great though – I choose it because that's the colour ls has for directories, although the shade of blue could perhaps be tweaked a wee bit. Linking to Directory might actually be a good option for batchyDir.

For batchy this still leaves us with the problem that the actual effect might be something completely different from the intended effect. I'm not sure if there's really a way to have a default in there that would really satisfy everyone. I don't know what looks so garish for you or what you would consider to be "a reasonable colorscheme"?

arp242 commented 3 years ago

Also need to update the README btw: https://github.com/arp242/batchy.vim#options

benknoble commented 3 years ago

Meh, the grey's not horrible. I'm ok keeping that. I would like to link batchyDir to Directory—that blue is tough on a dark background. (By reasonable I just meant "doesn't blind me"—something like "not hotdog".)

Commits coming.

benknoble commented 3 years ago

PS are you interested in having a doc/? available or do you feel the README is sufficient?

arp242 commented 3 years ago

Meh, the grey's not horrible. I'm ok keeping that.

You can change it in your vimrc, right?

PS are you interested in having a doc/? available or do you feel the README is sufficient?

I'll merge a patch, but I'm too lazy to write one myself 🙃

benknoble commented 3 years ago

Yeah, I'm pretty sure changing it (or adding an after/syntax) will work.

We'll see if I write one; sometimes its nice to have easy-to-get-to docs. But it does mean (with such a detailed README) that some work is duplicated.

PS kudos for making the one plugin that looks like it does exactly what I want :)

arp242 commented 3 years ago

Yeah, it would be useful for sure.

Things like this are basically just written for my own usage. If it's also useful for others: great! But that's not really a super-high priority, and I kind of stopped going out of my way for it beyond writing a decent README and some other basic stuff, simply because I usually don't feel like it (this is what people often mean with "I don't have the time" if they're really honest with themselves). I usually don't mind reviewing/merging patches and/or solving issues people encounter as they come up though, as it's usually not too much work and helping someone out isn't something I mind doing anyway.

This is why I just configured the colours to whatever works well for me, and why it has tabnew as the default: because that's what I like to use. I also just can't be bothered to support Neovim as I don't use it (and the -> method syntax is nicer IMO). There's all sorts of small things that could be improved/configured to make it more flexible to cover more use cases.

At any rate, yeah duplication of the README/doc is always a bit of an issue. I wrote a "markdown to vimdoc" script some years ago, but I stopped using it: the results were never super-great as the semantics of Markdown vs. Vimdoc are somewhat different, as is the general structure. Usually If I do a vimdoc it's more of a "reference" and the README is more in a "tutorial" format.

PS kudos for making the one plugin that looks like it does exactly what I want :)

Cheers :-) It actually took me quite a long time to come up with something I really liked; this is the 4th version (I just never released the first 3 as I wasn't very happy with them). Reversing the source and destination was the key transformed it from "it kinda works, but meh" to "hey, this actually works quite well!"

benknoble commented 3 years ago

I hear you. A number of my plugins or forks are scratching my personal itches. I don't use neovim, but would accept reasonable patches to do so—method syntax and const and such is so nice to have.