Re: set a variable to a value with spaces in enter-command

2015-05-31 Thread Xu Wang
On Sat, May 30, 2015 at 2:35 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:
 On Sat, May 30, 2015 at 02:03:49PM -0400, Xu Wang wrote:
 Dear all,

 If I have the following in my rc:

 set editor=one -arg1 -arg2

 Maybe try:

   set editor=\one -arg1 -arg2\

 --
 Suvayu

 Open source is the future. It sets us free.

This does work. Thank you for this and all of your other helps.

Kind regards,

Xu


Re: set a variable to a value with spaces in enter-command

2015-05-30 Thread Suvayu Ali
On Sat, May 30, 2015 at 02:03:49PM -0400, Xu Wang wrote:
 Dear all,
 
 If I have the following in my rc:
 
 set editor=one -arg1 -arg2

Maybe try:

  set editor=\one -arg1 -arg2\

-- 
Suvayu

Open source is the future. It sets us free.


set a variable to a value with spaces in enter-command

2015-05-30 Thread Xu Wang
Dear all,

If I have the following in my rc:

set editor=one -arg1 -arg2
set my_var=$editor
macro index w enter-commandset my_var2=$editorenter test

When I do
:set my_var
it correctly prints out one -arg1 -arg2.
However if I press 'w' and then
:set my_var2
it does not seem to work.

How can I be careful to copy variables respecting that one might have a space?

Kind regards,

Xu


Re: set a variable to a value with spaces in enter-command

2015-05-30 Thread Suvayu Ali
On Sat, May 30, 2015 at 02:03:49PM -0400, Xu Wang wrote:

 macro index w enter-commandset my_var2=$editorenter test

Probably this is better:

  macro index w enter-commandset my_var2=\$editor\enter test

-- 
Suvayu

Open source is the future. It sets us free.