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
Hi!
I found out that current version of find_opening_paren looks for only as long as 50 lines backwards for opening parenthesis. This is set explicitly by maxoff variable and prevents any list longer than 50 lines from being indented correctly. Is it a bug, or is it somehow a feature?
Personaly I removed it completely on my machine (the stopline arg from searchpairs to be precise). Maybe I am not used to dealing with really long files, but I am not experiencing any lags without maxoff at all. So I think maybe to make it optional, or make it turning on only in long files, like YouCompleteMe does...
How about double the default value every time someone files a bug complaining about this? Undo the last doubling if somebody complains about indentation being noticeably slow. Should converge to a reasonable default value after a few iterations.
(I'm reading this issue because I also have list literals in my unit tests that are longer than 50 lines. In this particular project they're shorter than 100 lines. I've now set g:python_pep8_indent_max_back_search to 1000 in my .vimrc and will see if I can perceive any slowdown.)
Activity
blueyed commentedon Feb 22, 2017
#64 has a fix/config option.
@temaput
What would you set it to? Please provide your feedback over there.
temaput commentedon Feb 23, 2017
Personaly I removed it completely on my machine (the stopline arg from searchpairs to be precise). Maybe I am not used to dealing with really long files, but I am not experiencing any lags without maxoff at all. So I think maybe to make it optional, or make it turning on only in long files, like YouCompleteMe does...
mgedmin commentedon Aug 30, 2017
How about double the default value every time someone files a bug complaining about this? Undo the last doubling if somebody complains about indentation being noticeably slow. Should converge to a reasonable default value after a few iterations.
(I'm reading this issue because I also have list literals in my unit tests that are longer than 50 lines. In this particular project they're shorter than 100 lines. I've now set
g:python_pep8_indent_max_back_searchto 1000 in my .vimrc and will see if I can perceive any slowdown.)blueyed commentedon Dec 22, 2018
Defaults have been adjusted by now.
How does it work for you?
Kache commentedon Oct 29, 2024
In case anyone else runs into this (since it's not yet mentioned here), the current workaround from #91 is configured at:
vim-python-pep8-indent/indent/python.vim
Lines 58 to 60 in 60ba5e1
Looks like maintainers want to keep it private and keep the freedom to change it in the future
In the meantime, I've set my own to: