Hi all, I am stuck in one of my scripting attempts!
The context : Suppose I want to delete the string "bio" from the following line "The biosphere is huge" and I want to do it in this way -> /bios<CR> v<CR> //e<CR> d<CR> Now I want to do the same thing, but conditionally...basically I want to use the :if construct. I tried -> :if (@0=~"something") | exe "/bios" | exe "normal v" | exe "//e" | endif This where I am stuck; I am not able to reproduce the effect of //e<CR> through the :if construct. In this case I get the error "e481: No range allowed" and if I try -> exe "normal //e" it just stays in visual mode doing nothing. Can anyone help me out here? This is going to play a huge part in most of my scripts! Regards, Sibin DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.