Unix,vim,包装功能,

时间:2014-07-17 19:22:32

标签: unix vim wrapper

我想提供功能包装功能 Vim编辑。类似于包装功能 是否有Netbeans和其他软件。

Sub sample {
_----------------
-------------------
}

输出:

+sub sample { 

点击上面的内容后,它应显示完整的数据。 我们可以在.vimrc文件中使用JavaScript吗?请 有建设性的想法。

1 个答案:

答案 0 :(得分:0)

Vim folding commands
---------------------------------
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.
za toggle a fold at the cursor.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zc closes a fold under 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.

因此,如果要折叠方法,可以将光标放在方法声明上并键入zf}。这将折叠光标和方法的右括号之间的每一行。要展开,您可以使用光标在折叠处键入zo