I am using a recorded macro to manually wrap an extremely long string in a python script, like this:
blah = ('blahblah ... blah blah')
to
blah = ('blahblah...'
'blahblah...'
...
'blahblah...')
the macro is 4f,a''^[i^M^[
This works fine, preserving my indentation right up to the point that the first line blah =...
reaches the top of the page, then suddenly it starts dedenting to the first character of the line. How can I prevent this? i.e., how can I make vim recognize that the opening paren is above the top of the page?
EDIT: OK, it's not the top of the page, but 50 lines above, and my window (at present) is 52 lines.
4f,
part; this jumps to the fourth comma, but your example string doesn't have any commas. You should probably create a Minimal, Complete, and Verifiable example. – Martin Tournoij Mar 2 '16 at 15:08