If I open a text file in Notepad++ it defaults to formatting some elements such as numbers, text between apostrophes, backslashes etc.
How to I tell N++ to display .txt files with none of this formatting?
Run it from the command-line as such:
notepad++ -ltext [filename]
Or from the menu: Language, N, Normal Text.
That's lower-case L in "-ltext
" by the way.
Update: To make it work by double-clicking on the file in Windows Explorer, put the above in a batch file as such (call the file, say, C:\OpenTxt.bat
):
C:\full\path\to\notepad++ -ltext %1
Then in Windows Explorer, right-click on any .txt file, choose Open With
then Choose default program
, Browse
, choose your C:\OpenTxt.bat
and check Always use the selected program to open this kind of file. Then OK.
I think you are like me, prefer to view txt files as a plain text even if they have some codes in them. IF so, then I think I will tell you what I did and it might be what you need.
The only thing I did was overriding the format style under the Style Configurator, and used Global override settings to override the style settings on any file type that is not assigned to the Notepad++ along with text files. Thus, these files will always opened in Notepad++ as plain text with no formatting.
Here is the instructions :
Background color is optional, but if you use a customized theme, you can use the background color if you want to. I use Obsidian theme, and I changed the background color from blackish color to white. This will make all plain text with a white background, while other files with blackish color.
NOTE: if you use a customized theme or change your theme, you have to repeat the same steps above on the new theme.
.txt
files open without any special formatting ...