{"id":1791,"date":"2012-10-20T18:50:05","date_gmt":"2012-10-20T16:50:05","guid":{"rendered":"http:\/\/planetozh.com\/blog\/?p=1791"},"modified":"2012-10-20T18:50:05","modified_gmt":"2012-10-20T16:50:05","slug":"commanding-your-text-editor-the-notepad-edition","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2012\/10\/commanding-your-text-editor-the-notepad-edition\/","title":{"rendered":"Commanding your Text Editor: the Notepad++ Edition"},"content":{"rendered":"<p>There&#39;s a <a href=\"http:\/\/blog.peepcode.com\/blog\/2012\/commanding-your-text-editor\">really nice post<\/a> that&#39;s getting shared all over the intarnets right now, showcasing useful keyboard tricks in various editors, but <a href=\"https:\/\/twitter.com\/ozh\/status\/259337933922902016\">I thought<\/a> it missed <a href=\"http:\/\/notepad-plus-plus.org\/\">Notepad++<\/a> which does support most of those tricks out of the box.<\/p>\n<p>I decided to list a few quick keyboard tricks in Notepad++ I use daily, and there are really a few cool ones.<\/p>\n<h2>Delete whole words<\/h2>\n<p>Delete previous word: <strong>Control + Backspace<\/strong><br \/>\nDelete next word: <strong>Control + Delete<\/strong><\/p>\n<p>Actually I think that works in any Windows application since it works right here in my WordPress Write interface.<\/p>\n<p>More power: you can delete from carret to start of line or to end of line adding Shift in the combo:<\/p>\n<p>Delete to start of line: <strong>Control + Shift + Backspace<\/strong><br \/>\nDelete to end of line: <strong>Control + Shift + Delete<\/strong><\/p>\n<h2>Duplicate or delete current line<\/h2>\n<p>Duplicate current line: <strong>Control + D<\/strong><br \/>\nDelete current line: <strong>Control + L<\/strong><\/p>\n<p>I use the first one pretty often, especially when wanting to test something slightly different: duplicate line, comment first one out and slightly alter second one. Which goes along really well with next trick:<\/p>\n<h2>Comment or uncomment one or several lines<\/h2>\n<p>Comment or uncomment: <strong>Control + Q<\/strong><\/p>\n<p>That one toggles a leading <tt>\/\/<\/tt> in current line or for a line selection. You can also add &quot;stream comments&quot; (ie <tt>\/* stuff *\/<\/tt>) with the following key combo:<\/p>\n<p>Add stream comment: <strong>Shift + Control + Q<\/strong><\/p>\n<h2>Move that line<\/h2>\n<p>Switch current and previous line: <strong>Control + T<\/strong><br \/>\nMove whole line to another place: <strong>Shift + Control + Up<\/strong> or <strong>Shift + Control + Down<\/strong><\/p>\n<p>The totally cool stuff is, that second trick works with a multiple line selection. This works great to move an entire small function or CSS declaration.<\/p>\n<h2>Column Editing<\/h2>\n<p>I&#39;ve always thought that one was insane :) Pretty usefull if you want to edit several lines of a file where the same text is repeated, such as a CSS file.<\/p>\n<p>Column selection: <strong>Alt + Left Click<\/strong><\/p>\n<h2>Where does that code block starts or end? Find matching brace<\/h2>\n<p>Go to matching brace : <strong>Control + B<\/strong><\/p>\n<p>Of course the highlighting helps but when the block is taller than your screen, it&#39;s not enough. That one is one of my favorites, it makes navigation in <tt>if then else<\/tt> or <tt>function<\/tt> blocks really easy.<\/p>\n<h2>Automatic indentation<\/h2>\n<p>Select several lines and move them to the right (indent) or to the left (unindent? outdent?) in a blink<\/p>\n<p>Indent several lines: <strong>Tab<\/strong><br \/>\nUnindent several lines: <strong>Shift + Tab<\/strong><\/p>\n<h2>Scroll through the document without using your mouse<\/h2>\n<p>Scroll without changing carret position: <strong>Control + Up<\/strong> or <strong>Control + Down<\/strong><\/p>\n<h2>More !<\/h2>\n<p>That&#39;s just a few quick and useful keyboard tricks I use all the time, but there are a lot more. Notepad++ has also a gazillion plugins to do just anything you&#39;d think of. The ones I use all the time are Function List (displays a function list in the sidebar, very handy to quickly navigate) and Finger Text, one of the many snippet plugins available.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#39;s a really nice post that&#39;s getting shared all over the intarnets right now, showcasing useful keyboard tricks in various editors, but I thought it missed Notepad++ which does support most of those tricks out of the box. I decided to list a few quick keyboard tricks in Notepad++ I use daily, and there are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[218,394,395],"class_list":["post-1791","post","type-post","status-publish","format-standard","hentry","category-published","tag-notepad","tag-text-editor","tag-tricks"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/1791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=1791"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/1791\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=1791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=1791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=1791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}