22

Occasionally, I use Notepad to edit some form of code/html, which means I need to tab a lot. The default indent size when hitting tab is eight spaces when ideally I'd like it be four.

Is there any way to change this setting?

aligray
  • 602

4 Answers4

14

Not with Window's Notepad, but the default tab for Notepad++ (free) is 4 characters. And it does A LOT more.

http://notepad-plus-plus.org/

Gras Double
  • 1,140
  • 1
  • 14
  • 21
KCotreau
  • 25,622
2

Windows Notepad is VERY old. It existed before Windows. Here's a little known "undocumented function":

  1. Create a new text file using Notepad.
  2. Type .LOG as the first four characters. (They must be uppercase).
  3. Save and close the document.
  4. Reopen it.

I create a document named MEMO.TXT wherever I work (I'm a free-lance consultant), and use the document for quick notes -- during phone calls, meetings, as reminders, etc.

1

the way i use the windows internal notepad (short notes, quick edit things,...) is with AutoHotKey. i replaced the tab-key with a little loop to send spaces instead like this:

#NoTrayIcon
return

#IfWinActive ahk_exe notepad.exe tab:: loop 2 send % A_Space return #If

that loop 2 means, its sends 2 spaces. it can be a part of an existing script, like i do or as a single script in autostart.

0

Windows notepad doesn't allow to modify the tab length. This is one of the motivations cause I have replaced it with notepad++ that does a lot more and allows the user to set the tab length as well: go to the menu Configuration > preferences > tabulations. In this mask there is the option to set it freely. How to replace ms win notepad with notepad++: Download n++ from the developer web site and when you install it the install wizard at a certain point shows an option to replace the built in windows notepad: check it and continue the setup procedures. Done. From now on you can enjoy the power of one of the best free text editors.