Use registers in search and replace?

2013-01-13 Thread stosss
I would like to know if I can put the contents of a register on the RHS of a search and replace in a mapping. Or I would like to know if a visual mode used in a mapping can be accomplished based on the conditions. Example: a href=filenames1.htmlFilenames 1/a I need to be able to use visual mode

Re: Use registers in search and replace?

2013-01-13 Thread Bee
On Jan 13, 9:30 am, stosss sto...@gmail.com wrote: a href=filenames1.htmlFilenames 1/a I need to be able to use visual mode to grab only the letters and not the numbers. File names can be from four letters and one number to 13 letters and 3 numbers. That makes doing this not sure what result

Re: Use registers in search and replace?

2013-01-13 Thread Bee
Correction: That should be \a not \w because \w includes 0-9 :s#a href=\(\a\{4,13}\)\d\{1,3}\.html.*#\1#c Bill -- 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

Re: Use registers in search and replace?

2013-01-13 Thread stosss
On Sun, Jan 13, 2013 at 1:25 PM, Bee fo...@calcentral.com wrote: Correction: That should be \a not \w because \w includes 0-9 :s#a href=\(\a\{4,13}\)\d\{1,3}\.html.*#\1#c I appreciate the effort but that doesn't solve the problem. Also thanks for the knowledge of the \a because I didn't know

Re: Use registers in search and replace?

2013-01-13 Thread Bee
On Jan 13, 10:37 am, stosss sto...@gmail.com wrote: On Sun, Jan 13, 2013 at 1:25 PM, Bee fo...@calcentral.com wrote: Correction: That should be \a not \w because \w includes 0-9 :s#a href=\(\a\{4,13}\)\d\{1,3}\.html.*#\1#c I appreciate the effort but that doesn't solve the problem.

Re: Use registers in search and replace?

2013-01-13 Thread Bee
Sorry for the multiple errors, A cold caught me :( :help substitute should be: :help substitute() Bill -- 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

Re: Use registers in search and replace?

2013-01-13 Thread BPJ
On 2013-01-13 19:37, stosss wrote: On Sun, Jan 13, 2013 at 1:25 PM, Bee fo...@calcentral.com wrote: Correction: That should be \a not \w because \w includes 0-9 :s#a href=\(\a\{4,13}\)\d\{1,3}\.html.*#\1#c I appreciate the effort but that doesn't solve the problem. Also thanks for the

Re: Use registers in search and replace?

2013-01-13 Thread stosss
Bill, On Sun, Jan 13, 2013 at 2:26 PM, Bee fo...@calcentral.com wrote: Sorry for the multiple errors, A cold caught me :( :help substitute should be: :help substitute() I took a closer look at the \a you showed me and solved my problem with that by adding in a few more command strings.

Re: Use registers in search and replace?

2013-01-13 Thread Bee
On Jan 13, 12:23 pm, stosss sto...@gmail.com wrote: Bill, On Sun, Jan 13, 2013 at 2:26 PM, Bee fo...@calcentral.com wrote: Sorry for the multiple errors, A cold caught me :( :help substitute should be: :help substitute() I took a closer look at the \a you showed me and solved

Re: Use registers in search and replace?

2013-01-13 Thread stosss
bpj On Sun, Jan 13, 2013 at 2:28 PM, BPJ b...@melroch.se wrote: On 2013-01-13 19:37, stosss wrote: On Sun, Jan 13, 2013 at 1:25 PM, Bee fo...@calcentral.com wrote: Correction: That should be \a not \w because \w includes 0-9 :s#a href=\(\a\{4,13}\)\d\{1,3}\.html.*#\1#c I appreciate the

Re: Use registers in search and replace?

2013-01-13 Thread stosss
On Sun, Jan 13, 2013 at 3:29 PM, Bee fo...@calcentral.com wrote: On Jan 13, 12:23 pm, stosss sto...@gmail.com wrote: Bill, On Sun, Jan 13, 2013 at 2:26 PM, Bee fo...@calcentral.com wrote: Sorry for the multiple errors, A cold caught me :( :help substitute should be: :help

Re: Use registers in search and replace?

2013-01-13 Thread Bee
:help \a is the collection [A-Za-z] all upper and lower case alphabet characters possibly faster than [A-Za-z] :help /[] a collection create your own collection [a-fz] only lower case letters a b c d e f z :help \( a grouping surround part of the search pattern with \( ... \) then use \1 in the

Re: Use registers in search and replace?

2013-01-13 Thread stosss
On Sun, Jan 13, 2013 at 3:56 PM, Bee fo...@calcentral.com wrote: :help \a is the collection [A-Za-z] all upper and lower case alphabet characters possibly faster than [A-Za-z] :help /[] a collection create your own collection [a-fz] only lower case letters a b c d e f z :help \( a