Repository navigation
Closed
Description
-------------------------------------------------------------------------------
pymode debug msg 1: Starting debug on: 2018-01-25 10:44:24 with file /tmp/pymode_debug_file.txt
-------------------------------------------------------------------------------
pymode debug msg 2: Operating system: Linux
-------------------------------------------------------------------------------
pymode debug msg 3: Scriptnames:
1: ~/.vim/bundle/python-mode/debugvimrc.vim
2: /usr/share/vim/vim80/plugin/getscriptPlugin.vim
3: /usr/share/vim/vim80/plugin/gzip.vim
4: /usr/share/vim/vim80/plugin/logiPat.vim
5: /usr/share/vim/vim80/plugin/manpager.vim
6: /usr/share/vim/vim80/plugin/matchparen.vim
7: /usr/share/vim/vim80/plugin/netrwPlugin.vim
8: /usr/share/vim/vim80/plugin/rrhelper.vim
9: /usr/share/vim/vim80/plugin/spellfile.vim
10: /usr/share/vim/vim80/plugin/tarPlugin.vim
11: /usr/share/vim/vim80/plugin/tohtml.vim
12: /usr/share/vim/vim80/plugin/vimballPlugin.vim
13: /usr/share/vim/vim80/plugin/zipPlugin.vim
14: ~/.vim/bundle/python-mode/plugin/pymode.vim
15: ~/.vim/bundle/python-mode/autoload/pymode.vim
16: /usr/share/vim/vim80/filetype.vim
17: /usr/share/vim/vim80/ftplugin.vim
18: /usr/share/vim/vim80/ftplugin/python.vim
19: ~/.vim/bundle/python-mode/ftplugin/python/pymode.vim
20: ~/.vim/bundle/python-mode/autoload/pymode/virtualenv.vim
21: ~/.vim/bundle/python-mode/autoload/pymode/breakpoint.vim
22: ~/.vim/bundle/python-mode/autoload/pymode/debug.vim
-------------------------------------------------------------------------------
pymode debug msg 4: Pymode variables:
pymode #1
pymode_breakpoint #1
pymode_breakpoint_bind <leader>b
pymode_breakpoint_cmd
pymode_debug #1
pymode_debug_counter #3
pymode_debug_tempfile /tmp/pymode_debug_file.txt
pymode_doc #1
pymode_doc_bind K
pymode_doc_vertical #0
pymode_folding #1
pymode_folding_nest_limit #1000
pymode_folding_regex ^\s*\%(class\|def\|async\s\+def\) .\+\(:\s\+\w\)\@!
pymode_indent #1
pymode_init #1
pymode_lint #1
pymode_lint_async #1
pymode_lint_async_updatetime #1000
pymode_lint_checkers ['pyflakes', 'pep8', 'mccabe']
pymode_lint_comment_symbol CC
pymode_lint_cwindow #1
pymode_lint_docs_symbol DD
pymode_lint_error_symbol EE
pymode_lint_ignore []
pymode_lint_info_symbol II
pymode_lint_message #1
pymode_lint_on_fly #0
pymode_lint_on_write #1
pymode_lint_options_mccabe {'complexity': 12}
pymode_lint_options_pep257 {}
pymode_lint_options_pep8 {'max_line_length': 79}
pymode_lint_options_pyflakes {'builtins': '_'}
pymode_lint_options_pylint {'max-line-length': 79}
pymode_lint_pyflakes_symbol FF
pymode_lint_select []
pymode_lint_signs #1
pymode_lint_sort []
pymode_lint_todo_symbol WW
pymode_lint_unmodified #0
pymode_lint_visual_symbol RR
pymode_motion #1
pymode_options #1
pymode_options_colorcolumn #1
pymode_options_max_line_length #79
pymode_paths []
pymode_python python3
pymode_quickfix_maxheight #6
pymode_quickfix_minheight #3
pymode_rope #0
pymode_run #1
pymode_run_bind <leader>r
pymode_trim_whitespaces #1
pymode_version 0.9.4
pymode_virtualenv #1
pymode_virtualenv_enabled
pymode_virtualenv_path
pymode_warning #1
-------------------------------------------------------------------------------
pymode debug msg 5: Git commit:
ce506795bfcae293c531a25e0208833124787d58
-------------------------------------------------------------------------------
pymode debug msg 6: End of pymode#debug#sysinfo
pymode debug msg 7: line 1 has folding: >1 with foldcase function declaration
Error detected while processing function pymode#trim_whitespaces:
line 3:
Interrupted
1 def debug():
-------------------------------------------------------------------------------
pymode debug msg 8: Session history:
# cmd history
1 w debug.py
> 2 q!
Metadata
Metadata
Assignees
Labels
No labels
Activity
nineKnight commentedon Jan 25, 2018
I get into the trouble when I edit like this:
and then try to save the file.
It only turns up when I edit the very first line with
defand then inputEnterto the second line. I can't edit any more until I press<C-c>. But when I can edit finally, problem comes again and then I press<C-c>again to make vim show what I've input.Now, it makes me to disable pymode_folding to get out of it. Jesus!!!
Attention: Only when the first line is a def thing, the problem turns up.
nineKnight commentedon Jan 25, 2018
nineKnight commentedon Jan 25, 2018
Another test !!!
This time I save the file first, then edit it like this:
Problem occurs when I'm inserting
<Space>in the second line.PS: My python version is 3.6.4.
nineKnight commentedon Jan 25, 2018
I found it similar to #808 , a little different from #825 . Help and debug plz.
fmv1992 commentedon Jan 25, 2018
Problem fix on its way.
Fixed corner case of folding crash when there is a definition on the …
added test case for gh issue #839
fmv1992 commentedon Jan 25, 2018
Problem is fixed in version
dadf48a84b2c02d3d92f807315a2c24b69d86c4b. Let me know if the problem persists.nineKnight commentedon Jan 26, 2018
@fmv1992 It works, and thx :)
Now I'm looking into how to highlight my own func out of
defthing. Would you show me any idea?fmv1992 commentedon Jan 28, 2018
hey @nineKnight,
you mean highlighting
myfuncin case you have the following in your code:?
If that's the case I strongly recommend you not to pursue this endeavor. Possibly your code will be excessively highlighted and the implementation would be hard.
However if you do want to do that I would recommend an asynchronous call to a function which parses your source code for function definitions and execute vim's commands, enabling highlights for your functions. I wouldn't know how would you delete those in case you have deleted your functions nor do I know how would you make those affect the correct buffers.
diraol commentedon Jan 28, 2018
Nice job @fmv1992 ! =)
If I may suggest, I think we can close this issue. If @nineKnight needs help on this new "feature" (highlight the function name), I think a new issue may be open for that purpose.
nineKnight commentedon Jan 29, 2018
@fmv1992 I just wanna highlight function names in whatever case, and @diraol is right. I'm closing this issue.
nineKnight commentedon Jan 30, 2018
Hi, @fmv1992 I have to reopen this issue because I found the similar problem when I typed like this:
Debug file content
fmv1992 commentedon Feb 6, 2018
Confirmed... Folding strikes again....
diraol commentedon Feb 10, 2018
About Folding,
maybe this PR would help at some point (specially regarding its performance):
#602
Should we open one or two Issues for folding problems and try to link all folding related issues there, closing them?
I can see 2 main problems:
fmv1992 commentedon Feb 12, 2018
To be honest this folding issue has been very demanding and yet very unstable.
I'm not happy suggesting this but we should disable it by default, put it as an unstable feature and move on then come back in the future. This may hinder us from doing development on more important features...
:/
nineKnight commentedon Feb 27, 2018
I've turned to tmhedberg/SimpylFold for the Python folding.
diraol commentedon Apr 9, 2018
Since this thread have lot's of info about the folding problems, I'm adding one more example that seems to break the folding algorithm (my vim simply does not start while opening a file with this content):
fmv1992 commentedon Apr 29, 2018
Let's pile up every break on our folding here.
Meanwhile I have turned it off by default c64c71f.
add settings about python-mode
stale commentedon Sep 26, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
diraol commentedon Sep 28, 2018
Just commenting here to avoid closing the issue, since it is an important one.
diraol commentedon Feb 17, 2019
Guys, I've tested all codes from this issue and it seems to be working.
I'll close it for now ok? If anyone faces issues with folding and do not want to use other folding features, reopen the issue with new info ok? Thanks! =)