Vim also has the code folding function, previously knew, but after all use not much, this function basically rarely uses. With the recent close contact with Gvim, the code folding feature is becoming familiar. Once the code to open a PHP (as the current mainstream development language), such as pear.php (as the current mainstream development language), found that the code is automatically folded, the code is expanded, you can see as long as the code on both sides of the/*{{{*/and/*}}}*/, will be automatically collapsed. A careful search of the configuration, with one sentence being the focus:
Foldmethod=marker
Vim automatically searches for code, collapses the contents of {{{and}}}, and has a small comment at the end of the code that is not a useless scrap:
/*
* Local Variables:
* mode:php (as the current mainstream development language)
* Tab-width:4
* C-basic-offset:4
* End:
*/
This comment is read by vim and is automatically set to the environment variable.
For the use of code folding, just type in vim:
: Help Zo
You can see a lot of related shortcut keys, need some practice to be handy:)
My gvim configuration is added again:
Colo Zellner
Set Guifont=courier_new:h11:cansi nobackup tabstop=4 shiftwidth=4 foldmethod=marker
Au bufread * Simalt ~x
A little bit of vim-related discovery:
Google Reader's previous article, the next shortcut keys are j,k, and vim of the cursor movement keys, do not know whether it is a coincidence or intentional, if the latter, then Google Reader developers must also be a fan of vim:)
When using Firefox to view the source code, click "/", will display the search box, and the vim of the search, it is estimated that Firefox developers are also vim enthusiasts: p
http://www.bkjia.com/PHPjc/508671.html www.bkjia.com true http://www.bkjia.com/PHPjc/508671.html techarticle VIM also has the code folding function, previously knew, but after all use not much, this function basically rarely uses. With the recent close contact with Gvim, the code folding feature is becoming familiar ...