A.Politz | 1 May 2008 01:02
Picon

Re: pass three non-adjacent lines to a filter


Rahul wrote:

>
>On Apr 30, 1:20 pm, "A.Politz" <poli... <at> fh-trier.de> wrote:
>  
>
>>Write a little api...
>>[snip]
>>    if a:lnum > 0 && a:lnum < line('$')
>>        exec "let s:match_ids[a:lnum] =
>>matchadd('SelectorColor','^\\%'.a:lnum.'l.*$')"
>>      endif
>>    endif
>>[snip]
>>    
>>
>
>
>Thanks AP! While I'm still applying my full vim knowledge to figure
>out how your snippet works; what's "matchadd"?  My vim seems to not
>like that one. :help matchadd also leads know where....so also for
>matchdelete.
>
>  
>

I think it was added in 7.0 or 7.1 . It is the
same as the :match command, but allows 'arbitrary'
amounts of different patterns.
(Continue reading)

Rahul | 1 May 2008 02:18
Picon

Re: pass three non-adjacent lines to a filter


On Apr 30, 4:45 pm, "Benjamin Fritz" <fritzophre... <at> gmail.com> wrote:
> On 4/30/08, A.Politz <poli... <at> fh-trier.de> wrote:
>
> > I think it was added in 7.0 or 7.1 . It is the
> >  same as the :match command, but allows 'arbitrary'
> >  amounts of different patterns.

I'm thinking it might perhaps be a good idea to upgrade to the latest
7.1 version. As usual, RHEL seems to ship a older version which is
what we have.

(1) Any caveats while upgrading? Should I just use the default
instructions (./configure make make install ) and do it from source.
Will this retain all my older settings, syn files etc.? What do you
guys recommend?

(2) Should I stay safe and do it for only my user first rather than
for root? I'm confused what to do with PREFIX    and EPREFIX then. ~/
bin for both? Never did a user specific install but the fear of
breaking something as essential as vim system wide might be motivation
enough.

--
Rahul
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

(Continue reading)

Ben Schmidt | 1 May 2008 02:42
Picon
Gravatar

Re: memory usage


Lev Lvovsky wrote:
> On Apr 30, 2008, at 12:34 PM, Tim Chase wrote:
>>> 1. :vi big file
>>> 2. use a lot of memory
>>> 3. :bd big file
>> try ":bwipe" instead of ":bdelete".
>>
>>> 4. still a lot of memory being used

This is probably due to your operating system/C library/runtime system. Often, 
freeing memory allows an application to reuse it internally, i.e. its memory 
footprint won't grow for future allocations, but the memory doesn't actually 
return to the system (this can be very awkward to implement). It's 
process-specific memory, so it'll just end up paged out, slowing things down a 
little more than necessary due to the writing, and wasting disk space until the 
process exits probably...it won't affect the amount of memory you have for other 
processes at all. There is an outside chance that the memory is marked clean or 
something similar so it won't be paged out, but still isn't removed from the 
process' address space; then essentially it wastes no time, main memory or hard 
disk space but just shows up in the statistics still. As you can imagine, all this 
is terribly OS dependent, and it's slightly hardware dependent, too. You can in 
part test the theory by trying

1. open large file
2. open a different large file
3. check memory size

4. start again
5. open large file'
(Continue reading)

Matt Wozniski | 1 May 2008 03:14
Picon
Favicon

Re: vim + xterm + gnu/screen question


On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>
>  Hi,
>  Sorry if the question seems obvious, but I noticed that my vim
>  sessions are terminated if for any reason X crashes, which defeats the
>  purpose of running them inside screen sessions. Is this normal,
>  expected behavior? Is there a way to have persistent vim sessions even
>  if X crashes?
>  Thanks

Try updating to the latest vim.  There were some patches to this
behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
gracefully handle the X server dying.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

John Beckett | 1 May 2008 03:26
Picon

Vim Tips wiki - Main Page


The May edition of the Vim Tips Main Page is now available:
http://vim.wikia.com/wiki/Main_Page

It's frustrating that so many of the tips featured in the "Did you know?" section
are in poor shape. With the effort of a careful reply to an email, you could help
the Vim community by cleaning up one of those tips! You don't have to do a complete
polish - start with a single step towards improvement.

John

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Tony Mechelynck | 1 May 2008 04:18
Picon
Gravatar

Re: pass three non-adjacent lines to a filter


