Search code examples
htmlkeyboard-shortcutssublimetext3key-bindings

Jump from one tag content to next tag content in Sublime


Currently I have to edit a lot of HTML content and therefore I was wondering if there is a Sublime key shortcut to move from one tag content to the next.

For example I have a huge list and edited the content of an li. To go to the next li content and 'highlight' it for edit I need to use the mouse or a lot of the arrow keyboard keys.

I hope you understand what I describe. I'm not really sure how to 'phrase' this issue, therefore I was not very successful using Google.

As Sublime is generally awesome I was wondering if there is a shortcut for this.

I'm using Sublime Text 3 on Windows. But Mac key shortcuts are also ok, since I use Sublime on my MacBook as well. Or just telling me the name of the respective Key Binding, so I can set it myself.


Solution

  • This does not do exactly what you're asking for, but should allow you to spend quite a lot less keystrokes/mouse click.

    If the cursor is placed after an opening angle bracket <, you can use the shortcut CTRL+ALT+A to select the content of the enclosing tag e.g. with the cursor anywhere on line two after the first <:

    <div>
      <p>This is content...</p>
    </div>
    

    Would select the text: This is content....

    You would still have to do moving to next tag yourself.