Sublime Forum

Select a line with triple click

#1

A line cannot be selected triple clicking it, why?

1 Like

#2

Why should it be???

as far as I know people that want to highlight a line in MOST windows editors either use the shortcutā€¦ sublime is ctrl+L, click on the ā€œgutterā€ (numbers line), or do shift+end/home, or last use the mouseā€¦, double click by standard in MOST windows editors select the current word under the cursorā€¦ try it in notepadā€¦ triple clickā€¦ nothing?

Now, I am not picking up on u or your idea, I think is good to have choices but the ā€œwhy not!?ā€ attitude is not good :confused:

Bad news is that I donā€™t think you can even do a plugin for it :frowning: at least not with sublime api, you can try autohotkey, I think it could be possible with a PostMessage to send the command to highlight the line with triple clickā€¦

1 Like

#3

I donā€™t see a bad attitude. Itā€™s just a question! :wink:
Maybe itā€™s a culture clash?

1 Like

#4

actually it is a common behavior of most windows/gui application, so i guess users have tendency to try and use it.

1 Like

#5

[quote=ā€œtgkeulā€]

I donā€™t see a bad attitude. Itā€™s just a question! :wink:
Maybe itā€™s a culture clash?[/quote]

maybe :stuck_out_tongue:? lol

1 Like

#6

Because most of the programs that deal with text (Notepad does not deserve to be called program) have that shortcut.

Edit: and by the way, anyone knows why st selects, in addition to the line chosen, the beginning of the line after?

1 Like

#7

[quote=ā€œmatteo.gazzoniā€]Because most of the programs that deal with text (Notepad does not deserve to be called program) have that shortcut.
Edit: and by the way, anyone knows why st selects, in addition to the line chosen, the beginning of the line after?[/quote]

Because it selects the line ending character (\n)

If you guys want this functionality Iā€™m sure autohotkey can make it possibleā€¦ :smiley:

1 Like

#8

Hereā€™s the autohotkey code if you want to select the line with a triple clickā€¦
This just sends ctrl+L to sublimetext
Tested and worksā€¦ wonā€™t affect triple click in any other appā€¦ if you select multiple lines ctrl+click and then on the last line u triple click itā€™ll select all lines :stuck_out_tongue:

[code]#IfWinActive, ahk_class SKMainWindowClass
~*LButton::
{
if clickCount > 0
{
clickCount += 1
return
}
clickCount = 1
SetTimer, clickHandler, 400
return

clickHandler:
SetTimer, clickHandler, off
if clickCount = 3
{
;Triple click detected, send Ctrl+L shortcut to select the lineā€¦
SendEvent, ^l
}
clickCount = 0
return
}
#IfWinActive[/code]

1 Like

#9

+1 on wanting triple-click = select whole line.
This is common behavior in every other editor Iā€™ve used, I think itā€™s quite intuitive, as Iā€™m sure I found it through button-bashing, not documentation.

1 click = cursor position
2 click = select word
3 click = select entire line

Itā€™s easy enough to do a single-click again if you want to de-select something. (ie mimic current behaviour)

As for CTRL+L, my vote/suggestion would be to make currently selected line lower-case. Iā€™ve seen that elsewhere and it makes sense.

1 Like

#10

Personnally I like the current behavior (CTRL+L = selectLine)

You can add something like this to User\Default.sublime-keymap to override the default behavior:

<binding key="ctrl+l" command="lowerCase"/>
1 Like

#11

Here is a quick survey of applications I have installed on my WinXP system. These applications support triple click to select the entire line (or paragraph, where applicable):

Notepad2
Notepad++
Wordpad
Firefox
Internet Explorer
Google Chrome
Word
Powerpoint
Outlook Express
Photoshop

These applications do NOT support triple click:

Notepad
Sublime Text

Howā€™s that for an argument?

1 Like

#12

We solved this long time ago, I posted a script that allows sublime and pretty much any app to have triple click. Why bring it back :stuck_out_tongue:?

1 Like

#13

Because this a case where Sublime Text is missing a feature which a part of a de facto Windows standard, and shouldnā€™t rely on hacks requiring third party / external applications. Weā€™re posting here because we want to make a great program even better.

1 Like

#14

[quote=ā€œcheesecake23ā€]

Because this a case where Sublime Text is missing a feature which a part of a de facto Windows standard, and shouldnā€™t rely on hacks requiring third party / external applications. Weā€™re posting here because we want to make a great program even better.[/quote]

Agree. I hope jon adds it, I myself donā€™t like to resort to 3rd party apps unless necessary.

1 Like

#15

I agree on this, I use this a lot myself as well. Even though Iā€™m trying to get more into keyboard shortcuts, saving time and using the mouse (RSI?). Less mouse = less lost time.

1 Like

#16

Although not as user friendly as triple click, in order to select a whole line with a mouse, all you have to do is single click or double click on the line and drag your cursor down to the next line.

This works in Notepad.

1 Like

#17

Triple-clicking to select the line has been added in 20100411 beta. Thanks!

1 Like

#18

Whatā€™s with all of the AutoHotKey people? Iā€™m an AutoIt person me, and an MVP too :smile:

1 Like