On 01/05/08 02:18, Rahul wrote:
>
>
> On Apr 30, 4:45 pm, "Benjamin Fritz"<fritzophre... <at> gmail.com>  wrote:
>> On 4/30/08, A.Politz<poli... <at> fh-trier.de>  wrote:
>>
>>> I think it was added in 7.0 or 7.1 . It is the
>>>   same as the :match command, but allows 'arbitrary'
>>>   amounts of different patterns.
>
>
> I'm thinking it might perhaps be a good idea to upgrade to the latest
> 7.1 version. As usual, RHEL seems to ship a older version which is
> what we have.
>
> (1) Any caveats while upgrading? Should I just use the default
> instructions (./configure make make install ) and do it from source.

You might be interested in my howto page about compiling Vim on 
Unix/Linux: http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

> Will this retain all my older settings, syn files etc.? What do you
> guys recommend?

Any settings in $HOME, $HOME/.vim and below will be kept. If your old 
$VIM is not at /usr/local/share/vim (the default location) you may want 
to move $VIM/vimfiles (with its contents if any), $VIM/vimrc and 
$VIM/gvimrc (if they exist). "make install" will re-create $VIMRUNTIME 
(at /usr/local/share/vim/vim71 by default. I recommend _not_ to override 
(Continue reading)

jorges | 1 May 2008 06:57
Picon
Picon
Favicon

Re: vim + xterm + gnu/screen question


I just realized I hit "reply to author" instead of reply. Posting
again...

On May 1, 3:14 am, "Matt Wozniski" <m... <at> drexel.edu> wrote:
> On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>
> >  Hi,
> >  Sorry if the question seems obvious, but I noticed that my vim
> >  sessions are terminated if for any reason X crashes, which defeats the
> >  purpose of running them inside screen sessions. Is this normal,
> >  expected behavior? Is there a way to have persistent vim sessions even
> >  if X crashes?
> >  Thanks
>
> Try updating to the latest vim.  There were some patches to this
> behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
> gracefully handle the X server dying.

This is vim 7.1.266 so the patch should be included. I'll investigate
on this.

 <at> Andy Kittner: Thanks for the tip. I'll keep it s a last resource, as
I sometimes make use of vim - X clipboard features.

 <at> Manu Hack: I can indeed resume screen, no problem there, but all vim
sessions inside are dead, that's my problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
(Continue reading)

bill lam | 1 May 2008 08:24
Picon

Re: running interactive console program within vim


Andreas Müller wrote:
> The big drawback is of course, that it only works with the KDE konsole
> (but it should work without KDE ...), especially if you don't like the
> KDE konsole.

Very interesting. However I use gnome/gtk, are you going to switch from dcop to 
dbus?

regards,

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

A.Politz | 1 May 2008 10:32
Picon

Re: vim + xterm + gnu/screen question


jorges wrote:

>I just realized I hit "reply to author" instead of reply. Posting
>again...
>
>On May 1, 3:14 am, "Matt Wozniski" <m... <at> drexel.edu> wrote:
>  
>
>>On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>>
>>    
>>
>>> Hi,
>>> Sorry if the question seems obvious, but I noticed that my vim
>>> sessions are terminated if for any reason X crashes, which defeats the
>>> purpose of running them inside screen sessions. Is this normal,
>>> expected behavior? Is there a way to have persistent vim sessions even
>>> if X crashes?
>>> Thanks
>>>      
>>>
>>Try updating to the latest vim.  There were some patches to this
>>behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
>>gracefully handle the X server dying.
>>    
>>
>
>This is vim 7.1.266 so the patch should be included. I'll investigate
>on this.
(Continue reading)

A.Politz | 1 May 2008 10:34
Picon

Re: vim + xterm + gnu/screen question


A.Politz wrote:

>jorges wrote:
>
>  
>
>>I just realized I hit "reply to author" instead of reply. Posting
>>again...
>>
>>On May 1, 3:14 am, "Matt Wozniski" <m... <at> drexel.edu> wrote:
>> 
>>
>>    
>>
>>>On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>>>
>>>   
>>>
>>>      
>>>
>>>>Hi,
>>>>Sorry if the question seems obvious, but I noticed that my vim
>>>>sessions are terminated if for any reason X crashes, which defeats the
>>>>purpose of running them inside screen sessions. Is this normal,
>>>>expected behavior? Is there a way to have persistent vim sessions even
>>>>if X crashes?
>>>>Thanks
>>>>     
>>>>
(Continue reading)


Gmane