Add CommaOrSemiColonPrevious command and fix block formatted arrays
Please read the commit messages for both commits for details on each.
Hey @KroniK907 , thanks for the contribution! Interesting idea!
But they seem pretty compley by nature, so it would be ace if you could write some unit tests to safe guard... I know we have a poor coverague right now but it would be nice not to make it worse...
In the very least you should add a couple lines more to the example files and manually test your changes there, and test everything else in the files.
Thanks again! 💪
I'm actually pretty new to unit testing in general and haven't messed with vim unit testing before. Looking at your existing tests it doesn't look too complicated, so I'd be happy to give it a go.
I think the CommaOrSemiColonPrevious command might have a few kinks when it comes to anything that would normally require the current cursor position, so it might be useful to determine where it will fail.
Overall, my intention with the Previous command is not to provide some complete solution for automatically checking code, but simply providing a tool that a user can use to come up with more complex mappings if they wish.
The above commits shouldn't impact the existing functionality in any way (besides fixing the block array issue).
I'll try to get to adding some tests for the Previous command but I'm busier than expected this week and might not get to it for a few days.
Hey @KroniK907 any news here? Thanks
I'm afraid I'm too busy at this point to implement any testing. The code works well enough for me with about 20 other plugins. But I cant verify that unit testing wouldn't bring out some unknown issue with it.
Sorry to code and run but I'm just too busy to do more than what I already have.
Hey @KroniK907 revisiting this... Something came to mind... If the purpose of the Previous command, as you stated, is for auto inserting a comma or semi colon after pressing enter, wouldn't the auto insertion feature cover that for you? https://github.com/lfilho/cosco.vim#auto-commaorsemicolon-insertion-mode-experimental
@KroniK907 ?