Tuesday, May 4, 2010

Re: surrounding a word with tag with a dynamic attribute

I'm so sorry,

It should have been {span class="sX"}discipulus{/span}

I wrote this function just now:

function! mytest()
let l:current_column=col('.')
exe 'normal b'
let l:beginning_column=col('.')
let l:diff = l:current_column - l:beginning_column + 1
" this relies on the surround plugin
exe 'normal vs'
endfunction

What do you think and thanks for your response!
Sergius


Ben Fritz wrote:
>
>
>
> On May 4, 10:17 am, discipulus <gera...@gmail.com> wrote:
>> Hello,
>>
>> I have this problem. I would like to put my cursor under a letter in a
>> word
>> (e.g. discipulus) and I want that word to be surrounded by: discipulus
>> where
>> X is the number of the letter in the word.
>>
>
> Huh?
>
> Where's the X come in? What do you want to surround? What do you want
> to surround with?
>
> --
> 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
>
>

--
View this message in context: http://old.nabble.com/surrounding-a-word-with-a-tag-%2B-a-dynamic-attribute-tp28447764p28454219.html
Sent from the Vim - General mailing list archive at Nabble.com.

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

No comments: