Notepad++ is a great editing tool for web developers. I know many, including myself, who use this together with Adobe Dreamweaver for their HTML development because there are just some things that Notepad++ does better than Dreamweaver including syntax colouring and HTML tag matching.
When you first start using Notepad++, it tries to determine the language of your source code using the filename extension. If you are just using a blank unsaved document, it may just treat your HTML code as plain text, offering no syntax colouring or tag matching. To enable these features, you either need to save your file with a proper filename extension or click on Language and then choose a different language like HTML, PHP, JSP, CSS, JavaScript, XML or SQL to name a few. If you work in HTML a lot, it can become a pain to always have to keep setting the language each time you open a new window.
The good news is that you can change the default file format in Notepad++ to HTML. It's easy. Here's how…
- Launch Notepad++
- Click Settings > Preferences
- Click on the New Document/Default Directory tab
- Change the Default Language to HTML
- Click the Close button
From that point on, you will no longer always have to manually set the language to HTML for new documents.
You will still be able to manually change the language anytime to meet your needs and Notepad++ will still automatically detect the programming language of your files based on filename extension.
December 9, 2015 at 11:22 AM
Is there a way to use a user-defined language as default? It does not show any user-defined language on the “Default Language” dropdownlist.
February 7, 2016 at 4:58 PM
Hi Azure,
Notepad++ does include support for user-defined languages. Check out this page to see if there is already something close to the language you are looking for:
http://docs.notepad-plus-plus.org/index.php/User_Defined_Language_Files .
Best regards,
Michael
May 21, 2016 at 1:56 PM
Hi Michael,
Thanks for the quick response.
The link talks about custom support language to support to Notepad++ but i am looking for default the language, which is already available with Notepad++ but settings are getting stored only for permanently once i close and open again its going back default mode but sql language .
I was wanted to set always the default document language to be sql but thats happenning. Could you please how to achieve this.
Thanks in advance
Chandra
May 21, 2016 at 2:00 PM
Hi Michael,
SOME TYPO ON MY LAST POST, I have corrected the message
Thanks for the quick response.
The link talks about custom support language to support to Notepad++ but i am looking for settings the default the language to SQL which is already available with Notepad++ . The problem i am facing is settings are getting captured on permanently basis. once we set the language its working for that moment but when i close and open,its going back to default mode but sql language .
I was wanted to set always the default document language to be sql but thats happening. Could you please let me know how to achieve this.
Thanks in advance
Chandra
July 11, 2016 at 4:36 AM
Hi Chandra,
The default language setting in Notepad++ is only applicable when creating new files. For existing files, the language of the editor syntax highlighting is actually determined by the filename extension. If you want existing files to open in Notepad++ as an SQL language file, the filename must end in .sql or .SQL.
By default, naming a file called export.sql will actually be called export.sql.txt behind the scenes. You may never realize it unless you look at the file type column in the Details view. In this case, Notepad++ will always open the file as a text file instead of as an SQL file.
In order to rename the filename extension, you must tell Windows Explorer to show file name extensions in the Folder options.
Hope this helps.
Best regards,
Michael
May 21, 2016 at 8:14 AM
I am not able to setup defaulting language for Notepad ++.I am have tried the following steps
Settings -> Preferences ->Select New Document -> Set Default Language as SQL but the settings are not effecting.
Could you please let me know the steps how to achieve this.