Selecting lines by selecting line number


Another great feature would be to allow developers to select a whole line by selecting the line number on the left pane.


I created the script that you need.

You need to add this code to your file.

{$} = require 'atom'
atom.workspaceView.eachEditorView (editorView) ->
  editor = editorView.getEditor()

  $('.line-number').on 'click', ->
    line = parseInt $(this).text()

On click events

Thanks AbeEstrada!! I will add this to the file right away


This is awesome. Could it be a package?


Actually, if you look here:

It turns out that they implemented selecting the line by Shift-clicking the line number.


Thanks mucho. I wonder why the shift is required. Many IDEs including Visual Studio just require a click.

Oh, I see it is just moving the cursor. I guess that gives you an automatic two-for-one feature.