Notepad ++ usage Techniques

Source: Internet
Author: User
Tags tidy ultraedit

TextFX,Function List,JSMin,JSLint,Light Explorer,Npp Export,JSON Viewer




Alt + HHide rows


CTRL + TabImplement switching between multiple open windows


CTRL + Shift + qBlock comment


CTRL + kLine comment (cancelCTRL + Shift + k)


File


Create File Ctrl + n


Open the file Ctrl + O


Save the file Ctrl + S


Save as CTRL + ALT + S


Save all Ctrl + Shift + S


Close the current file Ctrl + W


Print the file Ctrl + P


Exit Alt + F4


Edit


Revoke Ctrl + z


Restore Ctrl + Y


Cut Ctrl + x


Copy Ctrl + c


Delete del


Select Ctrl +


Column editing Alt + c


Indent Tab


Delete indent SHIFT + Tab


Convert to uppercaseCTRL + Shift + u


LowercaseCTRL + u


Copy current rowCTRL + d


Delete current rowCTRL + L


Split row Ctrl + I


Merge rows Ctrl + J


Move the current row upCTRL + Shift + up


Move down the current rowCTRL + Shift + down


Add/delete a single row comment Ctrl + q


Set row comment Ctrl + k


Cancel line comment Ctrl + Shift + k


Block commentCTRL + Shift + q


The function automatically completes Ctrl + Space


Search


Find Ctrl + F


Search for filesCTRL + Shift + F


Find NextF3


Find the previousShift + F3


Select and find the nextCTRL + F3


Row locationCTRL + G


Matching bracketsCTRL + B


Set/cancel bookmarksCTRL + F2


Next bookmarksF2


Last bookmarksShift + F2


View


Full Screen F11


Note mode F12


Collapse all layersAlt + 0


Show all layersAlt + Shift + 0


Collapse current levelCTRL + ALT + F


Expand current levelCTRL + ALT + Shift + F


Hide rowsAlt + H


Activate from viewF8


Text comparison tool


Compare the opened files with ALT + d


Close the file and compare CTRL + ALT + d


Comparison of the last saved file Alt + S


Comparison with SVN files Alt + B


Last difference: Ctrl + page up


Next difference: Ctrl + Page down


The first difference: Ctrl + Shift + page up


Last difference: Ctrl + Shift + Page down


Function list is one of the many cool functions of notepad ++. However, the latest version requires additional steps to correctly set the function list. I will introduce how to install function list and how to set function list.


First, the function list plug-in is not included in the notepad ++ plug-in list, nor in the available list of the plugin manager =||. Therefore, to install the function list, you have to go to plugin_central to download the latest version 2.1.0.1.


Decompress the downloaded package and there will be a lot of files. First copy functionlist. DLL to the <notepad ++ install dir>/Plugins directory, and then put functionlistrules. XML, gmod lua.bmp and C ++. copy flb to <notepad ++ install dir>/plugins/config. The installation is complete here.


Next, you need to enable notepad ++ to set the function list. Plugins-> function list-> language parsing rules. Then, select C/C ++ in the language list, and check "bitmap list" checkbox. Navigate to the plugins/config directory and select C ++. flb. Everything is fine.


Notepad ++ mounts Python and GCC Python:


Run-> Run... enter the path of the python executable file and the pre-defined source file address of notepad ++: D: \ python26 \ pythonw.exe "$ (full_current_path )"


Next, we recommend that you click Save to append the shortcut key.


GCC mounting


Run-> Run... enter ***. my options are D: \ mingw \ bin \ gcc.exe "$ (full_current_path)"-o "((name_part1_.exe"


Because the file to be generated is compiled, you can use plug-ins-> nppexec-> follow $ (current_directory) to make the generated EXE in the source file directory.


I recently used notepad ++ and found that it is indeed a very good tool. The specific features can be found after reading the introduction below.




[Notepad ++ overview]


Notepad ++ is designed to replace Windows Default notepad, which is much more powerful than notepad.


(1) notepad ++ versions: ANSI and Unicode


