Skip to main content
8 events
when toggle format what by license comment
Jun 30, 2020 at 9:29 comment added Rich @kevinlawler Actually, I think I may have just figured out what you mean: if, while scrolled to the right, you move your cursor upwards/downwards through a long line, then with my code, virtualedit will be switched off. I can see why you might not want that. You could alter this behaviour by integrating the check for leftmost screen from my other answer. Let me know if this is the issue you're facing, and I'll add it to my answer.
Jun 30, 2020 at 8:22 comment added Rich @JeromeDalbert Yes, for me, I prefer to have the cursor where I put it, rather than having it snap back into the text when you reach the left-most screen, but I can absolutely understand why you'd prefer the behaviour of your solution: if you look at it from a different direction it makes more sense your way. Thanks so much for your kind comment, though: it's super gratifying to know your answers are appreciated!
Jun 30, 2020 at 8:18 comment added Rich @kevinlawler Could you be any more specific about what the undesirable behaviour is? I didn't notice it during my (admittedly brief) testing.
Jun 29, 2020 at 17:22 comment added kevinlawler Valiant attempt. Has undesirable behavior on ragged lines. CursorHold doesn't seem to improve.
Jun 27, 2020 at 18:10 comment added Jerome Dalbert The Internet is a magical place sometimes. I never knew anyone would be interested in my lonely question+answer, much less contributing and building on it 4 years after it was asked! You, sir, are a hero! Your solution is much more elegant and shorter, albeit not behaving exactly the same when scrolling left as the cursor can continue to be "free" on short lines, so you have to rely more on using ^ or $ if you want to systematically bring it back in check. This is probably just a matter of habit and preference.
Jun 23, 2020 at 11:18 history edited Rich CC BY-SA 4.0
deleted 6 characters in body
Jun 23, 2020 at 11:06 history edited Rich CC BY-SA 4.0
deleted 79 characters in body
Jun 23, 2020 at 10:38 history answered Rich CC BY-SA 4.0