On 06/07/10 00:51, bill lam wrote:
Пнд, 05 Июл 2010, Tony Mechelynck писал(а):
2. The problem withthis whole approach is that it could run a shell
command every time the status line needs to be refreshed, which might
mean at every move of the cursor.
I think that it might cache the version number into a variable during
bufread or some other events.
Well, you would have to program that explicitly. Maybe something like
(with the same HgId() as in my previous post)
au BufRead,BufNewFile * let b:hg_id_string = HgId()
map <F5> let b:hg_id_string = HgId()
map <S-F5> bufdo let b:hg_id_string = HgId()
and then put %(exists('b:hg_id_string')?b:hg_id_string:""%) in the
custom status line: this would mean compute and cache when opening a new
file, refresh for one file by hitting F5, for all files by hitting
Shift-F5. Of course you would have to choose a variable name never used
for something else.
Best regards,
Tony.
--
'Twas midnight, and the UNIX hacks
Did gyre and gimble in their cave
All mimsy was the CS-VAX
And Cory raths outgrabe.
"Beware the software rot, my son!
The faults that bite, the jobs that thrash!
Beware the broken pipe, and shun
The frumious system crash!"
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php