Notepad ++ has two versions: ANSI and Unicode.


Most people use Notepad ++ as the enhanced version of notepad. For common applications, the ANSI version and Unicode version are actually no different.


(2) notepad ++ supports a wide range of plug-ins


Notepad ++ supports plug-ins and adds different plug-ins to support different functions. In addition to some common plug-ins, there are also some fun plug-ins, such as the speech plug-in that reads text.


(3) notepad ++ features


Notepad ++ is a lightweight text editing software, which is faster than some other professional text editing tools, such as ultraedit, and consumes less resources. However, in terms of function usage, no less than professional tools, while Windows Default notepad is more "lightweight", but has too few features. Therefore, we generally use Notepad ++ or another tool notepad2 to replace notapad, which is also too complicated and huge.




[Notepad, notepad2, notepad ++, and ultraedit comparison]


According to my personal experience in using some text editing tools, notepad2 is faster than notepad ++ and consumes less resources, but has fewer functions, many common convenient functions are still unavailable. Although ultraedit has many functions, it consumes too much resources and is too troublesome to use. The key is charging, while notepad ++ is free. The summary is as follows:


Notepad: Windows comes with the least resource occupation, the fastest startup, but the function is too weak to meet your needs. Yes.


Notepad2: It consumes a little more resources and starts quickly. However, there are no notepad ++ or ultraedit functions. Yes.


Notepad ++:There are a lot of resources to use. It takes a pause to start, but it is very powerful, especially supporting the plug-in mode, which makes the scalability very good and supports many other advanced features, and it is also very convenient to use. Yes.


Ultraedit: Powerful, but the installation file is large, occupies a large amount of resources, and starts slowly, and is charged.




Therefore, according to the startup speed, resource occupation, function support, and other aspects, for notepad, notepad2, notepad ++, and ultraedit, there is no doubtNotepad ++ is the best choice.




[How to add notepad ++ plug-in]


Method 1: You can manually download the notepad ++ plug-in from the official website:


Http://sourceforge.net/projects/npp-plugins/files/


Method 2. Enable the plug-in Manager of notepad to automatically download and install


Click plugins-> plugin manager-> show plugin manager-> avaliable to display the list of available plug-ins. Select the plug-ins you want, click Install below to automatically download and install the corresponding plug-in, which is very convenient.








The following is my personal experience and experience:


[View the current notepad ++ version]


To view your current notepad ++ version, click? -> About notepad ++,The pop-up dialog box displays "Notepad ++ v5.8.6 (ANSI)". (ANSI) indicates that the current version is ANSI.




I personally think it is useful. It is worth mentioning the following features:


1. Supports syntax highlighting and custom colors


The key is that many languages are supported. In addition to common C/C ++, Java, and PHP languages, Python and XML are also supported.


In addition, you can click the keyword to expand or contract XML, which is very convenient. Later I learned that this feature is called code folding, coding...




Makefile is also supported, which is convenient for viewing makefile files.


In addition, even the commonly used Tex/latex syntax highlighting is supported and very powerful.




You can also customize the colors displayed when the syntax is highlighted. CLICK:


Settings-> style Configurator


You can configure different colors as needed.






[Customize other suffix files except the default suffix as some types of files to achieve syntax highlighting]


In addition to the default file suffix, you can set a custom file suffix for different types of files. For example, if you encounter a common makefile, the default suffix is. mak, and here I own. MK is also a MAKEFILE file, so you can set it as follows:


Settings-> style configurator-> select makefile from the drop-down list in the language drop-down list and select makefile, which will appear in the lower left corner:


Default Ext. and user Ext. The default extension (default extension) is the extension name. It corresponds to. Mak, and fill. mk in the box corresponding to user Ext,




Then, click Save & close on the right side to enable notepad ++ to automatically identify the. mk file as the MAKEFILE file, and then highlight the corresponding syntax.


Of course, if you do not set it, open the. mk file separately. Although notepad ++ does not automatically recognize the file and does not have syntax highlighting, you can also manually choose it:


Language-> M-> makefile, you can achieve the same function, but you have to manually set it every time.




