Saturday, April 6, 2013

Re: Weird:: substitute by using register with combinations


On Sat, Apr 6, 2013 at 3:44 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:


I had to try it out to determine what you meant, but I reproduced the problem in Windows 7 64-bit, running Vim 7.3.822.
Thank you, Sir. Here is the thing.

Sometimes i have to execute a number of substitutions over and over again from testing, inspection to confirmation, which covers various aspects of various combinations(e.g. historical characters of Proto-Indo-European). Just like:
=============================
%s#_piechar1_#u̯#g
%s#_piechar2_#œ̄#g
%s#_piechar3_#i̷#g
%s#_piechar4_#x̿#g
%s#_piechar5_#y̥#g
.....
%s#_piecharn_#t̞#g
=============================
So I usually save/modify/keep these commands in a file, test them one by one. After verification,  I copy all of them into a register(e.g. register w) and then run them in command-line as follows.
:@w
:@0
....
:@:
:@@
Unfortunately all the above operations were failed if the command(s) contain(s) combination(s).



On Sat, Apr 6, 2013 at 3:44 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:
On Thursday, April 4, 2013 11:53:16 PM UTC-5, William Fugh wrote:
> It's OK if execute the following in command-line directly
> :%s#combinations#œ̄ṣ́#g
>
> However, if like this:
> :let @w = "%s#combinations#œ̄ṣ́#g"
> :@w
> the combinations will be lost. :-(
>
>

I had to try it out to determine what you meant, but I reproduced the problem in Windows 7 64-bit, running Vim 7.3.822.

Better problem description:

With text:

  one combinations two combinations three

Executing :%s#combinations#œ̄ṣ́#g directly, will correctly replace the text with:

  one œ̄ṣ́ two œ̄ṣ́ three

But saving "%s#combinations#œ̄ṣ́#g" to register w, and then executing with :@w, results in:

  one œṣ two œṣ three

Note the lack of combining characters in the resulting text.

At this point, :reg w shows:

--- Registers ---
"w   %s#combinations#œ̄ṣ́#g

So the register value was set properly, this seems like a problem in Vim.

This all happens with gvim -N -u NONE -i NONE, after only setting encoding to utf-8 and setting an appropriate font.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
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
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: