Monkey Raptor

Tuesday, September 23, 2014

[Notepad++] How to Replace Tab Character to Spaces

I'm using Notepad++ v6.6.7
It's a very useful programming text editor, customization-friendly, with many external plugins, and FREE.
Python language, particularly, needs only space as the horizontal indentation.
If we're using Python, then YAML will surely be nearby.
Tab character for indentation in both languages will throw error.

Front end languages such as HTML, CSS, and JavaScript aren't that picky about that. Mwell, JavaScript is, if we check our program with the super dooper JSLint.

Nevertheless, I like neat structure in my typed programs (or something similar).
Using space only as the horizontal space is nice to make the indentation consistent between languages.

So, if we change the tab character to space, whenever we hit the tab button, it will be interpreted as space(s) in Notepad++.
We can also customize how many spaces a tab character will be. The default value in Notepad++ will be 2.


First Step: Tab Setting

Go to Settings tab on your Notepad++.


Second Step: Customize It

You can pick a specific language for switching the tabspace.
On this picture below, I clicked the [Default]. Therefore, it will be applied to any programming language.
If you need to change a particular language, scroll to that language, click it, and untick the Use the default value, continued by customizing it to suit your need.
That's about it. A little something to enhance your indentation time with Notepad++.


Information Links

[Notepad++] How to Replace Tab Character to Spaces
https://monkeyraptor.johanpaul.net/2014/09/notepad-how-to-replace-tab-character-to.html

No comments

Post a Comment

Tell me what you think...