Hi every one.
When i use printf to print the time, i use ``%6d'' instead of ``%06d''
in code:
printf( %d.%6d, time_t.second, time_t.milsecond);
so the log is like this now:
time cost is 3. 1234
time cost is 3. 234
time cost is 3. 5
.
i want to use the regular expression in vim to
LegolasKiss wrote:
Hi every one.
When i use printf to print the time, i use ``%6d'' instead of ``%06d''
in code:
printf( %d.%6d, time_t.second, time_t.milsecond);
so the log is like this now:
time cost is 3. 1234
time cost is 3. 234
time cost is 3. 5
.
i want to use the
Nico Weber wrote:
I have never invoke functions in the ``esc:s/'' before.
If I understand you correctly, \zs might be even easier in this context:
:%s/d\.%\zs/0/g
See `:h \zs`.
You seem to have muddled that a bit...you have 'd' where you surely want '\d'
and
I'm not sure what
LegolasKiss wrote:
[...]
so the log is like this now:
time cost is 3. 1234
time cost is 3. 234
time cost is 3. 5
.
i want to use the regular expression in vim to change all spaces into
``0'',but i can't do this in one operation.
my way is like this:
esc:%s/\(\d\.\ *\)\
Patch 7.1.269
Problem:The matchparen plugin has an arbitrary limit for the number of
lines to look for a match.
Solution: Rely on the searchpair() timeout.
Files: runtime/plugin/matchparen.vim
*** ../vim-7.1.268/runtime/plugin/matchparen.vimSun Jan 6 20:05:36
Q is usually mapped to gq by vimrc_example.vim.
That indeed seems to be the source of the problem! Thanks, Tony.
When I execute :unmap Q, the problem goes away and I can replace
selected text with Q.
Is there a compelling reason why this key-binding exists? It is very
unintuitive to the
hamlen wrote:
Q is usually mapped to gq by vimrc_example.vim.
That indeed seems to be the source of the problem! Thanks, Tony.
When I execute :unmap Q, the problem goes away and I can replace
selected text with Q.
Is there a compelling reason why this key-binding exists? It is very
On 3月9日, 下午10时51分, A.Politz [EMAIL PROTECTED] wrote:
LegolasKiss wrote:
[...]
so the log is like this now:
time cost is 3. 1234
time cost is 3. 234
time cost is 3. 5
.
i want to use the regular expression in vim to change all spaces into
``0'',but i can't do this
:s/\v(\d\.\s*)@=\s/0/g
This does work.
Nice, AP. I had believed (I thought on the basis of having run some tests...)
that
\zs was just syntactic sugar for \@= and that they thus behaved the same way,
so
didn't even try it, though I thought of it. Obviously I was wrong!
There may be many