Plugin for "tagging" plain text?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin for "tagging" plain text?

J.A.J. Pater
Dear list members,

Let's say I have a piece of text:
Lorem ipsum dolor sit amet.

Now I want a plugin or piece of vimscript which works like this:

1. I select a part of this text, in a visual block.
Let's say the words: dolor sit

2. I press a certain key combination (not to complex).

The result must be something like this:
Lorem ipsum <tag> dolor sit </tag> amet.
In which tag can be anything I like.

I did have a look at xml.vim but I didn't get very far.
I don't want the burden of full xml either.
Just very simple tagging.

Hope someone can help.

Thanks,

Adriaan.

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

To unsubscribe, reply using "remove me" as the subject.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin for "tagging" plain text?

Christian Brabandt
Hi J.A.J.!

On Di, 13 Apr 2010, J.A.J. Pater wrote:

> Let's say I have a piece of text:
> Lorem ipsum dolor sit amet.
>
> Now I want a plugin or piece of vimscript which works like this:
>
> 1. I select a part of this text, in a visual block.
> Let's say the words: dolor sit
>
> 2. I press a certain key combination (not to complex).
>
> The result must be something like this:
> Lorem ipsum <tag> dolor sit </tag> amet.
> In which tag can be anything I like.
>
> I did have a look at xml.vim but I didn't get very far.
> I don't want the burden of full xml either.
> Just very simple tagging.
>
> Hope someone can help.

Though, I have never used it, this sounds like you are looking for the
surround vim Plugin. I believe this is one of the most used/downloaded
or best rated plugin available, but I don't know it's URL. Google should
know it though.

regards,
Christian

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

To unsubscribe, reply using "remove me" as the subject.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin for "tagging" plain text?

stosss
On Tue, Apr 13, 2010 at 2:18 PM, Christian Brabandt <[hidden email]> wrote:

> Hi J.A.J.!
>
> On Di, 13 Apr 2010, J.A.J. Pater wrote:
>
>> Let's say I have a piece of text:
>> Lorem ipsum dolor sit amet.
>>
>> Now I want a plugin or piece of vimscript which works like this:
>>
>> 1. I select a part of this text, in a visual block.
>> Let's say the words: dolor sit
>>
>> 2. I press a certain key combination (not to complex).
>>
>> The result must be something like this:
>> Lorem ipsum <tag> dolor sit </tag> amet.
>> In which tag can be anything I like.
>>
>> I did have a look at xml.vim but I didn't get very far.
>> I don't want the burden of full xml either.
>> Just very simple tagging.
>>
>> Hope someone can help.
>
> Though, I have never used it, this sounds like you are looking for the
> surround vim Plugin. I believe this is one of the most used/downloaded
> or best rated plugin available, but I don't know it's URL. Google should
> know it though.

I am new to Vim and the list and I was just trying to get this to work
over the past several hours.

This is the URL for surround.vim

http://www.vim.org/scripts/script.php?script_id=1697

From what I can understand about this vimscript it would be exactly
what he is looking for.

I could use some help figuring out how to make this work.

--
If we can but prevent the government from wasting the labours of the
people, under the pretence of taking care of them, they must become
happy. - Thomas Jefferson

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Plugin for "tagging" plain text?

J.A.J. Pater
In reply to this post by Christian Brabandt
> Though, I have never used it, this sounds like you are looking for the
> surround vim Plugin.

Yep! That was what I needed.
Thanks a lot!

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

To unsubscribe, reply using "remove me" as the subject.