{"id":377,"date":"2012-12-03T13:55:08","date_gmt":"2012-12-03T18:55:08","guid":{"rendered":"http:\/\/www.virtualroadside.com\/blog\/?p=377"},"modified":"2019-04-05T00:34:18","modified_gmt":"2019-04-05T05:34:18","slug":"notepad-plugin-to-enable-unindent-on-backspace-key","status":"publish","type":"post","link":"http:\/\/www.virtualroadside.com\/blog\/index.php\/2012\/12\/03\/notepad-plugin-to-enable-unindent-on-backspace-key\/","title":{"rendered":"Notepad++ plugin to enable unindent on backspace key"},"content":{"rendered":"<p>When I first started using editors, I was a tabs person. I always set the tab size to 4 since I liked the way that looked, and used tabs instead of spaces. And it wasn&#8217;t really a philosophical reason behind it, it was very simple actually:<\/p>\n<p><strong>I really hate hitting backspace 4 times to unindent<\/strong><\/p>\n<p>Seems simple enough. Yes, I know you can use SHIFT-BACKSPACE or other voodoo to make it work, but I want to hit *one* key.<\/p>\n<p>Because of this, I always used 4-space tabs instead of inserting spaces instead of tabs. However, at some point I started writing a project in python, and python tends to encourage spaces vs tabs. Notepad++ is my favorite editor, so I decided to write a plugin for Notepad++ to make using spaces a lot less annoying &#8212; and in particular, to make it so that when I hit backspace, it would magically eat the spaces back to the next indentation level.<\/p>\n<p>In the process of trying to do this, I discovered that the Scintilla editing component actually has this functionality built-in &#8212; you just need to enable SCI_SETBACKSPACEUNINDENTS on the editor component. So I took the sample plugin for Notepad++ and added two lines of code that enabled this functionality, and it works great! Ever since then, I&#8217;ve used spaces instead of tabs, since I really can&#8217;t tell the difference &#8212; and that&#8217;s how I like it \ud83d\ude42<\/p>\n<p>I actually wrote this thing a rather long time ago, and never got around to actually cleaning it up and releasing it. I&#8217;ve decided to release it in its present form, since it&#8217;s so useful and very simple. It would be even better if Notepad++ had an option to enable this, but this works just as well until that happens.<\/p>\n<p>This plugin is known to work in versions of Notepad++ since 4.x, and works in Notepad++ running under Wine also. Download the <a href=\"http:\/\/www.virtualroadside.com\/software\/#npp_tabs\">Notepad++ tabs plugin<\/a> at my usual software page.<\/p>\n<p><strong>Note:<\/strong> <em>I&#8217;ve now posted the code as a <a href=\"https:\/\/github.com\/virtuald\/npp_tabs\">project on Github<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I first started using editors, I was a tabs person. I always set the tab size to 4 since I liked the way that looked, and used tabs instead of spaces. And it wasn&#8217;t really a philosophical reason behind it, it was very simple actually: I really hate hitting backspace 4 times to unindent [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,51,31],"tags":[],"_links":{"self":[{"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/377"}],"collection":[{"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":5,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":550,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/377\/revisions\/550"}],"wp:attachment":[{"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}