Home Download Buy Blog Forum Support

Select a line with triple click

Select a line with triple click

Postby matteo.gazzoni on Mon Nov 09, 2009 9:58 am

A line cannot be selected triple clicking it, why?
matteo.gazzoni
 
Posts: 12
Joined: Fri Nov 06, 2009 11:29 pm

Re: Select a line with triple click

Postby EJ12N on Wed Nov 11, 2009 5:07 am

matteo.gazzoni wrote:A line cannot be selected triple clicking it, why?

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 :/

Bad news is that I don't think you can even do a plugin for it :( 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...
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Select a line with triple click

Postby tgkeul on Wed Nov 11, 2009 10:00 pm

but the "why not!?" attitude is not good

I don't see a bad attitude. It's just a question! ;)
Maybe it's a culture clash?
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: Select a line with triple click

Postby vim on Thu Nov 12, 2009 6:37 am

actually it is a common behavior of most windows/gui application, so i guess users have tendency to try and use it.
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: Select a line with triple click

Postby EJ12N on Thu Nov 12, 2009 7:02 pm

tgkeul wrote:
but the "why not!?" attitude is not good

I don't see a bad attitude. It's just a question! ;)
Maybe it's a culture clash?

maybe :P? lol
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Select a line with triple click

Postby matteo.gazzoni on Thu Nov 12, 2009 8:13 pm

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?
matteo.gazzoni
 
Posts: 12
Joined: Fri Nov 06, 2009 11:29 pm

Re: Select a line with triple click

Postby EJ12N on Wed Nov 18, 2009 5:27 pm

matteo.gazzoni wrote: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?


Because it selects the line ending character (\n)

If you guys want this functionality I'm sure autohotkey can make it possible... :D
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Select a line with triple click

Postby EJ12N on Thu Nov 19, 2009 10:49 pm

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 :P
Code: Select all
#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
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Select a line with triple click

Postby kveldulv on Mon Dec 21, 2009 8:46 pm

+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.
kveldulv
 
Posts: 4
Joined: Mon Dec 21, 2009 6:36 pm

Re: Select a line with triple click

Postby gpfsmurf on Mon Dec 21, 2009 9:00 pm

kveldulv wrote: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.

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:
Code: Select all
<binding key="ctrl+l" command="lowerCase"/>
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Next

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests