{"id":376,"date":"2010-05-03T15:43:04","date_gmt":"2010-05-03T15:43:04","guid":{"rendered":"https:\/\/blogs.mathworks.com\/desktop\/2010\/05\/03\/selecting-a-whole-line\/"},"modified":"2010-06-22T13:07:04","modified_gmt":"2010-06-22T13:07:04","slug":"selecting-a-whole-line","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2010\/05\/03\/selecting-a-whole-line\/","title":{"rendered":"Selecting a whole line"},"content":{"rendered":"<p>I&#8217;m thinking of turning posts about our underutilized features into a reoccurring series. What do you think of &#8220;Hidden Gems&#8221; or &#8220;Desktop Tricks &#038; Tips&#8221; or &#8220;11 Things You Can Do MATLAB, but Were Afraid to Ask&#8221;? While I think about these, I&#8217;m going to present another Editor feature, along the lines of <a href=\"https:\/\/blogs.mathworks.com\/community\/2010\/01\/18\/two-editor-shortcuts-i-bet-you-didnt-know-about\/\">Two Editor Shortcuts I Bet You Didn&#8217;t Know About<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/community\/2010\/01\/25\/open-as-text\/\">Open As Text<\/a>. This is selecting the whole line in the Editor.<\/p>\n<p>There are two ways to select an entire line with the mouse:<\/p>\n<ol>\n<li>triple click anywhere on the line<\/li>\n<li>click on the space between the break-point gutter and the start of the line<\/li>\n<\/ol>\n<p>The advantage of the second approach is that you can hold down the mouse button and drag it down to select multiple lines at a time. (You can also drag the selection on the third-click with #1,  but I find #2 easier). <\/p>\n<p>The keyboard equivalent is a little messier because they depend on the current location of the caret. For instance if you&#8217;re at the beginning or end of a line, you can press Shift + Home or Shift + End to move the caret and select the whole line. If you&#8217;re in the middle of the line, you&#8217;d have to move to the beginning (Home) or end (End) first. <\/p>\n<p>Were you aware of these mouse actions? What other hidden gems do you find useful?<\/p>\n<p>Also don&#8217;t forget currently going on is the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/contest\/contests\/2\">MATLAB Programming Contest<\/a>! It&#8217;s not too late to enter, it&#8217;s going on through Wednesday. I got to try it out internally, and this is a fun one.<\/p>\n<p><strong>EDIT Jun-22-10<\/strong>: fixed link in paragraph 1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m thinking of turning posts about our underutilized features into a reoccurring series. What do you think of &#8220;Hidden Gems&#8221; or &#8220;Desktop Tricks &#038; Tips&#8221; or &#8220;11&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2010\/05\/03\/selecting-a-whole-line\/\">read more >><\/a><\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/376"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}