On Aug 17, 2007, at 9:13 AM, Steve Hodgson wrote:

In a Windows editor I have used in the past cursor movement up or down will return to the start point on the previous line. This is best illustrated by example...

    <ul>
    <li><a href="">Home</a></li>
    <li><a href=""></a></li>
    <li><a href=""></a></li>
    </ul>

If I enter some text in the first item in the list and press the down arrow it would be great to return to the same start point on the next line.

Is there any way to make BBEdit adopt that behaviour?


While this doesn't directly address your request, I will tell you how I do things like this, specifically in lists and tables.

You can create a BBEdit Clipping that looks like this:

<ul>
    <li><a href="">#INSERTION#</a></li>
    <li><a href="">#INSERTION#</a></li>
    <li><a href="">#INSERTION#</a></li>
</ul>

(to do that, copy the above and paste it into a BBEdit document, then highlight it, right-click, and choose 'Save Selection as Clipping' -- I named mine ul, and overwrote the existing ul in my default HTML Clippings set).

Now, when you want to put in a new list, type ul and hit F5. You will see this:

<ul>
    <li><a href=""></a></li>
    <li><a href=""><##></a></li>
    <li><a href=""><##></a></li>
</ul>

and the insertion point will be in the first list item, between the open a and close a tags. When you're done typing there, hit control- backtick (BBEdit's command for 'Go To Next Placeholder'), and it will take you to the next list item, in the center there, where the hashes are (and it will highlight the pointy brackets and hashes, so you can type right over them). NB: If you wanted to go to the value of the href attribute instead (or in addition), you could put insertion placeholders in there, as well, and control-backtick will take you to them, too.

Then, if you want to insert another li element, you can use the built- in clipping (type li and hit F5), or create your own in the same manner as above.

That way, your workflow is like this:

'ul' F5
Type content of li
control-backtick
Type content of li
control-backtick
Type content of li
(and if you want additional li elements)
'li' F5
Type content of li
command-right arrow-return
'li' F5
(lather, rinse, repeat)

As I said, I know it's not exactly the solution you were looking for (having the editor know which element/attribute you want to type in when you move down to the next line), and it might not be right for everyone, but I've found this workflow quite efficient.

--Kerri

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to