tag:blogger.com,1999:blog-22120968.post2809562575542442724..comments2024-03-22T13:47:33.583-04:00Comments on Jon Schneider's Tech Blog: Don't treat Underscore as a word separator character on double-clickJon Schneiderhttp://www.blogger.com/profile/05718316809087214442noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-22120968.post-67443361864867824752022-03-01T15:26:20.298-05:002022-03-01T15:26:20.298-05:00I am 100% with Derrick here. I found this post try...I am 100% with Derrick here. I found this post trying to find out how to STOP windows from selecting across any punctuation, underscores and periods being the most common. My personal issue is with accidentally deleting file extensions when I just want to rename the last word.Anonymoushttps://www.blogger.com/profile/06967025818071168719noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-80071089036168295352021-11-09T20:26:40.371-05:002021-11-09T20:26:40.371-05:00I wholeheartedly disagree and hate that more appli...I wholeheartedly disagree and hate that more applications are moving to the proposed behavior because it makes one group's life marginally easier while making the other group's significantly harder.<br /><br />Now to select actual individual words in snake_case I have to double-click, then switch to keyboard and meticulously tap Left-arrow while holding Shift (because of course Ctrl+Left-arrow will just deselect everything).<br /><br />All you had to do to select multiple words was drag mouse a little after double-clicking (or tap Ctrl+Right-arrow once), and it would auto-select the next word.<br /><br />One step forward, two steps back.Derrickhttps://www.blogger.com/profile/12795547645907452311noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-48902551242972354772021-03-05T08:06:55.802-05:002021-03-05T08:06:55.802-05:00I've created a small MS Word add-on to mend th...I've created a small MS Word add-on to mend this (and some other) issue. If anyone's still interested please give it a try. Word of warning (pun not intended) it may be buggy at this stage :)<br /><br />Anyways you can grab it at: https://battlepuli.com/selectron/Anonymoushttps://www.blogger.com/profile/02175941297148437867noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-13475184565212556792016-10-14T21:56:50.891-04:002016-10-14T21:56:50.891-04:00OMG - Perfect - I have been searching for this lit...OMG - Perfect - I have been searching for this literally for years <br /> .... here is 12 year old ticket <br /><br /> https://bugzilla.mozilla.org/show_bug.cgi?id=196175Scott Stenslandhttps://www.blogger.com/profile/09968734362393980360noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-48402870321576366732016-08-01T10:01:14.399-04:002016-08-01T10:01:14.399-04:00@Anon:
Sorry to hear it didn't work!
A bette...@Anon:<br /><br />Sorry to hear it didn't work!<br /><br />A better-than-nothing workaround might be to double-click the first part of the word, then keep holding down the mouse on the 2nd click and drag to select the remainder of the word.<br /><br />Double-click-drag selects entire words at a time, so that might at least save you from the annoying thing of trying to position the mouse in a drag-to-select with perfect precision such that the characters in your word, but no more, are selected!Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-10885052840209060952016-08-01T02:54:52.934-04:002016-08-01T02:54:52.934-04:00Ah crap, ignore my post above on the CTRL key, it ...Ah crap, ignore my post above on the CTRL key, it doesn't work. I was desperately trying to find a solution to this, and inadvertently tested this on a list of such underscored words, where only those words are in the list. CTRL select selects the whole line, but in such a list, this is just the word. I was so excited I found a solution, I posted in haste. Dang, back to the drawing boardAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-65255924255925676972016-08-01T02:49:50.535-04:002016-08-01T02:49:50.535-04:00Lets no be shy in keeping an 8 year old thread ali...Lets no be shy in keeping an 8 year old thread alive!<br /><br />In Office 2013 if you hold down CTRL when selecting it will select the whole word as you want it to (where underscores are considered part of the word)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-27523679411903205552015-10-13T09:28:23.307-04:002015-10-13T09:28:23.307-04:00I've wrote VBA marco for MS Word:
Create a cla...I've wrote VBA marco for MS Word:<br />Create a class named "underscoreDoubleClick":<br />-------------------------------------------------------------------------<br />Public WithEvents appWord As Application<br /><br />Const characters As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"<br />Private flagDoubleClick As Boolean<br /><br />Private Sub appWord_WindowBeforeDoubleClick(ByVal Sel As Selection, Cancel As Boolean)<br />flagDoubleClick = True<br />End Sub<br /><br />Private Sub appWord_WindowSelectionChange(ByVal Sel As Selection)<br /><br />If flagDoubleClick Then<br /><br />If Selection.characters.First.Text = "_" And InStr(characters, Selection.Previous(Unit:=wdCharacter, Count:=1).Text) Then<br />Selection.Start = Selection.Previous(Unit:=wdWord, Count:=1).Start<br />End If<br /><br />If Selection.characters.Last.Text = "_" And InStr(characters, Selection.Next(Unit:=wdCharacter, Count:=1).Text) Then<br />Selection.End = Selection.Next(Unit:=wdWord, Count:=1).End<br />End If<br /><br />While Selection.Next(Unit:=wdCharacter, Count:=1).characters.First.Text = "_"<br />Selection.End = Selection.End + 1<br />If InStr(characters, Selection.Next(Unit:=wdCharacter, Count:=1).Text) Then<br />Selection.End = Selection.Next(Unit:=wdWord, Count:=1).End<br />End If<br />Wend<br /><br />While Selection.Previous(Unit:=wdCharacter, Count:=1).characters.Last.Text = "_"<br />Selection.Start = Selection.Start - 1<br />If InStr(characters, Selection.Previous(Unit:=wdCharacter, Count:=1).Text) Then<br />Selection.Start = Selection.Previous(Unit:=wdWord, Count:=1).Start<br />End If<br />Wend<br /><br />flagDoubleClick = False<br />End If<br />End Sub<br />-------------------------------------------------------------------------<br />Create a module:<br />-------------------------------------------------------------------------<br />Dim X As New underscoreDoubleClick<br />Sub Register_EventHandler()<br />Set X.appWord = Word.Application<br />End Sub<br />-------------------------------------------------------------------------<br />Then we should initialize event handler when weopen word document, add this to "ThisDocument":<br />-------------------------------------------------------------------------<br />Private Sub Document_Open()<br />Call Register_EventHandler<br />End Sub<br />-------------------------------------------------------------------------Anonymoushttps://www.blogger.com/profile/03007393207058689712noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-80645638823557152012015-10-13T09:21:21.329-04:002015-10-13T09:21:21.329-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03007393207058689712noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-70158150711090236212015-10-13T09:18:55.745-04:002015-10-13T09:18:55.745-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03007393207058689712noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-69413947316547027462015-10-13T09:16:50.243-04:002015-10-13T09:16:50.243-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03007393207058689712noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-11720689892124360172014-07-16T17:51:23.854-04:002014-07-16T17:51:23.854-04:00I find Mozilla's lack of support for this noth...I find Mozilla's lack of support for this nothing short of insane. There is so much code talk that happens on the web, how could they eat their own dog food and remain sane with this bug? And Microsoft Outlook is especially frustrating when talking about code. This is a no-brainer. Get it done. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-5541589103525851502014-01-06T21:30:42.821-05:002014-01-06T21:30:42.821-05:00This bug can be really annoying when developing Op...This bug can be really annoying when developing OpenGL apps... Chrome gets underscores right, but Chrome's support for MathML is nearly non-existent at the moment, and it is used frequently on http://www.opengl.org/sdk/docs/man/Benhttps://www.blogger.com/profile/01078793410884639162noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-1454428927035145362013-04-09T14:28:34.685-04:002013-04-09T14:28:34.685-04:00No solutions?No solutions?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-41900431771297957122013-01-04T13:13:53.794-05:002013-01-04T13:13:53.794-05:00I agree, it would be great if MS Word could have t...I agree, it would be great if MS Word could have this as a config option.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-11831215899510747462012-11-02T10:53:35.970-04:002012-11-02T10:53:35.970-04:00Anyone have any fixes for Word 2010 (or other vers...Anyone have any fixes for Word 2010 (or other versions)? I've seen some macros out there, but that solution seems a little cumbersome. It's very annoying to write documentation and to have to tediously copy each variable_name. Especially_since_Google_Chrome_does_this_right_and_allows_me_to_highlight_this_whole_sentence_with_a_double_click.NaturalBlogarithmhttps://www.blogger.com/profile/17271067589433572767noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-59222709646467661012012-02-10T19:08:13.973-05:002012-02-10T19:08:13.973-05:00I couldn't find that setting either. This is j...I couldn't find that setting either. This is just awful. If anyone knows please let us know.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-60453036048501411632011-06-03T17:14:59.325-04:002011-06-03T17:14:59.325-04:00One comment about Eclipse... it gets the underscor...One comment about Eclipse... it gets the underscore thing half-right. Yes, if you double-click on a token with underscores, it highlights the entire token. But, if you navigate text with Ctrl-Left or Ctrl-Right (previous/next word), the cursor jumps along as if the underscore is a delimiter. For the life of me, I can't seem to find the setting in Eclipse that would force the "Next Word" or "Previous Word" commands, to which those keys are bound, to treat underscore as any other hard character. Annoying. One of the reasons why I haven't embraced Eclipse as my primary code editor (I've used EmEditor for years and love it).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-21548426092407902132011-01-04T17:43:37.681-05:002011-01-04T17:43:37.681-05:00@Anon (5:16p): Not that I'm aware of, no, alth...@Anon (5:16p): Not that I'm aware of, no, although I haven't searched. Feel free to do so and link the issue here, and I'll update the main post above!Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-22375342357549047052011-01-04T17:16:48.905-05:002011-01-04T17:16:48.905-05:00Nobody has filed this in bugzilla yet then?Nobody has filed this in bugzilla yet then?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-57233419966057030302010-02-23T21:12:54.988-05:002010-02-23T21:12:54.988-05:00I agree as well. TOAD has had this option since a...I agree as well. TOAD has had this option since about version 7.x. The option is "Treat underscore as a word character".Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-41958040571119163292009-10-15T07:37:05.621-04:002009-10-15T07:37:05.621-04:00Strongly agree!
To me "this_set_of_character...Strongly agree! <br />To me "this_set_of_characters" is one word.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-63796304596977317332009-01-06T21:35:00.000-05:002009-01-06T21:35:00.000-05:00@Anonymous -- I never knew about the double-click-...@Anonymous -- I never knew about the double-click-drag operation. Thanks for the pointer! <BR/><BR/>Have you ever contacted Logitech or Razor about this? Maybe their developers don't know about the problem?Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-123820806054325062009-01-05T18:18:00.000-05:002009-01-05T18:18:00.000-05:00As a side comment, I'm frustrated with how differe...As a side comment, I'm frustrated with how different brands of mice implement double-click macros differently. Try this manually: double-click on the first word in a sentence, but do not release the second click, then drag your mouse over subsequent words. You'll notice that this puts the selection behavior into word-select mode, which is very handy in programming and for those of us who have disabled "select entire word" in our MS Word and Outlook settings (by default we select single characters, but double-click+drag selects entire words).<BR/><BR/>Most extra-buttoned mice come with a double-click macro that can be assigned to a button, but so far only Microsoft mice seem to get it right and allow the double-click+drag capability. Logitech and Razor mice get it wrong. With Logitech, the second click is released even if you don't release the mouse button, so you can't drag. With Razor, even weirder things happen -- the second click doesn't happen until releasing the button, and sometimes an extra click gets thrown in for good measure (triple-click).<BR/><BR/>I've adopted these erroneous behaviors as a pet peeve. Bad dog! Bad dog!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-44213539672305227092008-10-31T16:17:00.000-04:002008-10-31T16:17:00.000-04:00@george anderson - I hadn't been aware of that Fir...@george anderson - I hadn't been aware of that Firefox setting -- thanks for pointing it out!<BR/><BR/>However, the setting apparently only gets us part of the way there -- not only does it enable whole-word selection for words with underscores (like: user_name), it causes a double-click to select across *all* punctuation characters (like: user.name). My ideal behavior (as described in the original post) would be for a double-click select to select across underscore characters, but not other punctuation characters.Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.com