2. added the hex editor plug-in to support hexadecimal editing.


Notepad ++ supports adding the hex-Editor plug-in to support hexadecimal viewing and editing, which is very convenient.


[How to add hex editor plug-in]


First pass[View the current notepad ++ version]You know whether your notepad ++ is an ANSI or Unicode method,


Then, according to[How to add notepad ++ plug-in]Go to the notepad ++ plug-in official website, find and download the corresponding version of hex editor, and put the plug-in file hexeditor. dll under the notepad ++ path.Npp.5.8.6.bin \ ANSI \ pluginsFolder.


You can also use the plug-in manager described above to automatically download and install the plug-in directly through the software.


Restart notepad ++ to view the corresponding hex-Editor plug-in plugins.


It is worth mentioning that the latest version (5.8.7) also supports adding plug-ins and adding a shortcut icon on the toolbar. For hexeditor, it is an uppercase H icon. You can click this icon to view it in hexadecimal notation. It is very convenient to click it again and restore it to normal mode.






3. Supports column mode editing.


Hold down altThen, it is in the column mode. For example, you can select a column, right-click the column, and select Delete to delete the columns, remove ALT and then stop ALT and restore normal mode. Very easy to use, more and more think notepad ++ Niu X, what functions are supported...


In the column operation mode, you can insert some content into the entire column as follows:


Edit-> column Editor (alt c)


Then, write the content to be inserted in the box corresponding to text to insert or number to insert. notepad ++ will automatically help you insert the corresponding content of the entire column.






4. After a word is selected,Notepad ++ automatically highlights the selected keywords.For File Viewing, It is very convenient.


5. When opening multiple files, the corresponding tab is displayed. By default, double-clicking the tab cannot close the file like some other tools, but it can be set as follows:


Settings-> preference-> General-> tab bar, select:


Double click to close document, and thenDouble-click the tab of the corresponding file to close the file..


Similarly, there is an option: show close button on each tab. When selected, the close button appears on each tab, which is convenient to use.


6.Show file row number: Settings-> preference-> General-> editing-> select display line number to display the row number.


7.Print row number?: Settings-> preference-> General-> printing-> whether to select the printing line number. This parameter is not selected by default. You can select this parameter if necessary. In this way, the row number can be printed, it is easy for users to set as needed.


8.Whether to back up after editing the file: Like ultra Editor, after editing a file, the. Bak file is generated by default. This function is also supported for notepad ++, but is disabled by default. If necessary, you can set settings here: settings-> preference-> General-> Backup/auto-completion-> the default value is none. Other options include simple and verbose backup, you can set it as needed.


9.Automatic completionFunction: settings-> preference-> General-> Backup/auto-completion. Automatic completion: auto-completion. You can set this parameter based on your needs. This function is disabled by default.


10.Select a text and call Google Search:


Run-> Google Search


In addition to the Google search function, this function is similar to the related one. After the selected text is selected, other programs or functions are called, suchCall wiki to query the word/text.:


Run-> Wikipedia search


OrOpen the folder where the current file is located directly from notepad ++.:


Run-> open containing folder


From notepad ++Open windows CMD and it is already in the current folder:


Run-> open current dir cmd


DirectUse this file as an attachment, and then open Windows Outlook to send an email.


Run-> send via Outlook


And so on.


11.Temporarily hide some rows


If you want to hide some rows while viewing the file and display them properly when necessary, you can select the rows first and then:


View-> hide lines


You can. Then, the label column on the left will display the corresponding identifier. Click to unhide it.


12.Supports mouse scroll wheel Scaling


Notepad ++ not only supports the shortcut key Ctrl + num +/num-to control scaling, but also supports Ctrl + mouse scroll to control the scaling of the current display content, which is very convenient.


13.Full Screen Display


Sometimes, if you want to display documents in full screen mode, you can use View> toogle full screen mode F11 or post it F12 to display them in full screen mode, it is also very convenient.


14. IntegratedLightweight Resource Manager


After installing the plug-in (it seems that the plug-in has been installed by default) lightexplorer:


Plugins-> light Explorer-> light explorer, you can open a lightweight resource manager on the left side. It is very convenient to open the file you want to open.


15.Export to another type of file-> paste the color code


After the corresponding nppexport plug-in is added, it can be exported into different formats, such as HTML and RTF:


Plugins-> nppexport-> export to RTF or export to HTML


Here, HTML is a common HTML, and RTF can be understood as a concise version of word. Therefore, both HTML and RTF support color code/characters. Therefore, this function can achieve what we need and export the highlighted, colored, and colored code to word or other documents. This function is very practical. At least I personally think it is very useful. For example, after opening some C code, exporting it to HTML, then opening the HTML and copying the content, and then pasting it into the word, it is the color code. Of course, you can also export it to RTF, which is compatible with word itself. In windows, that is, it is opened with word by default, this eliminates the need to copy and paste HTML files.


Even nppexport provides more convenient functions:


Plugins-> nppexport-> copy HTML to clipboard or copy RTF to clipboard


That is, after you select the content directly, copy the content to the clipboard, and then you can paste it directly in other Word files, that is, color code is simply supported, how refreshing.


16. Code folding


Including C/C ++ and other code, code can be folded and expanded as a single function as a whole, other types, such as XML, fold and expand the entire content based on the keyword.


17. In resource manager, right-click a file and you can use Notepad ++ to open the file.


This function is similar to ultraedit. You can right-click a file in the resource manager and choose edit with notepad ++ from the shortcut menu ", you can directly use Notepad ++ to open the file. I personally think this function is very practical.


18. CTRL + TAB implement switching between multiple open windows


19. You can set whether to display column boundary (right line)


Set-> preference-> edit-> column boundary. You can set whether to display column boundary and customize the "boundary width". The default value is 100.


(Note: Generally, 80 is commonly used in Linux .)


The column boundary display mode also supports two types:


One is the vertical edge from top to bottom:


The other is to add a certain background color to the content that exceeds the column boundary:






20. You can add or cancel comments to or from code in batches.


Select a piece of code, and then edit-> comment/uncomment-> Add/delete a single line comment to add or delete comments for each row selected by the Team in batches.


This function is very practical for code writers.








More other functions of notepad ++ are available for you to explore.


In short, I personally think that notepad ++ is a very easy-to-use and lightweight, but it has rich functions and is a text/code editing tool. Here, I would like to thank those developers very much, thank you for bringing us this useful tool.




1. All text can be selected by eliminating empty lines in the file, textfx ---> edit ---> Delete blank lines


2. the XML text format is superb. XML text of several hundred KB is a line. You can use it to quickly organize a line of text into a standard XML file. Select all text textfx ---> HTML tidy ---> tidy: reindent XML


3. Add a row number directly before your text line: select all text textfx ---> Tools ---> insert line numbers


4. It can be used to view the hexadecimal format


5. There are FTP plug-ins, not bad


6. There seems to be another Explorer plug-in, which has never been used.


7. Its function list is also quite good and often used. It should be used at least when you look at the Java source program.


8. You can customize External commands. Sometimes I use it to compile the Java source program and press F6. There is a customization window.


This is my javac command: jc5.bat $ (full_current_path)


Below is my java command


Release 5.bat $ (name_part)


I only need to set jc5.bat and ipv5.bat in a directory in the path.


For example, here I add D:/Shell TO THE PATH environment variable, which can include many of my favorite batch processing scripts.


The content of jc5.bat is roughly as follows:


Jc5.bat


Echo off


Setlocal


Set jaguar_jdk15 = D: sharedjdk1.5.0 _ 01


Set java_home = % jaguar_jdk15 %


Set Path = % java_home % bin; % java_home % jrebin; % PATH %


Set old_classpath = % classpath %


Set classpath =.; % java_home % libdt. jar;


Set classpath = % classpath %; % java_home % libtools. jar;


Set classpath = % classpath %; % java_home % jrelibrt. Jar


Set classpath = % classpath %; % old_classpath %


"% Java_home % injavac"-G % *


Endlocal



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.