You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
Now I put my cursor on the first 'h' in 'hello'. After calling ArgWrap the code (as expected) becomes the following:
deffoo(
hello,
world,
ohai,
):
pass
However, my cursor is on the opening parenthesis rather than the 'h' of hello. Now if put my cursor on the 'h' again and call ArgWrap, my cursor stays in the same place in the file and is therefore hovering over 'pass'. Therefore, I can't simply toggle ArgWrap back-and-forth because I have to move my cursor in between the calls.
It'd be great if the cursor tracked the argument that you're hovering over (or at the very least remained within the parenthesis) so that it was easier to toggle between the states.
The text was updated successfully, but these errors were encountered:
I experienced this while testing this plugin for my use-case but after I used it a few time, i realised that in a real scenario I only format when i have to once & don't generally go back & forth between these.
But to maintain the context would be really helpful in cases like if we want to edit the parameters.
That is, being able to issue the same command many times to toggle back and forth seamlessly between wrapped and unwrapped states. It really helps with not breaking the "flow" when coding.
I am guessing that when wrapping, it is relatively easy as lines are added after the current location and thus simply return to the original line of invocation and then going to the end will work?
When de-wrapping we need to calculate the number of lines removed and figure out the cursor offset etc., so it is more complicated.
Let's say I have the following method:
Now I put my cursor on the first 'h' in 'hello'. After calling ArgWrap the code (as expected) becomes the following:
However, my cursor is on the opening parenthesis rather than the 'h' of hello. Now if put my cursor on the 'h' again and call ArgWrap, my cursor stays in the same place in the file and is therefore hovering over 'pass'. Therefore, I can't simply toggle ArgWrap back-and-forth because I have to move my cursor in between the calls.
It'd be great if the cursor tracked the argument that you're hovering over (or at the very least remained within the parenthesis) so that it was easier to toggle between the states.
The text was updated successfully, but these errors were encountered: