Notepad++ is an open-source text editor for Windows. I have to work on different technologies, It’s not possible to install all editors (like Dreamweaver, Visual studio 2010, …etc) on my old machine. So I use Notepad++ as my default text-editor. It’s simple and fast. Here are some tips for web developer and designer to use it effectively.
1. Box Selection:
Similar to VS 2010, Box Selection (aka column selection, block selection, or rectangular selection) exists in Notepad++. You need to hold down the Alt key while doing a selection; you can select a block horizontally.
2. Extended Search Mode:
Generally, It is needed to convert new line/tab character. Suppose you have to remove new line character:
Press Ctrl+H , Select the ‘Extended Search Mode’. Use \n in find what and nothing in replace with textbox. Click Replace All to remove new line character.
3. Vertical Tab View:
Suppose you have to see two files and compare manually. You can open tab in vertical tab view. For this, Right click on tab > “Move to Other View”. Use F8 to toggle the views.
4. Minify JS:
You can remove unnecessary space in your js file and can minify before deploying.
Edit > Blank Operations > Trim Header and Trailing Space
Edit > Blank Operations > Remove Unnecessary Blank and EOL
5. Delete Line Numbers or First word:
Generally when we copy code from website and paste it we get line numbers or special char, we need to remove this. You can do this in Notepad++ easily.
TextFX > TextFX Tools > Delete Line Numbers or First word
6. Add Line Numbers:
You can add line numbers by Edit > Column Editor > Number to Insert > Set Initial Number and Increase By >OK
You can add any text also.
7. AutoClose HTML/XML tags:
If you’re working with HTML or XML files, it closes every HTML tag as you type.
TextFX > TextFX Settings>Autoclose XML/HTML tags
8. HTML Encode:
As a blogger, I have to post html source code. I need html encode before posting. It’s very easy in Notepad++
TextFX > TextFX Convert > Encode HTML
9. Generate Dynamic Controls Quickly:
Suppose you have to create html controls dynamically.For this, First create static Html layout. Select Proper Language and
TextFX > TextFX Convert > Convert Text to Code Command
It will take care of Quotes and line breaks.
10. Setup HTML Tidy:
Suppose you have html body content only and you have to create proper html file then it is very handy to use html tidy.
TextFX > TextFX HTML Tidy > Tidy(Most Recent HTMLTIDY.CFG)
11. Launch in Browser:
You can test html file in browser by clicking RUN and select Launch in Browser.
12. Align Lines:
It’s my favorite feature. You can line up multiple lines by ,(comma), = (equal sign) or clipboard character. It is very useful and helpful in Box selection.
TextFX > TextFX Edit > line up multiple lines by …
13. Others:
Remove Blank Lines:
TextFX > TextFX Edit > Delete Blank Lines
TextFX > TextFX Edit > Delete Surplus Blank Lines
Change Case:
TextFX > TextFX Characters > select the case in which you want to convert.
The major inbuilt options can be performed using extended search mode. If you have other tips, leave a comment.
Enjoy Notepad++!!!
i have searching this type of valuable information From a lot of days i found satisfaction when read your blog Thanks for giving this type blog
Thanks for this wonderful blog .
thanks for sharing tips
good one keep it up
thanks for the information
That Selection Box trick is awesome. I always used to do that manually. You just saved me an hour. Thanks a bunch. Appreciated.
Great tremendous things here. I am very glad to see your post.
http://www.routertechnicalsupportnumbers.com/blog/how-to-fix-connection-failed-asus-error-651-in-windows-7-8-and-10/
This is very helpful and informative. Great work keep it up…!
How can get the right side view (magnifier?)….like Sublime text or visual studio…..
Thanks. I get it :)
Can you align lines without TextFX? Great article
thanks.. saved my time
Brij, may I ask you a simple Qn.?
I have a large comments section in a windows batch script….I’ve drawn boxes using text chars. Where I’ve used tab to position these in Notepad++ the tab positions are misaligned in windows Notepad.
This will be a problem for people who don’t use notepad++ viewing the script.
any ideas on what the difference is and how I can affect it?
Incredible tips, thanks very much!
In find and replace dialog, select extended search mode and then replace n to “your char”n.
How to add a character at the end of each line in a huge file?
Ctrl+G to search line numbers….
I have just downloaded notepad++. I have a website and I want something where, I can change or add a link to the menu to one page and the change can be made on all the pages. I read at a forum that the notepad++ does this. But find and replace does not do this. I want to insert, not replace. Can u please help. Am a novice at this, so simple language please :) thanks
5.Minify JS is great, also work for minify CSS iles. Thanks for valuable tips.
Something I thought was missing in Notepad++ was jQuery code hinting and autocompletion. I have written a plugin to add it in and find it quite useful so hopefully others reading this article will too:
http://www.jamesallardice.com/2011/11/26/jquery-code-hinting-in-notepad/
That Selection Box trick is awesome. I always used to do that manually. You just saved me an hour. Thanks a bunch. Appreciated.
Select text, TextFx > TextFx Convert > Encode HTML will convert &” symbols to html text
is there a way to convert special characters to html text?
cool tutorial
I learned how to use box selection and align lines thanks to this great post!
Hey, I didn’t ever noted that Box Selection trick!
THANK YOU VERY MUCH – GREAT WRITING!
7. AutoClose HTML/XML tags:
Duuuuude. This is like the one thing I was looking for how to do. I might switch off Komodo Edit because of this…
Thanks Codeboy for your comment
cool! thanks for the tips
Very good tips. Thanks
Thanks Jitendra for your comment!!!