editor variables for selecting text

Are you missing a feature? Request its implementation here.
Hydrogen
Posts: 15
Joined: Fri Jan 27, 2012 11:40 am

editor variables for selecting text

Post by Hydrogen »

I'd like to suggest a pair of editor variables to delimit part of the text that is returned by a selection plugin or code template. If we for the purpose of the following example name them ${ssel} for start selection and ${esel} for end selection you could create a code template like this:

Code: Select all

    <xsl:choose>
<xsl:when test="@color='${ssel}orange${esel}'">

</xsl:when>
</xsl:choose>
When used the word "orange" would be selected and the user may choose to:
1) Overwrite with another word
2) Press left or right cursor keys to prepend or append text (e.g. change to "dark orange").
3) Invoke a selection plugin or any other command that operates on selected text
4) Use any cursor keys, click or command to leave the selected text as is
Radu
Posts: 9436
Joined: Fri Jul 09, 2004 5:18 pm

Re: editor variables for selecting text

Post by Radu »

Hi,

So let me see if I understood correctly.
Right now you can use ${caret} to say that after the insertion the caret should be placed at a certain offset.
In addition you want to have editor variables which state that after the insertion a certain range of the inserted content should be selected.

Indeed, this is a feature request, we will consider it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply