Wikia

Vim Tips Wiki

Changes: Script:1494

Edit

Back to page

(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 14: Line 14:
 
</pre>
 
</pre>
   
Then the key mapping from f to za doesn't work, and when I type F (i.e. <tt>:call ToggleFold()<CR></tt>), I get the error:
+
Then the key mapping from f to za doesn't work, and when I type F (i.e. <code>:call ToggleFold()<CR></code>), I get the error:
 
<pre>
 
<pre>
 
Error detected while processing function ToggleFold:
 
Error detected while processing function ToggleFold:

Latest revision as of 09:41, July 14, 2012

Use this page to discuss script 1494 Efficient python folding: fold python code nicely and toggle with one keystroke

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

CommentsEdit

Hey, I downloaded your plugin (which I really like!), but I'm having problems using it when I open multiple buffers with the :edit command.

Everything works ok if I start Vim using e.g.

> vim myPythonFile.py

However, if from within Vim I type:

:edit myOtherPythonFile.py

Then the key mapping from f to za doesn't work, and when I type F (i.e. :call ToggleFold()<CR>), I get the error:

Error detected while processing function ToggleFold:
line 1:
E121: Undefined variable: b:folded
E15: Invalid expression: ( b:folded == 0 )

(I'm using Vim 7.3 on Windows 7). Any ideas?

That script has not been updated since March 2006 so I do not think the author will notice. It's probably some fairly simple stuff that needs to be sorted out in the script, and you might get a response on the vim_use mailing list. See asking questions. JohnBeckett 07:10, March 18, 2011 (UTC)

Around Wikia's network

Random Wiki