sponsor Vim development Vim logo Vim Book Ad

foldsearch : fold away lines that don't match a given pattern

 script karma  Rating 160/52, Downloaded by 3546  Comments, bugs, improvements  Vim wiki

created by
Markus Braun
 
script type
utility
 
description
This plugin provides commands that fold away lines that don't match a specific search pattern. This pattern can be the word under the cursor, the last search pattern, a regular expression or spelling errors. There are also commands to change the context of the shown lines.

For more information about the plugin and its commands please go to [GitHub].

[GitHub]: https://github.com/embear/vim-foldsearch
 
install details
foldsearch is now distributed as a vimball (see :help vimball)

vim foldsearch.vmb
:so %
:q

and that's all!
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
foldsearch.vmb v1.3.2 2024-05-02 7.0 Markus Braun - add debug messages and functions to dump them on the screen or to a file
- internal refactoring (modify and extend view file instead of storing data in additional variables)
- performance improvements
- bugfix: enable autocommands during restoring previous view again to fix a bug with disabled syntax highlighting after ending foldsearch.
foldsearch.vmb 1.3.1 2024-04-26 7.0 Markus Braun - bugfix: repeated call to `:Fe` removed folding markers in file
foldsearch.vmb 1.3.0 2024-04-25 7.0 Markus Braun - add ability to toggle between foldsearch and original view with `:Ft`
- respect 'ignorecase' setting for pattern highlighting
- bugfix: refactoring to make `:Fc` work again
- bugfix: disable autocommands when restoring previous view to prevent unexpected side effects
- bugfix: for unnamed buffers folds were not correctly restored when foldsearch is finished
foldsearch.vmb 1.2.0 2023-10-01 7.0 Markus Braun - add abilitiy to choose the scope of foldsearch commands
foldsearch.vmb 1.1.1 2014-12-17 7.0 Markus Braun - bugfix: add missing 'call' to ex command
foldsearch.vmb 1.1.0 2014-12-15 7.0 Markus Braun - use vim autoload feature to load functions on demand
- better save/restore of modified options
- added |g:foldsearch_disable_mappings| config variable
- handle multiline regular expressions correctly
foldsearch.vim 2213 2008-07-26 7.0 Markus Braun - fixed a bug in context handling
foldsearch.vim 2209 2008-07-17 7.0 Markus Braun Initial upload
ip used for rating: 3.236.83.154

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github