Re: swapping three columns in a file..

2006-12-19 Thread Milan Vancura
   How to swap the three columns in file without using substitute
 command? 

Hi,
 I don't understand why you can't use :s so I don't know if the following
solution would be usable for you. 

defining:

qq/\/\/BOF\Enterjj^V/\/\/EOF\Enterkkf dA ^Cp

Enter means Enter key
^V and ^C mean ctrl-V and ctrl-C

using:

@q

 The information contained in this electronic message and any attachments to
 this message are intended for the exclusive use of the addressee(s) and may
 contain proprietary, confidential or privileged information. If you are not
 the intended recipient, you should not disseminate, distribute or copy this
 e-mail. Please notify the sender immediately and destroy all copies of this
 message and any attachments. 

 WARNING: Computer viruses can be transmitted via email. The recipient should
 check this email and any attachments for the presence of viruses. The company
 accepts no liability for any damage caused by any virus transmitted by this
 email.

Please use an e-mail account administered by someone inteligent, who doesn't
put these (or similar) stupid and arrogant automatic footers. You are posting
an e-mail to the list and there are clear rules of that list. One well known
property of it is HTML mirroring readable by anybody on the world. If you don't
agree with this, don't send any electronic message to it.

The same about viruses. Instead of sending them with a warning that it is a
recipient's problem to get a virus (which is really very arrogant warning!!)
don't send viruses at all :-)

I hope this is your misunderstanding, you probably use an employer's e-mail
server instead of getting your own personal e-mail account for personal
e-mails. Please change it.

Milan Vancura
--
Milan Vancura, Prague, Czech Republic, Europe


Re: Vim test suite

2006-12-19 Thread A.J.Mechelynck

Nikola Knezevic wrote:

On 18 Dec 2006, at 15:15 , A.J.Mechelynck wrote:



What is your problem? After I compile Vim, if
src/vim --version |more (on Unix-like systems)
or
src\vim --version |more (on Dos-like systems)
src\gvim
:version
:q



Thanks Tony.
I don't have problem with Vim :) I'm doing research on system 
manageability, and I'm experimenting how an app behaves on different 
systems/different versions. Vim is sth I use every day, so I thought 
starting from it.
make test is something I really appreciate, since I can run then 
automatically.


I would also need older versions. How to/where from obtain them?

Cheers,
Nikola


For Windows, Steve Hall's download page 
https://sourceforge.net/project/showfiles.php?group_id=43866package_id=39721 
has a number of different patchlevels of 7.0, with a link to older releases 
at the bottom.


Or you can get source distributions (going back as far as 3.0) in .tar.bz2 
format from http://ftp.vim.org/pub/vim/unix/ with additional (non-unix and/or 
non-en-US) files going back to 5.0 (extra) and 6.0 (lang) in .tar.gz format at 
http://ftp.vim.org/pub/vim/extra/ . As explained in 
http://users.skynet.be/antoine.mechelynck/vim/compile.htm and 
http://users.skynet.be/antoine.mechelynck/vim/compile.htm , I recommend 
downloading the full (unix+extra+lang) sources regardless of whether or not 
you're on Unix, whether or not you want English messages and menus.


Note that from time to time, bugs have been identified (and fixed) in the test 
suite too, see the patch descriptions in http://ftp.vim.org/pub/vim/patches/ 
and its subdirectories.



Best regards,
Tony.


RE: swapping three columns in a file..

2006-12-19 Thread sasikumar.kandhasamy

Hope following command is quite easy to manipulate,

Mark the first line as mt, then use awk to swap the columns

't,. !awk '{print $3   $2   $1}'

Thanks  Regards,
Sasikumar Kandhasamy
Project Engineer
Wipro Technologies
Madivala-1|Bangalore.
 
Mobile- +91-9986378586 | Phone: 30292842
 
Dreams into Thoughts and Thoughts into Actions -- Dr. A P J Abdul
Kalam

-Original Message-
From: Milan Vancura [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 1:55 PM
To: Sasikumar Kandhasamy (WT01 - TELECOM SERVICE PROVIDER)
Cc: Vim development list
Subject: Re: swapping three columns in a file..

   How to swap the three columns in file without using substitute
 command? 

Hi,
 I don't understand why you can't use :s so I don't know if the
following
solution would be usable for you. 

defining:

qq/\/\/BOF\Enterjj^V/\/\/EOF\Enterkkf dA ^Cp

Enter means Enter key
^V and ^C mean ctrl-V and ctrl-C

using:

@q

 The information contained in this electronic message and any
attachments to
 this message are intended for the exclusive use of the addressee(s)
and may
 contain proprietary, confidential or privileged information. If you
are not
 the intended recipient, you should not disseminate, distribute or copy
this
 e-mail. Please notify the sender immediately and destroy all copies of
this
 message and any attachments. 

 WARNING: Computer viruses can be transmitted via email. The recipient
should
 check this email and any attachments for the presence of viruses. The
company
 accepts no liability for any damage caused by any virus transmitted by
this
 email.

Please use an e-mail account administered by someone inteligent, who
doesn't
put these (or similar) stupid and arrogant automatic footers. You are
posting
an e-mail to the list and there are clear rules of that list. One well
known
property of it is HTML mirroring readable by anybody on the world. If
you don't
agree with this, don't send any electronic message to it.

The same about viruses. Instead of sending them with a warning that it
is a
recipient's problem to get a virus (which is really very arrogant
warning!!)
don't send viruses at all :-)

