1

OK, lets just do a case in point, but before that, a simple key.

"*" means "this is where the cursor is".
"**" means "this is where we'd like the cursor to be able to 'jump' to"

Now assume you or I need to write some code, lets say we're not really even thinking that hard and might even be copying down someone else's code. We're patient, but in a hurry. OK, so you're writing this...

<div class="subject show"> 
#ok, the ">" and "" were pregenerated, but I didn't need to skip, next line
<h2>title*</h2>**

and immediately we meet the issue. Yes, it is great that my IDE automatically generated the end tag for my h2 tag, but when I get finished defining it, how do I skip outside of the bracket?

<h2>Show Subject*</h2>**

If my cursor were where that single asterisk is, how might I auto-skip to the place where two asterisks are? What would that even be called? That is essentially my question here. I assume the answer will be very short and simple. Here a couple more examples to pound the point in.

Continuing on in the same html.erb file...

  <table summary="Subject detail view">
    <tr>
      <th>Name*</th>**
    </tr>
  </table>
</div>

So here, my IDE (RubyMine, Aptana which I also use does similar stuff, as do most other editors) performs beautifully, automatically generating end tags which I will only need to move beyond later on. I run into the next snag after finishing typing "Name". Again, I'm stuck at * but want to jump to ** without too much disruption.

By now I think I've made my point. I love this community and know some of you know how to get around this. It's a challenge itself just to describe what it is we're even doing here! I'd call it "jumping over the automatically generated end tag", but Google is not sympathetic to this query as of yet.

boulder_ruby
  • 38,457
  • 9
  • 79
  • 100

2 Answers2

3

Try pressing the End key, That will skip to the end of the line.

Sources: http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts

Matt
  • 46
  • 3
1

In some IDE, pressing the tab key will move your cursor to the next placeholders in the currently auto replaced element, and if there is no more placeholders, brings you past the end of the auto replaced text.

Lie Ryan
  • 62,238
  • 13
  • 100
  • 144
  • what is this function called? My IDE's (RubyMine and Aptana) will automatically generate predicted methods and stuff using tab, but this other function eludes them. I would be greatly interested in knowing what this ability is called. – boulder_ruby May 19 '12 at 02:57
  • 1
    @David: in gedit this feature is provided by the built in snippet plugin. – Lie Ryan May 19 '12 at 03:54