notepad++ Practical Tips

Source: Internet
Author: User

notepad++ is an open source text editor with powerful features. Great for editing, commenting on code. It supports most of the mainstream programming languages.

This article mainly lists some of the techniques I have encountered in the actual use.

Shortcut keys

Custom shortcut keys

The first thing you need to know is that the shortcut keys in notepad++ can be modified.

Click Settings , Manage Shortcuts , and in the pop-up window, you can modify the shortcut keys you want to change. Of course, the shortcut keys can also be easily viewed.

Common shortcut keys

Below, list some of the common default shortcut keys:
Type Shortcut keys Function
File operations Ctrl-o Open File
Ctrl-n New file
Ctrl-s Save File
Ctrl-alt-s Save File as
Ctrl-shift-s Save all open files
Ctrl-p Print
Ctrl-tab File tab jump, skip to next open file
Ctrl-shift-tab File tab jump, jump to the previous open file
Ctrl-w Close the current file
Edit Ctrl-z Undo Last Action
Alt-shift-arrow key or ALT + left mouse button Column selection mode
Alt-c Column Editor
Ctrl-d Copy the current line to the bottom, or copy the selected area to a later
Ctrl-t Copy the current line to the Clipboard (note: The help says to swap the current row with the previous line)
Ctrl-alt-t Swap with Previous line
Ctrl-shift-up Moves the current row up one line
Ctrl-shift-down Moves the current line down one line
Ctrl-l Delete When moving forward
Ctrl-i -(note: The help is divided into multiple lines, but the latest version does not work)
Ctrl-j Merge multiple lines (note: To select the rows to be merged in when using)
Ctrl-g Jump to a Line dialog box
Ctrl-q Add/Remove Comments
Ctrl-shift-q Block Add/Remove annotations
Tab (selection of one or more full lines) Insert tab
Shift-tab (selection of one or more full lines) tab before deleting a location
Ctrl-backspace Delete the current position to the beginning of the word
Ctrl-delete Delete the current position to the end of the word
Ctrl-shift-backspace Delete the contents of the current position to the beginning of the line
Ctrl-shift-delete Delete content from current position to end of line
Ctrl-u Convert to lowercase
Ctrl-shift-u Convert to uppercase
Ctrl-b Jump to pairs of parentheses
Ctrl-space Trigger function Auto-complete list
Ctrl-shift-space Trigger function parameter hint
Ctrl-enter Trigger keyword Auto-complete list
Ctrl-alt-r Entire page text direction from right to left
Ctrl-alt-l Entire page text direction from left to right (note: This shortcut may be overwritten after zencoding has been installed)
Find Ctrl-f Open the Search dialog box
Ctrl-h Open the Replace Search dialog box
Ctrl-f2 Set bookmarks
F2 Jumps to the next bookmark
Shift-f2 Jump to the top of a bookmark
Show CTRL (Keypad-/keypad+) or CTRL + mouse wheel Enlarge/Shrink Page
Alt-0 Shrink all folds
alt-(1~8) Expand the corresponding layer collapse
alt-shift-0 Expand All collapsed
alt-shift-(1~8) Expand all levels collapsed
alt-shift-0 Expand All collapsed
alt-shift-(1~8) Expand all levels collapsed

Language format modification

Change theme

If you're tired of the default monotone style, try changing the code highlighting style to stimulate your eyeballs.

You can click on settings ---- language format , then select a satisfactory theme, click Save and Close.

This is another look at your code, is it a brand-changed?

Change the background color

If you just want to change the background color of the editor. Please follow the steps below to process:

Click Set- language Format, modify the background color, and tick use global background color, then save. Ok.

How to keep notepad++ code highlighting style in Web pages or Word

Toolbar: add . nppexport , export to RTF /Export to HTML / Copy RTF to Cli Pboard / copy Html to Clipboard / Copy all formats to Clipboard

Export to RTF creates the highlighted code in a Word document.

Export to HTML is the creation of the highlighted code in an HTML Web page.

The next three types are to copy the highlighted code to the Clipboard in a different form, without creating the corresponding file.

Tried copy RTF to Clipboard, succeeded. Copy Html to Clipboard is not used.

Other practical Tips

How to edit two files at a time

Open the two files you want to edit at the same time. Right-click the tab of any one of the files, select move to another view , and the entire screen will be divided into two parts.

You can split the view vertically or split it horizontally, right-click the divider in the middle of the split view and select Rotate right or rotate left to toggle landscape or portrait mode.

Auto-Completing

The notepad++ has auto-completion function. For example, when you enter parentheses, you enter the front brackets, and you can automatically fill in the parentheses.

Setup method: Tap settings , click Preferences , Auto-complete .

Choosing a programming language

If the code in your open file or in the file you are editing is not the actual programming language, you can also choose your own.

By clicking the Language button on the toolbar, select the correct language from the drop-down menu.

Resources

[1] http://blog.sina.com.cn/s/blog_6a46a4180100yvqi.html

notepad++ Practical Tips

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.