I hope this is your misunderstanding, you probably use an employer's
e-mail
server instead of getting your own personal e-mail account for personal
e-mails. Please change it.

Milan Vancura
--
Milan Vancura, Prague, Czech Republic, Europe


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com


[Feature Request] Vim should respond to WM_PASTE

2006-12-19 Thread Nikolai Weibull

It seems GVim doesn't respond to the WM_PASTE message on Windows.  It
would be really sweet if it did.  I sadly have no intention of
implementing this myself, but would appreciate it if this could be
added to the TODO.

Thanks.

 nikolai


Re: swapping three columns in a file..

2006-12-19 Thread Charles E Campbell Jr

[EMAIL PROTECTED] wrote:


 How to swap the three columns in file without using substitute
command? 


Let us say file with the following contents,

A1 B1 C1 


A2 B2 C2

Then after swapping the file content should be,

C1 A1 B1

C2 A2 B2
 


There's visswap, which you can get from

  http://mysite.verizon.net/astronaut/vim/index.html#VISSWAP

(and as mentioned in http://vim.sourceforge.net/tips/tip.php?tip_id=329)

With it, you can

 a) visually select a column using visual blocks (ctrl-v and move cursor)
 b) press ctrl-y(sort of a yank)
 c) visually select another column using visual blocks
 c) press ctrl-x(exchange)

Works with V and v (visually selected lines, visually selected 
characters), too.


So:

 1) swap columns A  C
 2) swap columns B  A

Regards,
Chip Campbell



Re: [Feature Request] Vim should respond to WM_PASTE

2006-12-19 Thread A.J.Mechelynck

Nikolai Weibull wrote:

It seems GVim doesn't respond to the WM_PASTE message on Windows.  It
would be really sweet if it did.  I sadly have no intention of
implementing this myself, but would appreciate it if this could be
added to the TODO.

Thanks.

 nikolai



Doesn't it already? Which actions do you perform to trigger that message? 
AFAIK, dragging with the mouse, or clicking Edit = Paste, both trigger an 
action in (g)vim. As for Ctrl-V, that is distinct from the Windows Paste 
operation (in Vim it is a literalize prefix in Insert monde or a Blockwise 
visual command in Normal mode) but you can map it (not recommended) by 
sourcing mswin.vim.



Best regards,
Tony.


Re: [Feature Request] Vim should respond to WM_PASTE

2006-12-19 Thread Nikolai Weibull

On 12/19/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:


Nikolai Weibull wrote:



 It seems GVim doesn't respond to the WM_PASTE message on Windows.  It
 would be really sweet if it did.  I sadly have no intention of
 implementing this myself, but would appreciate it if this could be
 added to the TODO.



Doesn't it already?


No; that's why I'm posting this feature request.


Which actions do you perform to trigger that message?


PostMessage [1]


AFAIK, dragging with the mouse, or clicking Edit = Paste, both trigger an
action in (g)vim.


Yes, but as you may know, menus are much like mappings, and this
particular one executes +gP in normal mode.

 nikolai

[1] http://www.google.com/search?q=PostMessage


Re: [Feature Request] Vim should respond to WM_PASTE

2006-12-19 Thread A.J.Mechelynck

Nikolai Weibull wrote:

On 12/19/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:


Nikolai Weibull wrote:



 It seems GVim doesn't respond to the WM_PASTE message on Windows.  It
 would be really sweet if it did.  I sadly have no intention of
 implementing this myself, but would appreciate it if this could be
 added to the TODO.



Doesn't it already?


No; that's why I'm posting this feature request.


Which actions do you perform to trigger that message?


PostMessage [1]

AFAIK, dragging with the mouse, or clicking Edit = Paste, both 
trigger an

action in (g)vim.


Yes, but as you may know, menus are much like mappings, and this
particular one executes +gP in normal mode.

 nikolai

[1] http://www.google.com/search?q=PostMessage



Try using the client-server feature instead.

See
:help remote.txt
:vimgrep /\FEAT_CLIENTSERVER\/g src/*.[ch]

in the source directory tree.


Best regards,
Tony.