This is something that partly is provided by vim by folding. But I don't want 
the folding texts...
What I want is to watch a file in two views where the second one is a filtered 
view of the first one.
Can anyone please help me. I'm not a very advanced user
 
Q. I would like to have a dual view of my file with many thousand lines.
A. I could do this with a vertical split.
 
Q. Then I would like to two windows to be synchronized.
A. I could do this with the :scrollbind command
 
So far everything is good... But then:
 
Q. I want to filter the view to only show text matching my regex
A. There's a VIM-tip's for that:
:set fold
:set foldexpr=getline(v:lnum)!~@/:nnoremap <F8> :set foldmethod=expr<CR><Bar>zM
 
The problem is that I cant get rid of the text: "+--27 lines: 
xxx-----------------"
I would like a list of all lines containing my regex and nothing else. The 
output I would like is similar to the output generated by this command:
:g!/MyRegEx/d
but I don't want to delete the text since I want to edit the complete file (but 
in a filtered view)
 
The second problem I get is that I want to :scrollbind to completely sync the 
lines between the current cursor line in my filtered window with the line i my 
unfiltered windows so that I could see the surrounding text
 
Example:
 
Windows 1 (original)========    1 Line 1    2 Line 2    3 Line 3 foo4 Line 4    
5 Line 5    6 Line 6 foo7 Line 7
 
Windows 2 (filtered on /foo/)========3 Line 3 foo6 Line 6 foo


_________________________________________________________________
Var sommaren för kort? Här hittar du solen!
http://resor.se.msn.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to