Comments (3)
Without having an Ubuntu machine on hand, it's difficult to know what to suggest.
foldexpr
is set in the ftplugin scripts, which depend on Vim detecting your file type as python
or cython
. If your configuration on Ubuntu results in a different detected filetype, then it won't be set properly.
Try running :scriptnames
after opening a Python file and see whether SimpylFold scripts appear in the list.
If foldexpr
is being set correctly by SimpylFold but then is later overridden with a 0
by some other script, then :verbose set foldexpr?
should reveal the location where it was last set.
Finally, maybe it's obvious, but your Vim has to be compiled with folding support for folding to work at all. Check the output of :version
for +folding
to see if the feature is enabled.
from simpylfold.
Thank you for the hints.
:set filetype? returns:
filetype=python
:scriptnames returns:
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim81/debian.vim
3: /usr/share/vim/vim81/syntax/syntax.vim
4: /usr/share/vim/vim81/syntax/synload.vim
5: /usr/share/vim/vim81/syntax/syncolor.vim
6: /usr/share/vim/vim81/filetype.vim
7: ~/.vim/vimrc
8: /usr/share/vim/vim81/syntax/nosyntax.vim
9: /usr/share/vim/vim81/plugin/getscriptPlugin.vim
10: /usr/share/vim/vim81/plugin/gzip.vim
11: /usr/share/vim/vim81/plugin/logiPat.vim
12: /usr/share/vim/vim81/plugin/manpager.vim
13: /usr/share/vim/vim81/plugin/matchparen.vim
14: /usr/share/vim/vim81/plugin/netrwPlugin.vim
15: /usr/share/vim/vim81/plugin/rrhelper.vim
16: /usr/share/vim/vim81/plugin/spellfile.vim
17: /usr/share/vim/vim81/plugin/tarPlugin.vim
18: /usr/share/vim/vim81/plugin/tohtml.vim
19: /usr/share/vim/vim81/plugin/vimballPlugin.vim
20: /usr/share/vim/vim81/plugin/zipPlugin.vim
21: ~/.vim/pack/plugins/start/SimpylFold/plugin/SimpylFold.vim
22: /usr/share/vim/vim81/syntax/python.vim
SimpylFold is loaded on line 21
:verbose set foldexpr? returns:
foldexpr=0
My vim supports folding
But Simpylfold is still not working. Once I try to fold I get this error:
E490: No fold found
:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 20 2021 11:42:42)
Included patches: 1-2269
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl +cindent +cursorshape +file_in_path +jumplist +mksession +mouse_xterm +printer +sound +terminal +virtualedit -xim
+arabic -clientserver +dialog_con +find_in_path +keymap +modify_fname +multi_byte +profile +spell +terminfo +visual -xpm
+autocmd -clipboard +diff +float +lambda +mouse +multi_lang -python +startuptime +termresponse +visualextra -xsmp
+autochdir +cmdline_compl +digraphs +folding +langmap -mouseshape -mzscheme +python3 +statusline +textobjects +viminfo -xterm_clipboard
-autoservername +cmdline_hist -dnd -footer +libcall +mouse_dec +netbeans_intg +quickfix -sun_workshop +textprop +vreplace -xterm_save
-balloon_eval +cmdline_info -ebcdic +fork() +linebreak +mouse_gpm +num64 +reltime +syntax +timers +wildignore
+balloon_eval_term +comments +emacs_tags +gettext +lispindent -mouse_jsbterm +packages +rightleft +tag_binary +title +wildmenu
-browse +conceal +eval -hangul_input +listcmds +mouse_netterm +path_extra -ruby -tag_old_static -toolbar +windows
++builtin_terms +cryptv +ex_extra +iconv +localmap +mouse_sgr -perl +scrollbind -tag_any_white +user_commands +writebackup
+byte_offset +cscope +extra_search +insert_expand -lua -mouse_sysmouse +persistent_undo +signs -tcl +vartabs -X11
+channel +cursorbind -farsi +job +menu +mouse_urxvt +postscript +smartindent +termguicolors +vertsplit -xfontset
from simpylfold.
Your Vim doesn't seem to be loading the ftplugin script (ftplugin/python/SimpylFold.vim
), which is what sets foldexpr
to the correct value for SimpylFold. You may have turned ftplugins off, or maybe the default configuration on Ubuntu is doing so. Try :filetype plugin on
(or put that in your .vimrc
) and then load/reload a Python buffer.
from simpylfold.
Related Issues (20)
- Not clear how to use this plugin HOT 2
- Folds are invalid after running formatter with ale HOT 3
- Releases Support HOT 1
- More configuration HOT 2
- SimpylFold with large modules makes basic operations slow HOT 3
- Auto close fold include current line after delete line HOT 5
- Comment BLOCKS (in file licenses)
- Plugin ceases to work if a module is named after its parent directory HOT 1
- docstring folding not working with empty line HOT 2
- Support folding long block of code by indentation? HOT 4
- Folds only exist after using zx (E490: No fold found) when using "telescope" fzf plugin HOT 6
- Support for other languages? HOT 1
- is it possible to have only 1 line separating folds ? HOT 2
- the function/class names should have an higher contrast than the lines numbers HOT 3
- Possibility of defining custom folds? HOT 1
- Repository not found HOT 1
- Folding Code in Child Classes HOT 2
- SimpylFold won't indent top level functions HOT 4
- Can't turn off docstring folding HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpylfold.