16

最近Python-Modeをダウンロードしました。Python スクリプトを開くと、関数が折りたたまれています。簡単に展開できます (関数定義の上にいるときの移動キーの 1 つです)。ただし、関数を再折り畳む方法がわかりません。

さらに、おそらく最も重要なこととして:help pymode、エラーが返されます ('E149: 申し訳ありませんが、pymode のヘルプはありません')。そのため、ドキュメントを参照することさえできません。

どんな助けでも大歓迎です。

4

3 に答える 3

35

折りたたみコマンドのリストは次のとおりです。

zf#j creates a fold from the cursor down # lines.
zf/string creates a fold from the cursor to string .
zj moves the cursor to the next fold.
zk moves the cursor to the previous fold.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zc close a fold at the cursor.
zm increases the foldlevel by one.
zM closes all open folds.
zr decreases the foldlevel by one.
zR decreases the foldlevel to zero -- all folds will be open.
zd deletes the fold at the cursor.
zE deletes all folds.
[z move to start of open fold.
]z move to end of open fold.

あなたが探しているのは ですzc

于 2014-05-10T08:59:34.040 に答える
5

を押して vim の折り畳みを閉じますzc。すべての折り目を閉じるには: zM. これはすべてVimのドキュメントにあります。

于 2014-05-10T08:57:41.443 に答える
3

set foldclose=allあなたの意志vimrcでそれを解決してください。詳細は:h fcl.

カーソルが折り目にない場合、これは自動的に折り畳まれます。したがって、 のようなコマンドを手動で入力してリフォールディングする必要がないという利点がありますzc

help fold-commandsオプションが不要な場合は、で折りたたみ関連のコマンドのリストを見つけることができfoldcloseます。

于 2016-01-26T21:01:52.743 に答える