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