table of Contents
Notepad ++ is an open source text editor and powerful. It is suitable for editing, commented code. It supports most mainstream programming languages.
This article lists some techniques I encountered in actual use.
hot key
Custom keyboard shortcuts
First, you need to know is: Notepad ++ shortcut keys can be modified.
Click Settings -> Administration shortcuts , pop-up window, you can modify the shortcut want to change. Of course, you can also easily view the shortcut key.
Keyboard Shortcuts
Types of |
hot key |
Features |
File Operations |
Ctrl-O |
open a file |
Ctrl-N |
create a new file |
|
Ctrl-S |
save document |
|
Ctrl-Alt-S |
Save the file as |
|
Ctrl-Shift-S |
Save all open files |
|
Ctrl-P |
|
|
Ctrl-Tab |
File tag jump, skip to the next open file |
|
Ctrl-Shift-Tab |
Jump label file, open a file on Skip |
|
Ctrl-W |
Close the current document |
|
edit |
Ctrl-Z |
Undo the last operation |
Alt-Shift- direction of the left mouse button or Alt + |
Column selection mode |
|
ALT-C |
Column Editor |
|
Ctrl-D |
Copy the line to below the current or subsequent to copy the selected area |
|
Ctrl-T |
Copy the current line to the clipboard (Note: For help, said the current line is exchanged with the previous line position) |
|
Ctrl-Alt-T |
Exchange with the previous line |
|
Ctrl-Shift-Up |
The current move up one row on row |
|
Ctrl-Shift-Down |
The current line down one line |
|
Ctrl-L |
Delete the current line |
|
Ctrl-I |
- (Note: Help is split over multiple lines, but the latest version does not work) |
|
Ctrl-J |
Merge multiple lines (Note: To select the need to merge in a row when used) |
|
Ctrl-G |
Jump to a line of dialog |
|
Ctrl-Q |
Add / Remove Comment |
|
Ctrl-Shift-Q |
Block add / delete comments |
|
Tab (selection of one or more full lines) |
Insert Tab |
|
Shift-Tab (selection of one or more full lines) |
Delete the previous position Tab |
|
Ctrl-BackSpace |
Delete the contents of the current position to the beginning of the word |
|
Ctrl-Delete |
Delete the contents of the current position to the end of the word |
|
Ctrl-Shift-BackSpace |
Delete the current position to the first row of content |
|
Ctrl-Shift-Delete |
Delete the contents of the current position to the end of the line |
|
Ctrl-U |
Converted to lowercase |
|
Ctrl-Shift-U |
Converted to uppercase |
|
Ctrl-B |
Jump to paired brackets |
|
Ctrl-Space |
Trigger Function AutoComplete list |
|
Ctrl-Shift-Space |
Trigger function parameters prompt |
|
Ctrl-Enter |
Keyword that triggered the automatic completion list |
|
Ctrl-Alt-R |
The entire page of text from right to left |
|
Ctrl-Alt-L |
Text direction from left to right across the page (Note: After the installation zencoding, this shortcut may be overwritten) |
|
Seek |
Ctrl-F |
Open the search dialog |
Ctrl-H |
Replace dialog box opens search |
|
Ctrl-F2 |
Set bookmark |
|
F2 |
Jump to the next bookmark at |
|
Shift-F2 |
Jump on a bookmark at |
|
display |
Ctrl- (Keypad- / Keypad +) or mouse wheel Ctrl + |
Zoom In / Out page |
Alt-0 |
All shrinkage folding |
|
Alt-(1~8) |
Expand the respective layers folded |
|
Alt-Shift-0 |
Expand all folds |
|
Alt-Shift-(1~8) |
Expand all levels of folding |
|
Alt-Shift-0 |
Expand all folds |
|
Alt-Shift-(1~8) |
Expand all levels of folding |
Modify language format
Change the subject
If you are tired of the monotony of the default style, I want a change of code highlighting style, stimulate your eyeballs.
You can click on Settings -> Language format , and then choose a theme satisfied, click Save and Close.
Change the background color
If you just want to change the background color of the editor. Dispose of the following steps:
How to keep Notepad ++ code highlighting styles to a page or word in
工具栏中: 插件 -> NppExport -> Export to RTF / Export to HTML / Copy RTF to Clipboard / Copy Html to Clipboard/ Copy all formats to Clipboard
Export to RTF 是将高亮的代码创建到word文档中。
Export to HTML 是将高亮的代码创建到Html网页中。
后面三种是以不同的形式复制高亮代码至剪切板,而不创建相应文件。
其他实用技巧
如何同时编辑两个文件
打开想要同时编辑的两份文件。右击其中任何一份文件的选项卡,选中移动到另一视图,整个屏幕会划分成两部分。
既可以纵向拆分查看,也可以横向拆分查看,请右键点击拆分视图中间的分隔栏,然后选中“向右旋转”或者“向左旋转”,即可切换横向或纵向模式。
自动补齐
Notepad++具有自动补齐功能。比如在你输入括号时,输入了前括号,可以自动补齐后括号。
设置方法:依次点击设置 -> 首选项 -> 自动完成。
选择编程语言
如果你打开的文件或正在编辑的文件中代码并非实际的编程语言,你也可以自己选择。
方法是:点击工具栏上的语言按钮,在下拉菜单中选择正确的语言。
参考资料
[1] http://blog.sina.com.cn/s/blog_6a46a4180100yvqi.html