PNFile文件处理神器

PNFile是一款集成了多种强大文本文件应用和工具的平台,支持目录导航、预览、高级编辑、多文件比较等操作。本文档详细介绍了PNFile的主要组件如PNTree、PNEdit、PNDiff和PNConsole的功能、界面及操作,帮助用户高效管理文本文件。此外,还包含了PNFile中一些常见的错误和警告消息及其原因。

Copyright Notice and Proprietary Information
No part of this document may be reproduced or transmitted in any form or by any means, electronic, or mechanical, for any purpose, without the express written permission of VeriForma, Inc. This manual and the program described in it are owned by VeriForma, Inc., and may be used only as authorized in the license agreement controlling such use, and may not be copied except in accordance with the terms of this agreement.

© 2020 VeriForma, Inc.

Disclaimer
VeriForma, Inc. makes no warranty of any kind, expressed or implied, with respect to software or documentation, its quality, or performance. The information in this document is subject to change without notice and does not represent a commitment on the part of VeriForma, Inc.

Trademarks and Registered Trademarks
VeriForma and any and all VeriForma, Inc. brand, product, service and feature names, logos, and slogans are registered trademarks or trademarks of VeriForma, Inc. or its subsidiaries in any countries. All other brands, products, services, and feature names or trademarks are the property of their respective owners.

Contents

Preface 1
Printing Conventions 1
Veriforma Licensing 1
Getting Help 1
1 Introduction to PNFile 1
1.1 Overview 1
1.2 Why use PNFile? 4
2 Getting Started 5
2.1 Installing PNFile 5
2.1.1 Supported Operating Systems 5
2.1.2 Installing the Software 5
2.2 Setting Up PNFile 6
2.2.1 PNFile Licensing 6
2.2.2 Setting the Environment 6
2.3 Launching PNFile 6
2.3.1 Launching from shell 6
2.3.2 PNFile Log File 7
2.3.3 Launching stand-alone tools of PNFile 7
3 PNFile User Interfaces 8
3.1 PNFile Main Window 8
3.1.1 Title Area 9
3.1.2 Menu Area 9
3.1.3 Button Area 12
3.1.4 PNTree Area 14
3.1.5 PNPreview Area 14
3.1.6 Status Area 15
3.2 PNTree Window 16
3.3 PNEdit Window 16
3.4 PNDiff Window 17
3.5 PNConsole Window 18
3.6 PNFinder Window 18
3.7 PNCompare Window 19
3.8 Other Tools 20
3.8.1 Encrypt and Decrypt 20
3.8.2 System Information 21
3.8.3 Split and Join 21
3.8.4 Directory Print 22
4 PNTree 24
4.1 Launching PNTree 24
4.1.1 Launching together with PNFile/PNFinder/PNCompare 25
4.1.2 Launching from one existing PNTree 25
4.1.3 Launching from terminals as an independent tool 26
4.2 Concepts in PNTree 27
4.2.1 Home Path of one PNTree 27
4.2.2 Multiple PNTrees 28
4.2.3 Bonded PNEdit and PNDiff Windows 29
4.3 Interfaces of PNTree 29
4.3.1 Menus 29
4.3.2 Buttons 31
4.3.3 Right-click Menu 31
4.3.4 Tree-Filter Bar 32
4.4 Operations on Directories and Files in PNTree 33
5 PNEdit 38
5.1 Launching PNEdit 38
5.1.1 Launching from independent PNTree 38
5.1.2 Launching from Embedded PNTree 39
5.1.3 Launching from terminals as an independent tool 39
5.2 Interfaces of PNEdit 39
5.2.1 Title Area 40
5.2.2 Menu Area 40
5.2.3 Button Area 45
5.2.4 Edit Area 49
5.2.5 Status Area 50
5.3 Advanced Search & Replace Window 51
5.3.1 Expression Card 51
5.3.2 Position Card 52
5.3.3 Buttons 52
5.3.4 Results Panel 53
5.4 Advanced Edit Window 53
5.4.1 Position Card 53
5.4.2 Operation Card 54
5.4.3 Information Panel 54
5.5 Operation Modes 54
5.5.1 Editing Modes 54
5.5.2 Text-Selecting Modes 55
5.5.3 Commands and Keyboard shortcuts 55
5.6 Tools in PNEdit 56
5.6.1 String Buffer 56
5.6.2 File Buffer 60
5.6.3 Change Buffer 60
5.6.4 Tagging 62
5.6.5 Other tools 64
6 PNDiff 65
6.1 Launching PNDiff 65
6.1.1 Launching from PNTree 65
6.1.2 Launching from terminals as an independent tool 65
6.2 Interfaces of PNDiff 66
6.2.1 Title Area 66
6.2.2 Menu Area 67
6.2.3 Button Area 70
6.2.4 Compare Area 72
6.2.5 Status Area 73
6.3 Comparing Two or Multiple Files 74
6.3.1 Setting Diff Mode 74
6.3.2 Setting Diff Range 75
6.4 Understanding the Compare results 76
6.4.1 Diff Marks 76
6.4.2 Diff List 77
7 PNConsole 78
7.1 Launching PNConsole 78
7.1.1 Launching from PNFile 78
7.1.2 Launching from terminals as an independent tool 79
7.2 Interfaces of PNConsole 79
7.2.1 Title Area 79
7.2.2 Button Area 80
7.2.3 Message Area 81
7.2.4 Command Area 81
7.3 Running Commands and Scripts in PNConsole 81
7.3.1 Selecting Compiler 81
7.3.2 Running Commands 82
7.3.3 Running Scripts 82
8 PNFinder 83
8.1 Launching PNFinder 83
8.1.1 Launching from PNFile 83
8.1.2 Launching from terminals as an independent tool 84
8.2 Interfaces of PNFinder 84
8.2.1 Title Area 85
8.2.2 Menu Area 85
8.2.3 Button Area 88
8.2.4 PNTree Area 90
8.2.5 PNPreview Area 90
8.2.6 Result Area 90
8.2.7 Status Area 90
8.3 Setting PNFinder 90
8.3.1 Text Expression Card 91
8.3.2 File Filter Card 91
8.3.3 Scope Select Card 91
8.3.4 Buttons 92
8.4 Reviewing PNFinder Results 92
8.4.1 Finding Results 92
8.4.2 Operation Goto 94
8.4.3 Operation Replace 94
9 PNCompare 96
9.1 Launching PNCompare 96
9.1.1 Launching from PNFile 96
9.1.2 Launching from terminals as an independent tool 97
9.2 Interfaces of PNCompare 97
9.2.1 Title Area 98
9.2.2 Menu Area 98
9.2.3 Button Area 100
9.2.4 Compare Area 102
9.2.5 Result Area 102
9.2.6 Status Area 102
9.3 Setting PNCompare 102
9.3.1 Home Select Card 103
9.3.2 Scope Select Card 103
9.3.3 Compare Condition Card 103
9.3.4 Buttons 104
9.4 Reviewing PNCompare Results 104
9.4.1 Comparing Results 104
9.4.2 Operation Goto 106
9.5 Resolving Comparing Differences 107
9.5.1 Operation L2R 107
9.5.2 Operation R2L 108
Appendix A: Commands in PNEdit 109
Appendix B: Config File .pnrc 132
Appendix C: Error/Warning Message 140

Preface
Printing Conventions
Text printed in the font Calibri Bold Italics is the PNFile platform or the component in PNFile.
Text printed with the first letter capitalized, especially when it is not necessary in terms of language syntax, is the proper name used in PNFile.
Veriforma Licensing
To get more information about Veriforma licensing, please contact sales@veriforma.com.
Getting Help
If you have a question about using Veriforma products, please consult the product documentation that is embedded in the toolkit. You can also contact support@veriforma.com.

1 Introduction to PNFile
1.1 Overview
PNFile is a platform integrated with various powerful text file applications and tools. It is used to perform numerous operations on directories and any plain text files efficiently. The supported operations include navigating, previewing, advanced editing, multiple text files comparing, programming language compiling, advanced finding, advanced file/folder comparing etc.
• Navigating

PNTree navigates the directory tree from the user-specified root path. The root path can be changed whenever needed.

Rich file information is displayed, and various operations are supported in the PNTree, such as Filter, Copy To, Move To, Delete, New, Rename, Compress, Split/Join, Encrypt/Decrypt, Directory Print, sending files to PNEdit windows, launching PNDiff, etc.

One PNTree is embedded in the PNFile Main Window. PNTree is also an independent tool that can be launched from system terminals. Besides, multiple PNTrees can be launched from any existing PNTrees.

Please refer to sections 3.1.4 and 4 to get details about PNTree.

• Previewing

Launched along with PNFile and used together with the embedded PNTree, PNPreview quickly previews any plain text files. It provides a fast way of previewing any text files and supports simple edit operations, such as Insert, Remove, Cut, Copy, Paste, etc.

Please refer to sections 3.1.5 to get details about PNPreview.

• Editing

PNEdit is an important and powerful component of PNFile. It is an advanced text edit tool that runs in a stand-alone window.

PNEdit supports various efficient text editing operations, such as cutting/copying/pasting chars/words/lines, advanced searching and replacing, syntax detecting and highlighting, undoing/redoing, etc. There are three working modes, input mode, replace mode, and command modes, in PNEdit, and rich commands/hotkeys are supported in all the working modes. Besides, it supports selecting text for operating in both line and column modes.

PNEdit is also an independent tool that can be launched from system terminals.

Please refer to sections 3.3 and 5 to get details about PNEdit.

• Text Comparing

By comparing multiple plain text files and highlighting the differences in split windows, PNDiff helps locate and navigate the different parts rapidly. The comparison can be refreshed in-place if any of the candidate files are updated.

PNDiff is also an independent tool that can be launched from system terminals.

Please refer to sections 3.4 and 6 to get details about PNDiff.

• Compiling

PNConsole is a graphical Multi-Language Platform Console, which has four languages preset, including Shell, TCL, Python, and Perl. Besides, any language compilers available in the system can be well supported in PNConsole.

PNConsole is also an independent tool that can be launched from system terminals.

Please refer to sections 3.5 and 7 to get details about PNConsole.

• Advanced Finding

PNFinder is an efficient file (and its content) finding & replacing tool. Multiple searching modes and filtering configs make the tool more flexible and powerful. PNFinder supports both normal plain text and regex text expression searching & replacing. It manages to control the searching depth and filter files by multiple criteria like name, owner, access, time, and size. Locating and reviewing the finding result in PNFinder is quite easy.

PNFinder is also an independent tool that can be launched from system terminals.

Please refer to sections 3.6 and 8 to get details about PNFinder.

• Advanced Comparing

PNCompare is an efficient and practical file & directory comparing tool that aims to compare two directories and/or files inside. It supports to compare by multiple criteria, such as owner, access, time, size, and content. Comparing depth control and multiple comparing modes like File-Folder, File-Only, and Folder-Only are supported. After comparing, PNCompare manages to review the results and to resolve the differences easily.

PNCompare is also an independent tool that can be launched from system terminals.

Please refer to sections 3.7 and 9 to get details about PNCompare.
PNFile also provides various tools to better support working with plain text files and directories. The tools include String Buffer, File Buffer, and Change Buffer in PNEdit, and others like Encrypt/Decrypt, System Information, Split/Join, and Directory Print, etc.
• String Buffer

String Buffer is one of the PNEdit tools which stores the strings. One set of String Buffer has three types of the buffer, including one general buffer, ten clipboard buffers, and twenty-six named buffers. All the strings stored in the String Buffer can be viewed and edited in the String Buffer window.

The general buffer stores the strings that are buffered by copy, or yank, or cut command. These strings can be accessed by paste command.

The clipboard buffer stores the strings that are copied by selecting or from another application. Ten clipboard buffers are recording the latest ten copy history. The latest one can be accessed via the special register "*.

The twenty-six named buffers with names A-Z are one-one correspondent to the registers "a to "z. They can be accessed by any registers "a to "z related copy, yank, cut, append, or paste commands.

Each PNEdit window owns one dedicated set of String Buffer. Tabs of one PNEdit window share one set of String Buffer.

Please refer to section 5.6.1 to get details about String Buffer.

• File Buffer

File Buffer is one of the PNEdit tools which records the last scene of each file that has once been opened in the current PNEdit window. The information of all the buffered files can be viewed in the File Buffer window, and the files listed in the window can be restored to either the current or a new tab.

Each PNEdit window owns one dedicated File Buffer. Tabs of one PNEdit window share one File Buffer.

Please refer to section 5.6.2 to get details about File Buffer.

• Change Buffer

Change Buffer is one of the PNEdit tools which records any change operations in the currently opened tab. The changes sequence can be viewed in the Change Buffer window. The Undo/Redo sequence is based on the Change Buffer, and it is supported to “goto” any steps in the change sequences directly.

Each tab in a PNEdit window owns one dedicated Change Buffer.

Please refer to section 5.6.3 to get details about Change Buffer.

• Other tools

There are some other tools like Encrypt/Decrypt, System Information, Split/Join, and Directory Print in PNFile.

Encrypt/Decrypt encrypt or decrypt the files in a dedicated way of PNFile. System Information prints the system information. Split/Join splits or joins the files selected. Director Print prints the verbose directory information as required.

Please refer to section 3.8 to get details.
1.2 Why use PNFile?
PNFile is a platform with various powerful text file tools integrated. It is easy to get, launch, and use.
PNFile provides a one-stop graphic solution to handle directories and text files. Most integrated applications, like PNEdit, PNTree, PNDiff, PNConsole, PNFinder, and PNCompare, are also quite handy for users to use separately. PNTree GUI window allows users to operate on directories and files efficiently in a graphic way. PNEdit provides powerful advanced text editing. PNDiff compares and highlights the differences between two or multiple text files quickly. PNConsole provides a robust multi-language console platform. PNFinder performs powerful file searching & replacing. PNCompare provides efficient file & directory comparing and differences resolving. Besides, multiple other tools are integrated to support the efficiently file or directory operation.

2 Getting Started
2.1 Installing PNFile
2.1.1 Supported Operating Systems
Installing PNFile on Linux or Unix operating systems should be a relatively straightforward process as PNFile was developed under Linux. There is no unique setting required to get PNFile installed on Linux or Unix.
2.1.2 Installing the Software
PNFile is packed as a stand-alone toolkit. There is no need to install any third-party packages but only the PNFile package itself. To get the package of PNFile, users can simply send a request to support@veriforma.com or download from the website www.veriforma.com.
Users do NOT need to install or compile anything. Once the package is available, please simply decompress it to one of the local paths.
Usually, there are five directories and two shell setting files in the package (Figure 2 1). Users do NOT need to care about the directories. Simply configuring several lines in the setting shell file can get PNFile work.
Figure 2 1 PNFile decompressed package

• bin/ contains the commands.
• doc/ contains the documents in pdf, this user manual included.
• lib/ contains the script library.
• lic/ is where the license file should be by default.
• tools/ contains compiler tools.
• pn.cshrc sets the path of the tool and the license in cshell.
• pn.bshrc sets the path of the tool and the license in bshell.
2.2 Setting Up PNFile
2.2.1 PNFile Licensing
The license file, “license.txt”, can be put under <package_path>/lic/ or any other valid paths. To get more information about licensing, please contact sales@veriforma.com.
2.2.2 Setting the Environment
The only file users need to configure is pn.cshrc when it is in cshell (Figure 2 2) or pn.bshrc when it is in bshell (Figure 2 3).
In either of the setting shell files, there are two variables, LIC_FILE_PATH and PNFILE_PATH, which should be configured correctly. LIC_FILE_PATH is the full path of the license file, and PNFILE_PATH is the full path of the decompressed PNFile package.
When the setting shell file is ready, please source it in the terminal to make the setting into effect.
Figure 2 2 setting environment in cshell

Figure 2 3 setting environment in bshell

2.3 Launching PNFile
2.3.1 Launching from shell
After setting up, PNFile can be launched from any path in the environments by simply entering the command pnfile. The current path is used as Home Path (section 4.2.1) by default, but users can also specify the Home Path in the command line.
PNFile Main Window (section 3.1) is launched after a quick license verifying. To get help on the command pnfile, please use the option “+h” (Figure 2 4).
Figure 2 4 pnfile help information

2.3.2 PNFile Log File
The running log of PNFile is recorded in the log file, as shown in Figure 2 5. The default path of the log file is “./pnproj/pnfile.log” which can also be set with options while launching (refer to options in section 2.3.1).
Figure 2 5 Example Log File of PNFile

2.3.3 Launching stand-alone tools of PNFile
PNTree, PNEdit, PNDiff, PNConsole, PNFinder, and PNCompare are the tools integrated into the PNFile platform which can also be launched from system terminals separately.
Sections 4.1.3, 5.1.3, 6.1.2, 7.1, 8.1, and 9.1, demonstrate the details about how to launch them respectively.

3 PNFile User Interfaces
PNFile is a platform with the Main Window, the applications like PNEdit, PNTree, PNDiff, PNConsole, PNFinder, and PNCompare, and some other tools integrated. These are the user interfaces of PNFile.
This section demonstrates the Main Window interface of PNFile in which the PNPreview and PNTree are embedded and introduces some stand-alone windows like PNEdit, PNTree, PNDiff, PNConsole, PNFinder, and PNCompare.
3.1 PNFile Main Window
Once PNFile is launched successfully, the Main Window is shown. PNFile Main Window is the main user interface of PNFile, and there are six areas in the window (Figure 3 1).
Figure 3 1 Main Window of PNFile

3.1.1 Title Area
The Title Area (Figure 3 2) shows the full path and the name of the file opened in PNPreview Area.
Figure 3 2 Title Area of PNFile Main Window

3.1.2 Menu Area
There are seven menus (Figure 3 3) in Menu Area, including File, Directory, Edit, View, Application, Tool, and Help Menu.
Figure 3 3 Menu Area of PNFile Main Window

3.1.2.1 File Menu
The pull-down menu in File Menu is shown in Figure 3 4.
Figure 3 4 File Menu in PNFile Main Window

• Tree Home … opens the directory selecting window for users to change the Home Path of the current PNTree (refer to section 4.2.1 for the concept of Home Path).
• Preview… launches a file-selecting window for users to select and open one file in PNPreview. (refer to section 3.1.5 for PNPreview)
• Send To … opens the file selected in the embedded PNTree in a new tab of one existed PNEdit window.
• Save saves the file that is opened and edited in PNPreview (refer to section 3.1.5 for PNPreview).
• Save As … saves the file that is opened and edited in PNPreview, but to another path or with another name.
• Save+Exit saves the file that is opened and edited in PNPreview and quits PNFile.
• Exit quits PNFile.
3.1.2.2 Directory Menu
The pull-down menu in Directory Menu is shown in Figure 3 5. These operations are only available to the embedded PNTree. Please refer to sections 4.2.2 and 4.3.1 for details.
Figure 3 5 Directory Menu in PNFile Main Window

3.1.2.3 Edit Menu
The pull-down menu in Edit Menu is shown in Figure 3 6. These operations are only available to the files opened in PNPreview (refer to section 3.1.5 for PNPreview).
Figure 3 6 Edit Menu in PNFile Main Window

• Undo undoes the last change.
• Redo reverts the last undoing.
• Cut copies and then deletes the selected contents.
• Copy copies the selected contents.
• Paste pastes the latest cut or copied contents to the cursor’s location.
• Input Mode enters the input mode.
• Preview Mode enters the default preview mode.
• Select selects contents by word, line, and paragraph, or selects all the contents.
3.1.2.4 View Menu
View Menu (Figure 3 7) configures the view settings for PNPreview Area. It is similar to the View Menu in PNEdit Window. Please refer to section 5.2.2.3 for details.
Figure 3 7 View Menu in PNFile Main Window

3.1.2.5 Application Menu
Applications are listed in Application Menu (Figure 3 8).
Figure 3 8 Application Menu in PNFile Main Window

• PNTree launches a new PNTree and uses the path of the selected file or directory as its Home Path (refer to section 4.2.2 for multiple PNTrees).
• PNEdit opens the file selected in the embedded PNTree with a new PNEdit window (refer to section 5 for PNEdit).
• PNDiff launches PNDiff to compare the files selected in the embedded PNTree (refer to section 6.1.1).
• PNConsole launches the PNConsole window (refer to section 7.1).
• PNFinder launches PNFinder and uses the path of the selected file or directory as its initial home path (i.e., the starting hierarchy of the searching) (refer to section 8.1).
• PNCompare launches PNCompare and uses the path of the selected file or directory as the initial Home Paths for the Left and Right sides of the embedded PNTrees (refer to section 9.1).
3.1.2.6 Tool Menu
Multiple tools are listed in Tool Menu (Figure 3 9).
Figure 3 9 Tool Menu in PNFile Main Window

• System Information opens the window that prints system information (refer to section 3.8.2).
• Encrypt/Decrypt opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• Split/Join splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• Directory Print opens the tool window of the directory information printer (refer to section 3.8.4).
3.1.2.7 Help Menu
The pull-down menu in Help Menu is shown in Figure 3 10.
Figure 3 10 Help Menu in PNFile Main Window

• User Manual opens this user manual.
• Error Message opens the error and warning help window (refer to Appendix C: Error/Warning Message for details).
• About shows the tool information.
3.1.3 Button Area
Button Bar is grouped as shown in Figure 3 11.
Figure 3 11 Button Area in PNFile Main Window

3.1.3.1 File Bar
There are five buttons in File Bar.
• sets the home path of the embedded PNTree.
• launches a file-selecting window for users to select and open a file in PNPreview.
• saves the file that is opened and edited in PNPreview (refer to section 3.1.5 for PNPreview).
• enters Input Mode to edit the file in PNPreview (refer to section 3.1.5 for PNPreview). To back to the default preview mode, enter Escape (Esc).
• enters Preview Mode.
3.1.3.2 Edit Bar
There are five buttons in Edit Bar. These operations are only available for the files opened in PNPreview (refer to section 3.1.5 for PNPreview).
• undoes the last change.
• reverts the latest undo.
• cuts the selected contents and registers.
• copies the selected contents and registers.
• pastes the latest cut or copied contents to the cursor’s location.
3.1.3.3 Search Bar
There are one input text box and two buttons in Search Bar.
• is an input text box for users to search keywords in PNPreview quickly. After entering the keywords in the box, users just need to click Enter to search. The little cross before the box is used to clear all the inputs from the box.
• goes to the previous match.
• goes to the next match.
3.1.3.4 Goto Bar
There are two buttons and one input text box in Goto Bar.
• goes to the top line of the file in PNPreview.
• goes to the bottom line of the file in PNPreview.
• is an input text box for users to set the line number to go to.
3.1.3.5 Application Bar
There are six buttons in Application Bar.
• launches a new PNTree and uses the path of the selected file or directory as its Home Path (refer to section 4.2.2 for multiple PNTrees).
• opens the file selected in the embedded PNTree with a new PNEdit window (refer to section 5 for PNEdit).
• launches PNDiff to compare the files selected in the embedded PNTree (refer to section 6.1.1).
• launches the PNConsole window (refer to section 7.1).
• launches PNFinder and uses the path of the selected file or directory as its initial home path (i.e., the starting hierarchy of the searching) (refer to section 8.1).
• launches PNCompare and uses the path of the selected file or directory as the initial Home Paths for the Left and Right sides of the embedded PNTrees (refer to section 9.1).
3.1.3.6 Tool Bar
There are four buttons in Tool Bar.
• opens the window that prints system information (refer to section 3.8.2).
• opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• opens the tool window of the directory information printer (refer to 3.8.4).
3.1.3.7 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens this user manual.
• shows the tool information, like tool name, tool version, etc.
3.1.4 PNTree Area
In this area, one PNTree is embedded. Please refer to section 4 for details about PNTree.
3.1.5 PNPreview Area
PNPreview is a text preview window embedded in the PNFile main window (Figure 3 1) and the window of the application PNFinder (Figure 8 4). It provides a fast way of previewing any text files, and it supports simple edit operations.
3.1.5.1 Opening file in PNPreview
There are four ways to open one file in PNPreview.
• To double-click the selected file in PNTree.
• To drag-and-drop the selected file from PNTree Area to PNPreview.
• To click the button (“Preview”) to select one file for previewing (refer to section 3.1.3.1).
• To click “Preview” in File Menu to select one file for previewing (refer to section 3.1.2.1 and 8.2.3.1)
To backward focus the file that is being previewed in PNTree, users only need to drag and drop from the PNPreview Area to PNTree Area. Please note that this backward focusing does not work unless the file is under the current home path of the tree or its subdirectories.
3.1.5.2 Simple operations supported in PNPreview
Usually, to edit files, users are recommended to open them in PNEdit (refer to section 5.1.1). In some cases, only simple editing or small modification is desired, thus PNFile also supports quick edit & save for the file opened in PNPreview.
There are two modes in PNPreview, Input Mode and Preview Mode. Preview Mode is the default one. Users can enter Input Mode via button or menu in PNFile Edit Menu, and back to Preview Mode by entering ESC (Escape). In Input mode, the characters typed are inserted as text.
For more supported edit operations, please refer to sections 3.1.2.3 and 3.1.3.2.
3.1.5.3 Right-click Menu in PNPreview Area
The right-click menu is provided in PNPreview.
Figure 3 12 Right-click Menu in PNPreview

• Undo undoes the last change.
• Redo reverts the last undoing.
• Cut copies and then deletes the selected contents.
• Copy copies the selected contents.
• Paste pastes the latest cut or copied contents to the cursor’s location.
• Select Word selects contents by word.
• Select Line selects contents by line.
• Select Paragraph selects contents by paragraph.
• Select All selects all the contents.
• Copy Full Path copies the full hierarchy path of the file opened in the PNPreview Area to the clipboard.
3.1.6 Status Area
The Status Area is at the bottom of the PNFile Main Window showing the information and the status of the file opened in PNPreview (Figure 3 13 and Figure 3 14).
The accessing mode, owner, file size, and the time when the file is updated are displayed on the left. The file’s name and its modification status are displayed on the right.
Figure 3 13 Status Area in PNFile Main Window

Figure 3 14 Status Area in PNFile Main Window when the change is not saved

3.2 PNTree Window
PNTree provides a graphic interface for users to navigate and operate on directories or files efficiently. In the PNFile Main Window, there is one PNTree embedded (Figure 3 1), and multiple PNTrees can be launched from any existing PNTrees. A stand-alone PNTree Window is shown in Figure 3 15.
Please refer to section 4 for details about PNTree.
Figure 3 15 PNTree Window

3.3 PNEdit Window
PNEdit is an efficient and powerful text editor. It supports the flexible editing of any text files. PNEdit Window is shown in Figure 3 16.
Please refer to section 5 for details about PNEdit.
Figure 3 16 PNEdit window

3.4 PNDiff Window
PNDiff compares multiple text files and shows the differences. It helps locate and navigate the differences rapidly. PNDiff Window is shown in Figure 3 17.
Please refer to section 6 for details about PNDiff.
Figure 3 17 PNDiff Window

3.5 PNConsole Window
PNConsole is a graphical Multi-Language Platform Console, which has four languages preset, including Shell, TCL, Python, and Perl. After selecting the language compiler, any commands and scripts in this language can be well supported in the graphical PNConsole. Besides, any other language compilers available in the system can be well supported in PNConsole as well. PNConsole window is shown in Figure 3 18.
Please refer to section 7 for details about PNConsole.
Figure 3 18 PNConsole Window

3.6 PNFinder Window
PNFinder is an efficient file (and its content) finding & replacing tool. Multiple searching modes and filtering configs make the tool more flexible and powerful. PNFinder supports both normal plain text and regex text expression searching & replacing. It manages to control the searching depth and filter files by multiple criteria like name, owner, access, time, and size. Locating and reviewing the finding result in PNFinder is quite easy. PNFinder window is shown in Figure 3 19.
Please refer to section 8 for details about PNFinder.

Figure 3 19 PNFinder Window

3.7 PNCompare Window
PNCompare is an efficient and practical file & directory comparing tool which aims to compare two directories and/or files inside. It supports to compare by multiple criteria, such as owner, access, time, size, and content. It also supports comparing depth control and multiple comparing modes like File-Folder, File-Only, and Folder-Only. After comparing, PNCompare manages to review the results and resolving the differences easily. PNCompare window is shown in Figure 3 20.
Please refer to section 9 for details about PNCompare.
Figure 3 20 PNCompare Window

3.8 Other Tools
Four other tools can be launched from either Tool Menu or Tool Button, including Encrypt/Decrypt, System Information, Split/Join, and Directory Print.
3.8.1 Encrypt and Decrypt
Users can type the password in the input text box in Figure 3 21 to either encrypt the file or decrypt it later with the correct password. After conducting either Encrypt or Decrypt, the result can be previewed via the Preview button. Please note that the result is not saved until pressing the Apply button.
Figure 3 21 Encrypt and Decrypt tool

3.8.2 System Information
The detailed system information is printed via this tool (Figure 3 22).
Figure 3 22 System Information Tool

3.8.3 Split and Join
With the tool Split/Join, the file selected can be split by the number of lines or files (Figure 3 23).
Figure 3 23 Split and Join Window (Split)

The right-click menu is provided in the Split window (Figure 3 24) to add, delete, or split the files selected.
Figure 3 24 The right-click menu in Split window

With the tool, the files selected can also be joined as one (Figure 3 25). The button “Insert” is used to add one valid file path to the to-be-joined file list.
Figure 3 25 Split and Join Window (Join)

The right-click menu is provided in the Join window (Figure 3 26) to insert files or delete the files selected.
Figure 3 26 The right-click menu in Join window

3.8.4 Directory Print
Directory Print prints the verbose information of any selected directory as required in Figure 3 27.
Figure 3 27 Directory Print Tool

4 PNTree
PNTree is a directory tree navigation tool. It navigates the directories and files from the user-specified home path. The home path of the tree can be changed whenever needed.
Rich file information is displayed, and various operations are supported in the PNTree, such as Filter, Copy To, Move To, Delete, New, Rename, Compress, Split/Join, Encrypt/Decrypt, Directory Print, sending files to the bonded PNEdit windows, launching PNDiff, etc.
This section introduces the ways to launch PNTree and the interfaces of PNTree. Besides, the concept of the Home Path, multiple PNTrees, and the bonding between PNTree and PNEdit windows are introduced as well.
4.1 Launching PNTree
In the PNFile Main Window (Figure 3 1), PNFinder (Figure 8 4) and PNCompare window (Figure 9 4), there is one PNTree embedded in the PNTree Area. Multiple PNTrees can be launched from any existing PNTrees independently (Figure 4 1). There are entries to launching a new PNTree in both PNFile and the applications like PNFinder and PNCompare. Besides, PNTree is also an independent tool that can be launched from system terminals.
Figure 4 1 Independent PNTree Window

4.1.1 Launching together with PNFile/PNFinder/PNCompare
Once PNFile, PNFinder, or PNCompare is launched, the embedded PNTree is available (refer to section 3.1, 8.2, and 9.2).
4.1.2 Launching from one existing PNTree
There are three ways to launch a new PNTree from existing PNTrees. The new PNTree is launched with the Home Path of the selected directory or file (refer to section 4.2.1 for the concept of Home Path in PNTree).
The first one is to use the right-click menu (Figure 4 2) after selecting either directory or file in the existing PNTree. This way is available to any existing PNTree, either embedded or independent one.
Figure 4 2 Launching a new PNTree via the right-click menu

The second one is to use one of the buttons, (“Launch PNTree”), in PNFile (section 3.1.3.5), PNFinder (section 8.2.3.1) or PNCompare (section 9.2.3.1). This way is only valid to the embedded PNTree.
The last one is to use one of the menus, “PNTree”, in PNFile (section 3.1.2.5), PNFinder (section 8.2.2.1) or PNCompare (section 9.2.2.1). This way is only valid to the embedded PNTree too.
4.1.3 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNTree from system terminals, users just need to fire the command pntree followed by one directory path. The path followed is the Home Path of this PNTree. The current path where the tool is launched is used as Home Path if no option is followed. When there is more than one path followed, the last one is the Home Path. If the specified path is not available, the current path is used as Home Path.
Example: > pntree test_home_folder
To get the help information of the pntree command, please use the option “+h” (Figure 4 3).
Figure 4 3 pntree help information

4.2 Concepts in PNTree
4.2.1 Home Path of one PNTree
Every PNTree has its root, which is called Home Path. Home Path is displayed at the top of each tree (Figure 4 4).
Figure 4 4 Home Path of PNTree

Each PNTree navigates directories and files starting from its Home Path. The directory selected in PNTree or the Home Path (when no directory is selected) is the starting point of searching in either the Tree-Filter Bar or the Advanced Tree Search & Replace.
Home Path can be set to any available directories. It is determined when PNTree is launched, but it can also be changed whenever needed.
All the Home Paths ever set are recorded, which can be viewed in the Home Path History List window (Figure 4 5). By selecting and jumping to any item from the history list, the Home Path of associated PNTree can be changed back.
Figure 4 5 Home Path History List Window

4.2.2 Multiple PNTrees
There are two types of PNTree, embedded and stand-alone. The embedded PNTree is in the PNFile Main Window (Figure 3 1). The stand-alone PNTree is launched from system terminals with command “pntree [home path directory]” directly, and it is supported to launch new stand-alone PNTrees from any existing PNTrees.
Those PNTrees which are launched from other PNTrees are called the descendant PNTree, and the PNTrees where other PNTrees are launched from are called ancestor PNTree. Any stand-alone PNTree can be an ancestor and descendant. The first ancestor PNTree of its family is either launched from terminals directly or embedded in PNFile Main Window.
The example in Figure 4 6 demonstrates the relations among multiple PNTrees. A is the first ancestor of the family of A, B, C, D, and E. B is an ancestor PNTree of D and E, but it is also a descendent PNTree of A. F is also the first ancestor, but with no descendent.
Figure 4 6 Example of Ancestor and Descendant PNTrees

Closing one PNTree closes all its descendent PNTrees as well. Take the example in Figure 4 6, when A is closed, all its descendent B, C, D, and E are closed simultaneously. Closing C has no impact on the D or E.
4.2.3 Bonded PNEdit and PNDiff Windows
There can be multiple PNTrees, and starting from each PNTree, new PNEdit or PNDiff windows can be launched. These new PNEdit and PNDiff windows are bonded to the PNTree where they are launched from, and this PNTree is called the parent of its bonded PNEdit and PNDiff windows.
After closing one PNTree, all the bonded PNEdit and PNDiff windows are closed too.
4.3 Interfaces of PNTree
4.3.1 Menus
Menus are only available for the PNTree embedded in PNFile Main Window (Figure 4 7, Figure 4 8, and Figure 4 9). There is no menu in any stand-alone PNTrees. Please note that the shortcut commands associated with those operations in Directory Menu in PNFile Main Window (Figure 4 8) are available to both types of PNTree.
Figure 4 7 PNTree related File Menu in PNFile Main Window

• Tree Home… opens the directory selecting window for users to change the Home Path of the embedded PNTree.
• Preview… launches a file-selecting window for users to select and open one file in PNPreview. (refer to section 3.1.5 for PNPreview)
• Send To… opens the file selected in the embedded PNTree in a new tab of one existed PNEdit window.
Figure 4 8 PNTree related Directory Menu in PNFile and PNCompare Window

• Delete removes the selected files or directories (refer to section 4.4). The shortcut command is ctrl+x.
• Hold corresponds to selecting files or/and directories in PNTree and treating them as the source of the operations copy or move. The shortcut command is ctrl+h. It is supported to accumulate the held files or directories by applying multiple Hold.
• Paste corresponds to selecting files or/and directories in PNTree and treating them as the destination of the operation Copy (refer to section 4.4). The shortcut command is ctrl+v. Hold and Paste here is similar to Copy To described in section 4.3.3.
• Move corresponds to selecting files or/and directories in PNTree and treating them as the destination of the operation Move (refer to section 4.4). The shortcut command is ctrl+m. Hold and Move here is similar to Move To described in section 4.3.3.
• New creates a new file or directory (refer to section 4.4). The shortcut command is ctrl+n.
• Rename changes the name of the selected file or directory (refer to section 4.4). The shortcut command is ctrl+r.
• Compress compresses the selected files and/or directories (refer to section 4.4). The shortcut command is ctrl+t.
• Copy Full Path copies the full hierarchy path of the selected file or directory to the clipboard. The shortcut command is ctrl+z.
Figure 4 9 PNTree related Application Menu in PNFile Main Window

• PNTree launches a new PNTree and uses the path of the selected file or directory as its Home Path.
4.3.2 Buttons
There are six buttons available for both embedded and stand-alone PNTree (Figure 4 10).
Figure 4 10 Buttons in PNTree

• opens the directory selecting window for users to change the Home Path of the current PNTree.
• opens the list of Home Path history. Users can view the Home Path history in the list and set the current Home Path back to one of the paths listed.
• goes to the parent path of the current Home Path and set the parent path as the new Home Path.
• dives down to the selected directory and sets it as the current Home Path.
• goes to the previous match in the results of Tree-Filter (refer to section 4.3.4 for Tree-Filter Bar).
• goes to the next match in the results of Tree-Filter (refer to section 4.3.4 for Tree-Filter Bar).
4.3.3 Right-click Menu
Right-click Menu is available in PNTree (Figure 4 11).
Figure 4 11 Right-click Menu of PNTree

• PNEdit opens the selected file or directory in a new PNEdit window (refer to section 5 for PNEdit).
• Send To… opens the selected file or directory in a new tab of an existing and bonded PNEdit window.
• PNDiff compares the files selected in a new PNDiff window (refer to section 6 for PNDiff).
• PNTree launches a new PNTree and uses the path of the selected file or directory as its Home Path.
• Tool launches tools like Encrypt/Decrypt, Split/Join, and Directory Print for the file or directory selected.
• Expand All expands all the hierarchies from the selected directory node all the way down to the deepest sub-paths. Please use caution with this operation since this can take a longer time when the hierarchies under the current Home Path are relatively deep or the files under some of the hierarchies are massive.
• Collapse All collapses all the hierarchies if they are expanded.
• Directory Down dives down to the selected directory and sets it as the current Home Path.
• Delete removes the selected files or directories (refer to section 4.4).
• Move To moves the selected files or directories to the currently focused directory (refer to section 4.4).
• Copy To copies the selected files or directories to the currently focused directory (refer to section 4.4).
• New creates a new file or directory (refer to section 4.4).
• Rename changes the name of the selected file or directory (refer to section 4.4).
• Compress compresses the selected files and/or directories (refer to section 4.4).
• Copy Full Path copies the full hierarchy path of the selected file or directory to the clipboard.
4.3.4 Tree-Filter Bar
PNTree has a Tree-Filter Bar at the bottom of the window to allow users to quickly find and locate the files or/and directories that match the keywords (Figure 4 12).
Figure 4 12 Tree-Filter Bar at the bottom of PNTree

There are three types of quick search supported, all, folder, and file. “all” means all files and directories that match the keywords will be located and highlighted in PNTree if there is any. “folder” means it only searches for the matched directories while “file” means the searching is performed on files only.
The directory selected in PNTree or the Home Path (when no directory is selected) is the starting point of searching.
Please note that the wildcard is supported in the keyword box to match any characters. Figure 4 13 shows one of the examples of how a Tree-Filter Bar works.
Figure 4 13 An Example of Tree Filtering

4.4 Operations on Directories and Files in PNTree
The operations on directories and files in PNTree are accomplished via either the Directory Menu (Figure 4 8) when it’s the embedded PNTree or the Right-click Menu (Figure 4 11) on any PNTree. The associated shortcut commands are available to any PNTree.
• Delete

The files and directories selected can be removed from PNTree. After performing the Delete operation, the selected files or directories are not available in the system either (Figure 4 14).
Figure 4 14 Delete Operation in PNTree

• Move

To move files or directories from one path to another in PNTree, there are three ways.

Firstly, moving with the right-click menu. There are three steps (Figure 4 15). First, click the files or directories on PNTree to select them as the source. Second, right-click the destination directory to open the right-click menu (the destination will turn red after right-clicking it). The last step is to click on the menu to select the desired operation, such as Move To in this case.

Figure 4 15 Split Steps to move or copy in PNTree with Right-Click menu

Secondly, if the PNTree is the one embedded in the PNFile Main Window, it is also feasible to move with the Directory Menu in PNFile Main Window (or the associated shortcut command). There are two steps (Figure 4 16).
Figure 4 16 Split Steps to move or copy in PNTree with Directory Menu of PNFile Main Window

Lastly, and also most efficiently, moving by mouse clicking, dragging, and dropping the source to the destination.

• Copy

To copy files or directories from one path to another in PNTree, there are three ways too. The steps of the first two ways are similar to Move (Figure 4 15 and Figure 4 16). The last way is similar too, but by mouse middle-clicking, dragging, and dropping the source to the destination.

• New

To create a new file or directory, New Window is launched. Users can create new files or folders with the names typed under paths specified (Figure 4 17).
Figure 4 17 New in PNTree

• Rename

It is supported to rename both file and directory via Rename Window (Figure 4 18).
Figure 4 18 Rename in PNTree

• Compress and Decompress
The Compress Menu helps users to either compress or Decompress files or directories (Figure 4 19 and Figure 4 20).
Figure 4 19 Compress in PNTree

Figure 4 20 Decompress in PNTree

5 PNEdit
PNEdit is an advanced text edit tool. It is an important, efficient, and powerful component of PNFile.
PNEdit supports various efficient text editing operations, such as cutting/copying/pasting chars/words/lines, advanced searching and replacing, syntax detecting and highlighting, undoing/redoing, etc. There are three working modes, input mode, replace mode, and command modes in PNEdit, and rich commands/hotkeys are supported in all the working modes. Besides, it supports selecting text for operating in both line and column modes.
PNEdit can be launched from PNTree, PNDiff, PNFinder, and PNCompare. It is also an independent tool that can be launched from system terminals.
This section introduces the ways to launch PNEdit, the interfaces of PNEdit, the supported operations & edit modes, and the helpful tools in PNEdit.
5.1 Launching PNEdit
PNEdit can be launched from PNTree, including independent PNTrees and those embedded in PNFile, PNFinder and PNCompare, or system terminals directly. Please refer to section 4.2.2 to understand independent and embedded PNTree.
5.1.1 Launching from independent PNTree
There are two ways to launch PNEdit from independent PNTree. Please noted that these two methods are available in any embedded PNTree as well.
• The first one is to right-click on the selected text file in PNTree and open it with PNEdit (section 4.3.3).

• Secondly, if there are existing PNEdit windows bonded with the current PNTree (refer to section 4.2.3 for the concept of bonding), the selected file can also be sent to any bonded PNEdit windows through the menu “Send To…” in the right-click menu of PNTree (section 4.3.3).
5.1.2 Launching from Embedded PNTree
Apart from the two ways accessible in the independent PNTree (section 5.1.1), there are three more ways to launch PNEdit from the embedded PNTree.
• Firstly, to click one of the buttons, (“Launch PNEdit”), in PNFile main window (section 3.1.3.5), PNDiff (section 6.2.3.1), PNFinder (section 8.2.3.1) or PNCompare (section 9.2.3.1) to open the selected file in a new PNEdit window.

• Secondly, to open the selected file in a new PNEdit window through one of the menus, “PNEdit”, in PNFile main window (section 3.1.2.5), PNDiff (section 6.2.2.1), PNFinder (section 8.2.2.1) or PNCompare (section 9.2.2.1).

• The last one, if there are PNEdit windows bonded with the current PNTree (refer to section 4.2.3 for the concept of bonding), the selected file can also be sent to any bonded PNEdit windows through the menu “Send To…” in the File Menu of PNFile (section 3.1.2.1), PNFinder (section 8.2.2.1) or PNCompare (section 9.2.2.1).
5.1.3 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNEdit from system terminals, users just need to fire the command pnedit. The file or directories followed will be opened. Multiple files or directories split by blank will be opened in different tabs in on PNEdit window. A blank tab will be opened if no option follows the command “pnedit”.
Example: > pnedit test_file1 test_folder1 test_file2 test_folder2
To get the help information of the pnedit command, please use the option “+h” (Figure 5 1).
Figure 5 1 pnedit help information

5.2 Interfaces of PNEdit
The PNEdit window is shown in Figure 5 2. There are five areas in the PNEdit window, including Title Area, Menu Area, Button Area, Edit Area, and Status Area.
Figure 5 2 Main areas in PNEdit window

5.2.1 Title Area
The title area (Figure 5 3) shows the name of the current file (or of the directory when the current PNEdit is used as a directory browser) and its parent path.
Figure 5 3 current file’s name and its parent path in the title area

5.2.2 Menu Area
There are six main menus in the PNEdit window, including File, Edit, View, Buffers, Tool, and Help Menu (Figure 5 4).
Figure 5 4 Menus in PNEdit window

5.2.2.1 File Menu
The pull-down menu in File Menu is shown in Figure 5 5.
Figure 5 5 File Menu in PNEdit window

• Open… opens a selected file in the current tab.
• Open Tab… opens a selected file in a new tab in the current PNEdit window.
• New closes the file in the current tab and creates a new empty file in the current tab.
• Close closes the current file.
• Split Horizontal… splits the current edit area of the tab horizontally and opens a selected file in the new split edit area.
• Split Vertical… splits the current edit area of the tab vertically and opens a selected file in the new split edit area.
• Save saves the file in the current tab under its name.
• Save As… saves the file in the current tab under another specified name.
• Save+Exit saves the files in all tabs of the current PNEdit window and quits the current PNEdit window.
• Exit quits the current PNEdit window.
5.2.2.2 Edit Menu
The pull-down menu in Edit Menu is shown in Figure 5 6.
Figure 5 6 Edit Menu in PNEdit window

• Undo undoes the last change.
• Redo reverts the last undoing.
• Cut copies and then deletes the selected contents.
• Copy copies the selected contents to clipboard buffers.
• Paste gets the contents from the latest clipboard buffer and pastes to the position where the cursor locates.
• Input enters the input mode.
• Command enters the command mode.
• Select selects contents by word, line, and paragraph, or selects all the contents.
• Advanced Search Replace opens the advanced search&replace window. Please refer to section 5.3 for details.
• Advanced Edit opens the advanced edit window. Please refer to section 5.4 for details.
5.2.2.3 View Menu
The pull-down menu in Edit Menu is shown in Figure 5 7.
Figure 5 7 View Menu in PNEdit window

• Color Style lists eighteen preset color styles for users to choose from (Figure 5 8). Choosing one of them sets the specific color scheme for the current PNEdit windows. All tabs in one PNEdit window share a uniform color scheme. Different PNEdit windows can have different color schemes set.
Figure 5 8 Color Style in View Menu in PNEdit window

• Font Style lists seven preset font styles (Figure 5 9). Choosing one of them sets the specific font scheme. All tabs in one PNEdit window share a uniform font scheme. Different PNEdit windows can have different font schemes set.
Figure 5 9 Font Style in View Menu in PNEdit window

• Parameters lists four supported parameters (Figure 5 10). Parameter Number/No Number configures if the line number is printed in front of each line. Parameter List/No List configures if $ is displayed after each end of the line. Parameter Autoindent/No Autoindent configures if indent is applied automatically while editing. Parameter Wrap/No Wrap configures if lines longer than the width of the window wrap, and displaying continues on the next line.
Figure 5 10 Parameters in View Menu in PNEdit window

• Color Settings opens the color selection window (refer to section 5.2.3.4).
• Syntax Settings opens the syntax selection window (refer to section 5.2.3.4).
• Font Settings opens the font selection window (refer to section 5.2.3.4).
• Highlight Settings opens the highlight selection window (refer to section 5.2.3.4).
5.2.2.4 Buffers Menu
The pull-down menu in Buffers Menu is shown in Figure 5 11.
Figure 5 11 Buffers Menu in PNEdit window

• Change Buffer opens the tool window of Change Buffer (refer to section 5.6.3).
• String Buffer opens the tool window of String Buffer (refer to section 5.6.1).
• File Buffer opens the tool window of File Buffer (refer to section 5.6.2).
• Tagging adds or deletes tags (refer to section 5.6.4).
5.2.2.5 Tool Menu
The pull-down menu in Tool Menu is shown in Figure 5 12.
Figure 5 12 Tool Menu in PNEdit window

• System Information opens the window that prints system information (refer to section 3.8.2).
• Encrypt/Decrypt opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• Split/Join splits or joins the file(s) selected (refer to section 3.8.3).
• Directory Print opens the tool window of the directory information printer (refer to section 3.8.4).
5.2.2.6 Help Menu
The pull-down menu in Help Menu is shown in Figure 5 13.
Figure 5 13 Help Menu in PNEdit window

• User Manual opens this user manual.
• Command Help opens the commands/shortcuts help window. (Figure 5 14, and details in Appendix A: Commands in PNEdit)
• About shows the tool information.
Figure 5 14 Command Help Window

5.2.3 Button Area
Button Bar is grouped as shown in Figure 5 15.
Figure 5 15 Button Bar in PNEdit

5.2.3.1 File Bar
There are five buttons in the File Bar.
• opens the selected file in the current tab in the current PNEdit window.
• saves the file that is opened in the current tab.
• saves all the files opened in all the tabs of the current PNEdit window.
• enters input (insert) mode. (refer to section 5.5.1 for edit modes.)
• enters command mode. (refer to section 5.5.1 for edit modes.)
5.2.3.2 Edit Bar
There are six buttons in the Edit Bar.
• undoes the last change.
• reverts the latest undo.
• cuts the selected contents and registers in the clipboard buffer.
• copies the selected contents and registers in the clipboard buffer.
• pastes the lastest cut or copied contents to the cursor’s location.
• opens the advance edit window (refer to section 5.4).
5.2.3.3 Search Bar
There are five buttons in the Search Bar.
• goes to the previous match.
• goes to the next match.
• open the Advanced Search & Replace window (refer to section 5.3).
• goes to the top of the text.
• goes to the bottom of the text.
5.2.3.4 View Bar
There are four buttons in the View Bar.
• opens the color selection window (Figure 5 16).

There are 18 preset color schemes for users to choose from, and each of the nine color categories can be customized respectively.
Figure 5 16 Color Selection window

The color style can also be set for all PNEdit windows via the config file .pnrc (refer to Appendix B: Config File .pnrc)

• opens the syntax selection window (Figure 5 17).

The supported syntax highlight schemes are listed in the Syntax Selection window. By default, the syntax is automatically determined by the file extension, but it’s also supported to apply any supported syntaxes. The syntax list can be extended (please email to support@veriforma.com to get details).
Figure 5 17 Syntax Selection window

• opens the font selection window (Figure 5 18).

There are six preset font styles. It’s also supported to customize the font.
Figure 5 18 Font Selection window

• opens the highlight selection window (Figure 5 19).
Figure 5 19 Highlight Selection window

• Cursor sets the type and color of the cursor. For better editing view, there are three kinds of cursor supported, which can be enabled at the same time, including Line Cursor, Column Cursor, and Flicker Cursor.
• Select sets the background and foreground color of selection.
• Edit sets the background and foreground color of the context highlighted by the operation in the advanced edit window (refer to section 5.4).
• Insert sets the color and width of the inserting cursor.
• Search sets the background and foreground color of the matched context after searching.
• List sets the background and foreground color of the $ after end of line if “:set list” is enabled.
• Tag sets the background and foreground color of the tagged text (refer to section 5.6.4 for Tagging).
5.2.3.5 Buffers Bar
There are four buttons in the Buffers Bar.
• opens the tool window of Change Buffer (refer to section 5.6.3).
• opens the tool window of String Buffer (refer to section 5.6.1).
• opens the tool window of File Buffer (refer to section 5.6.2).
• opens the tool window of Tag List (refer to section 5.6.4.3)
5.2.3.6 Tool Bar
There are four buttons in the Tool Bar.
• opens the window that prints system information (refer to section 3.8.2).
• opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• opens the tool window of the directory information printer (refer to 3.8.4).
5.2.3.7 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens the opens the commands/shortcuts help window. (Figure 5 14, and details in Appendix A: Commands in PNEdit)
• shows the tool information, like tool name, tool version, etc.
5.2.4 Edit Area
Edit Area in the PNEdit window is the main area for text editing.
In Edit Area, there are three edit modes supported, including command mode, input mode, and replace mode. In command mode, most commands execute as soon as they are typed except for “colon” commands which execute after pressing the return key. In input mode, any character typed is taken to be text and is added to the file. To exit input mode, press the Escape (Esc) key. In Replace mode, each character typed replaces the one under the cursor. This continues until pressing . (refer to section 5.5.1 for the edit modes)
Right-clicking the Edit Area invokes the right-click menu (Figure 5 20).
Figure 5 20 Right-click Menu in Edit Area

Multiple tabs are supported in one PNEdit window and the horizontal tab navigation bar locates above the Edit Area (Figure 5 21).
Figure 5 21 Edit Area in PNEdit window

In the bottom right of the Edit Area, the real-time position of the cursor is displayed. In the bottom left, either the colon command (Figure 5 22, and refer to Appendix A: Commands in PNEdit) or the information, like the change sequence (Figure 5 23), warnings, errors (Figure 5 24), etc., are displayed.
Figure 5 22 The bottom of Edit Area (example: colon command)

Figure 5 23 The bottom of Edit Area (example: change sequence information)

Figure 5 24 The bottom of Edit Area (example: error information)

5.2.5 Status Area
The Status Area is at the bottom of each PNEdit window showing the information and the status of the file opened in the currently active tab in this PNEdit window (Figure 5 25).
Figure 5 25 Status Area in PNEdit window

The accessing mode, owner, file size, and the time when the file is updated are displayed on the left. The file’s name and its modification status are displayed on the right (Figure 5 26).
Figure 5 26 Status Area in PNEdit window when the change is not saved

5.3 Advanced Search & Replace Window
Search & Replace is supported efficiently with the command line in Edit Area (refer to 8. Replace using regex in Appendix A: Commands in PNEdit). Meanwhile, PNEdit supports the other powerful way of Advanced Search & Replace with the GUI window (Figure 5 27).
Figure 5 27 Advanced Search & Replace window

Advanced Search & Replace window and Advanced Edit window of one tab in the PNEdit window are mutually exclusive to each other, which means for one same tab, only Advanced Search & Replace or Advanced Edit window can be launched at a time.
5.3.1 Expression Card
In the Expression Card in this window, there are two modes, Normal and Regex (Figure 5 28).
Figure 5 28 Advanced Search & Replace (Expression Card - search and replace in Regex mode)

In Normal mode, anything typed in the Search Box and Replace Box is treated as literal characters with no special meanings. In this mode, any characters, even like a backslash, a dollar, or square brackets, mean things literally. There are two searching options supported in Normal mode, Ignore Case and Whole Word. Ticking the Ignore Case performs case-insensitive searching, and expressions like [A-Z] will also match lowercase letters. Ticking the Whole Word searching the string as a whole word.
In Regex mode, anything typed in the Search Box and Replace Box is treated as regular expressions (Figure 5 28). There are four searching options in this mode, including I (ignore cases), M (multi-line matching), S (dot matches all), and R (raw string matching), which are corresponding to the flags in the command line “:[range]s/[regex_search]/[regex_replace]/[flags]”. Ticking I performs case-insensitive searching. Ticking M performs multi-line matching; the default is single-line matching. Ticking S makes the dot ‘.’ special character match any character at all, including a newline; without this, ‘.’ matches anything except a newline. Ticking R makes similar literal searching and replacing in Normal mode.
5.3.2 Position Card
Position Card allows users to specify the line/column range for the tool to only search inside the range. It is supported to select range in both Line Mode and Column Mode (Figure 5 29).
The format of both From Box and To Box is the line and column numbers joined by one dot, “.”. The range of line is from 1 to the max line number of the current file, and the range of column is from 0 to the max column number of the specified line (“end” can also be used here to indicate the last column, like 25.end means the last column of the twenty-fifth line).
For example, from “19.0” to “25.8” specifies the range from the line nineteen and column zero to the line twenty-five and column seven (not eight).
Figure 5 29 Advanced Search & Replace (Position Card – Column Mode & Smart selection)

There are three options at the bottom of Position Card, “All”, “Current Line” and “Smart”. Clicking “All” sets the searching range to the whole file. Clicking “Current Line” indicates the searching will only cover the line where the cursor is. “All” and “Current Line” work in Line Mode only. Clicking “Smart” automatically fills the From and To Box based on the current selection and mode in the associated tab of the PNEdit window.
5.3.3 Buttons
There are six buttons on the panel, “Search”, “Prev”, “Next”, “Replace All”, “Replace Next”, and “Cancel”.
“Search” button is to search and go to the first match in the range. “Prev” goes to the previous match while “Next” goes to the next one. “Replace All” is to replace all the matches with the content or regex in the Replace Box while “Replace Next” means literally to replace the next match. “Cancel” is to close the current Advanced Search & Replace window.
5.3.4 Results Panel
The searching result is displayed as shown in Figure 5 30. Take this as an example, the two numbers in “5/9” are the current match and the total match numbers respectively. “L 20” is the line number where the current match is. “x.vhdl” inside the brackets is the file name, “[1.0~239.0]” is the current searching range, and “Line” is the current searching mode.
Figure 5 30 Searching Results

5.4 Advanced Edit Window
PNEdit provides a powerful set of commands and shortcuts to support editing (refer to Appendix A: Commands in PNEdit), meanwhile, it has the Advanced Edit window supporting flexible and advanced editing with GUI (Figure 5 31).
Figure 5 31 Advanced Edit window

5.4.1 Position Card
Position Card allows users to set the line/column range, and operations only take effect in the specified range. It is supported to select range in both Line Mode and Column Mode.
The format is similar to that described in section 5.3.2.
The button “Highlight” in the Position Card is used to highlight the selection in the associated tab of PNEdit before actual operating. It is helpful, especially, when users want to confirm the operation that is going to be applied is upon the desired context.
5.4.2 Operation Card
Six supported operations are shown on the Operation Card.
• Cut cuts the selection.
• Copy copies the selection.
• Join joins the selected lines to the first line with one space inserted in between. It removes the indent and inserts one space when joining.
• Paste pastes the cut or copied selection before the specified position.
• Insert is only active in Column Mode. It inserts the characters of the Insert Box before the minimal column number of the position range for all the specified lines.
• Change is only active in Column Mode. It changes the content inside the specified position range with the characters in the Change Box.
5.4.3 Information Panel
The information on the current operation is displayed at the bottom of the Advanced Edit window (Figure 5 32). The leading word in the Information Panel shows the type of the current operation, which is followed by the file name, operating range, and Line/Column mode inside the brackets.
Figure 5 32 The information of the operation

5.5 Operation Modes
PNEdit is a modal editor. That means that the editor behaves differently, depending on which mode it is in.
5.5.1 Editing Modes
In terms of the way of editing, there are command mode, input mode, and replace mode.
5.5.1.1 Command Mode
In Command mode, any characters typed are seen as commands. This is the default mode when PNEdit starts. In this mode, rich commands and shortcuts are supported, such as the colon commands, change commands, navigation commands, etc… (Refer to Appendix A: Commands in PNEdit).
5.5.1.2 Input Mode
In Insert mode, the characters typed are inserted as text. Users can press the key to stop Insert mode and go back to Command mode. There are multiple commands to enter Input Mode from Command Mode, such as i (insert before the cursor), a (insert after the cursor), o (new a line and insert), s (delete the character under the cursor and insert), etc… (Refer to Appendix A: Commands in PNEdit)
5.5.1.3 Replace Mode
In Replace mode, each character typed replaces the one under the cursor. This continues until pressing . To enter Replace Mode from Command Mode, users just need to press R.
5.5.2 Text-Selecting Modes
In terms of the way of text-selecting, there are line mode and column mode.
5.5.2.1 Line Mode
Line mode is the default mode when PNEdit starts. It is the common way to select a certain line(s) of the text (Figure 5 33).
Figure 5 33 selecting text in Line Mode

5.5.2.2 Column Mode
Column mode is a flexible and easy way to select a rectangle of text for an operator (Figure 5 34). Column mode is extremely useful, especially when users want to work with tables.
To enter Column mode, users just need to press v. There are multiple operations supported in Column mode (Refer to Appendix A: Commands in PNEdit).
Figure 5 34 selecting text in Column Mode

5.5.3 Commands and Keyboard shortcuts
The supported commands and keyboard shortcuts are listed in Appendix A: Commands in PNEdit.
5.6 Tools in PNEdit
5.6.1 String Buffer
String Buffer stores the strings. One full set of String Buffer has three types of the buffer, including one general buffer, ten clipboard buffers, and twenty-six named buffers. All the strings stored in String Buffer can be viewed and edited in the String Buffer window (Figure 5 35).
Each PNEdit window has one dedicated set of String Buffer. Tabs of one PNEdit window share one set of String Buffer.
5.6.1.1 One General Buffer
The General buffer registers the strings operated by most change commands (Figure 5 35).
Figure 5 35 String Buffer: General buffer

The commands that update the General buffer are listed below (For more commands, please refer to Appendix A: Commands in PNEdit). The removed or copied strings while executing these commands are registered.
 s: Delete char and insert.
 S: Same as command ‘cc’. If ‘autoindent’ is on, preserve the indent.
 cw: Change (replace) to the end of the word.
 ciw: Change (replace) entire word.
 cc: Change (replace) entire line. If ‘autoindent’ is on, preserve the indent.
 cKaTeX parse error: Unexpected character: '' at position 44: …d of the line, ̲ C: Change (rep…),
 x: Delete (Cut) a character to General buffer.
 nx: Delete (Cut) n characters to General buffer.
 X: Back (Cut) a character to General buffer.
 nX: Back (Cut) n characters to General buffer.
 dd: Delete (Cut) a whole line to General buffer.
 ndd: Delete (Cut) n lines to General buffer.
 dw: Delete (Cut) word (counting from cursor) to General buffer.
 dnw: Delete (Cut) n words (counting from cursor) to General buffer.
 d): Delete (Cut) to the end of the sentence.
 db: Delete (Cut) previous word to General buffer.
 dnb: Delete (Cut) previous n words to General buffer.
 D: Delete (Cut) to the end of the line to General buffer.
 d$: Delete (Cut) to the end of the line to General buffer.
 y: yank (copy) the selected chars to General buffer.
 yy: yank (copy) a line to General buffer.
 Y: yank (copy) a line to General buffer.
 nyy: yank (copy) n lines to General buffer.
 nY: yank (copy) n lines to General buffer.
 yw: yank (copy) a word to General buffer.
 ynw: yank (copy) n words to General buffer.
 s: in column mode, cut to General buffer and insert.
 d: in column mode, delete (cut) to the General buffer.
 x: in column mode, delete (cut) to the General buffer.
 y: in column mode, yank (copy) to the General buffer.
5.6.1.2 Ten Clipboard Buffers
Clipboard buffer stores the strings copied by selecting or from another application (Figure 5 36). AT most ten Clipboard buffers are available recording the latest ten selection history.
Figure 5 36 String Buffer: Clipboard

In the Edit Area in PNEdit, users can paste the content of the latest (top) Clipboard buffer by clicking the middle mouse button. Similarly, users can paste it to another application as well. There is a button beside the Clipboard sequence, , which can change the sequence and make any one of the available Clipboard buffers top. Please note that the Top action only takes effect after clicking the Save button.
The latest (top) Clipboard buffer can also be accessed via the special register "*. For example, in the Command mode in PNEdit, the command "*y copies one line, news one Clipboard buffer as the latest one, and stores copied one line to the latest Clipboard buffer. Similarly, the command "p pastes the content of the latest Clipboard buffer.
The commands related to the "
buffer are listed below. (For more commands, please refer to Appendix A: Commands in PNEdit)
 "ndd: Delete (cut) n lines to buffer ".
 "nyy: yank (copy) n lines to buffer ".
 "nY: yank (copy) n lines to buffer ".
 "p: put (paste) text from buffer " after the cursor.
 "P: put (paste) text from buffer " before the cursor.
 "np: put (paste) text from buffer " after the cursor by n times.
 "nP: put (paste) text from buffer " before the cursor by n times.
5.6.1.3 Twenty-six Named Buffers
The twenty-six Named buffers with names A-Z are one-one correspondent to the registers "a to "z (Figure 5 37). They can be accessed by any copy, or yank, or cut, or append, or paste commands which are related to registers "a to "z.
For example, in the Command mode in PNEdit, the command "ay copies one line and stores to the Named buffer A. The command "Ay copies one line and appends to the Named buffer A. Similarly, the command "bp pastes the content of the Named buffer B.
Figure 5 37 String Buffer: Named buffer

The following commands access the Named buffers. (For more commands, please refer to Appendix A: Commands in PNEdit).
 " [a-z]ndd: Delete (cut) n lines to buffer [a-z].
 " [A-Z]ndd: Delete (cut) n lines and append to buffer [a-z].
 " [a-z]nyy: yank (copy) n lines to buffer [a-z].
 " [A-Z]nyy: yank (copy) n lines and append to buffer [a-z].
 " [a-z]nY: yank (copy) n lines to buffer [a-z].
 " [A-Z]nY: yank (copy) n lines and append to buffer [a-z].
 " [a-z]p: put (paste) text from buffer [a-z] after cursor.
 " [a-z]P: put (paste) text from buffer [a-z] before cursor.
 " [a-z]np: put (paste) text from buffer [a-z] after cursor by n times.
 " [a-z]nP: put (paste) text from buffer [a-z] before cursor by n times.
There is no space reserved for any of the Named buffers at the starting of PNEdit. Once users store some content to any of the Named buffers via delete or yank command, the space for this specific buffer is reserved and available.
On the String Buffer panel, any existing Named buffers can be “deleted” from the space by clicking the Delete button for the selected Named buffer (Figure 5 38). Meanwhile, any unoccupied Named buffers can be created by clicking the New button (Figure 5 39). Please note that the Delete and New only take effect after clicking the Save button.

Figure 5 38 String Buffer: Named buffer, delete an existing Named buffer

Figure 5 39 String Buffer: Named buffer, new a Named buffer with unoccupied name

5.6.1.4 Edit String Buffer
All three types of String Buffer can be edited, saved, and fetched later (Figure 5 40).
Figure 5 40 Edit the content and the insert mode in String Buffer

Once clicking the Edit button, the content in the selected buffer can be modified. After Save, the updated content can be fetched via the commands listed in section 5.6.1.1, 5.6.1.2, or 5.6.1.3.
Besides the content in the buffer, the insert mode can be shifted too. There are three insert modes supported for General and Clipboard buffer, Cursor mode, Line mode, and Column mode. For the twenty-six Named buffers, the previous two modes are supported. Inserting in Cursor mode puts the content right after the current cursor. Inserting in Line mode puts the content from the following line. Inserting in Column mode means the contents in the selected buffer are seen as that in Column mode and will be inserted into the text vertically.
The Reset button on the panel’s bottom right reverts all the current modifications on both contents and insert mode for all the buffers.
5.6.2 File Buffer
File Buffer registers the last scene of every file that has once been opened in the current PNEdit window (Figure 5 41). For example, if one quits a file without saving the changes, then the scene of the file at the moment of quitting is registered in the File Buffer. When any buffered files have been changed outside of the current PNEdit, users will be asked if reloading is desired or not.
Each PNEdit window has one dedicated File Buffer. Tabs of one PNEdit window share one File Buffer.
Figure 5 41 File Buffer

The information of all the buffered files can be viewed in the File Buffer window. The displayed file information in the File Buffer includes the file name, size, updated time, and the file path.
The buffered files listed in the File Buffer window can be restored to either the current or a new tab.
There are several buttons at the bottom of the panel, including Refresh, Delete, Open, Open Tab, and Cancel.
• Refresh refreshes the File Buffer in-place. (To refresh the other String Buffer or Change Buffer, users need to reopen the window after closing it.)
• Delete removes one or more buffered files from the File Buffer.
• Open opens one or more buffered files in the current tab.
• Open Tab opens one or more buffered files in new tabs.
• Cancel closes the File Buffer.
5.6.3 Change Buffer
Change Buffer registers the scenes after any change operations in the currently opened tab. The change sequence can be viewed in the Change Buffer window (Figure 5 42).
Each tab in a PNEdit window owns one dedicated Change Buffer.
5.6.3.1 Metrics in Change Buffer
Figure 5 42, Figure 5 43, and Figure 5 44 demonstrate what Change Buffer looks like when opening a new file in the tab, applying change operations, and saving the file in between changes. Five metrics are displayed, including Number, Saved, Update Time, Position, Information.
• Number is the sequence number of each change operation.
• Saved marks the scene that is saved. For example, at the time when the file is just opened, the first scene is the one.
• Update Time is the time when the change operations are applied.
• Position records the . of the cursor when the change operations are applied.
• Information shows a more detailed position of the cursor when the change operations are applied. It shows the same as what is displayed via the command gg in the Command mode.
When one file is opened in one of the tabs in PNEdit and no change has been made yet, the Change Buffer of this tab only contains one item (Figure 5 42).
Figure 5 42 Change Buffer when opening a new file

5.6.3.2 Undo, Redo, and Goto
After applying several change operations, each operation is registered in the Change Buffer. The Undo/Redo sequence is based on the Change Buffer. There are four commands in the Command mode in PNEdit to support undoing and redoing (For more commands, please refer to Appendix A: Commands in PNEdit).
 u: Undo the last edit. It has the same function as the button Undo in the Change Buffer panel.
 r: Redo changes which were undone. It has the same function as the button Redo in the Change Buffer panel.
 :changeb[uffer]: Open Change Buffer window (GUI).
 :change : Go to a change listed in Change Buffer. It has the same function as the button Goto in the Change Buffer panel. Figure 5 43 shows an example when going to the eighth change.
The button Clear on the bottom right clears all the changes listed. Please use this button with caution since this action is not reversible.
Figure 5 43 Change Buffer after applying several change operations

The change in Change Buffer is marked as “saved” after saving the file at that step (Figure 5 44). Only one change in the sequence can be marked as “saved” at a time.
Figure 5 44 Change Buffer when undoing to a certain step and saving

5.6.4 Tagging
Tags are identifiers set in a file (Figure 5 45). They are also labels that can be jumped to. Tags can be quite helpful to highlight, record, and fast locate certain lines in a file.
Figure 5 45 Example Tagged File

Tagging Menu is under Tool Menu as shown in Figure 5 46.
Figure 5 46 Tagging Menu

5.6.4.1 Create Tags
There are two ways to create Tags: manual creating and advanced creating.
• Manual Create

To manually create a tag, users can select lines in the file first and click Manual Create in the Tagging Menu (Figure 5 46).

• Advanced Create

It is also supported to create tags using the Tag Advanced Create window (Figure 5 47). There are two ways to specify lines to create a tag, the one is using Line Range to specify the start/end line number, and the other is using Line Extend to specify the starting line number and the number of lines from the start line that needs to be selected.
Figure 5 47 Tag Advanced Create window

5.6.4.2 Delete Tags
To delete the existing tags, uses can click the tagged lines in the file and then delete them one by one, or delete all tags from a file at one time. Please refer to the Tagging Menu (Figure 5 46).
5.6.4.3 Tag List
All tags in one file are recorded and can be viewed in the Tag List window (Figure 5 49). Clicking the Tag List Button (Figure 5 48) opens the Tag List window.
Figure 5 48 Tag List Button

After selecting one or multiple items in the tag list, operations like Goto and Delete can be performed by clicking the corresponding buttons in the Tag List window (Figure 5 49) or by using the right-click menu.
Figure 5 49 Tag List Window

5.6.5 Other tools
The tools of Encrypt/Decrypt, System Information, Split/Join, and Directory Print can also be launched from PNEdit.
Encrypt/Decrypt encrypt or decrypt the files in a dedicated way of PNFile. System Information prints the system information. Split/Join splits or joins the files selected. Director Print prints the verbose directory information as required.
Please refer to section 3.6 to get details.

6 PNDiff
PNDiff is a tool in PNFile to compare two or multiple text files and show the differences. By comparing the plain text files and highlighting the differences in split windows, PNDiff helps locate and navigate the different parts rapidly.
In PNDiff, any files being compared can be edited and then saved. Editing is performed in-place via multiple Edit Buttons or by launching PNEdit. The comparison can be refreshed in-place if any of the files are updated. Please note that any in-place editing operations can be performed only after clearing the difference mark (refer to section 6.2.3.2).
This section introduces the ways to launch PNDiff, the interfaces of PNDiff, the usage of PNDiff, and how to understand the results of comparing.
6.1 Launching PNDiff
PNDiff can be launched from PNTree, including independent PNTrees and those embedded in PNFile and PNCompare, or system terminals directly. Please refer to section 4.2.2 to understand independent and embedded PNTree.
6.1.1 Launching from PNTree
In both independent PNTree and the PNTree embedded in PNFile or PNCompare, PNDiff can be launched through the right-click menu (section 4.3.3).
Besides, there are two more ways to launch PNDiff from the embedded PNTree only.
• Firstly, to click one of the buttons, (“Launch PNDiff”), in PNFile main window (section 3.1.3.5) or PNCompare (section 9.2.3.1).

• Secondly, to use one of the menus, “PNDiff”, in PNFile main window (section 3.1.2.5) or PNCompare (section 9.2.2.1)
6.1.2 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNDiff from system terminals, users only need to fire the command pndiff followed by candidate files split with blanks. The comparison is then performed on the files followed.
Example: > pndiff x_old.v x_new.v x_test.sv
To get the help information of the command pndiff, please use the option “+h” (Figure 6 1).
Figure 6 1 PNDiff help information

6.2 Interfaces of PNDiff
The PNDiff window is shown in Figure 6 2. There are four areas in the PNDiff window, including Title Area, Button Area, Compare Area, and Status Area.
There can be multiple windows in Compare Area, and the one selected is called an active window.
Figure 6 2 Main areas in PNDiff window

6.2.1 Title Area
The Title Area shows the full path and the name of the file opened in the active window (Figure 6 3).
Figure 6 3 Title Area in PNDiff

6.2.2 Menu Area
There are six main menus in the PNDiff window, including File Menu, Edit Menu, View Menu, Diff Menu, Tool Menu, and Help Menu (Figure 6 4).
Figure 6 4 Menus in PNDiff window

6.2.2.1 File Menu
The pull-down menu in File Menu is shown in Figure 6 5.
Figure 6 5 File Menu in PNDiff window

• Open… selects a file and opens it in the active window of the Compare Area (section 6.2.4).
• Add creates a new split window in the Compare Area and opens a file in the new window.
• Delete closes the active window from the Compare Area.
• PNEdit opens the file previewed in the active window of the Compare Area with PNEdit.
• Save saves the file previewed (and probably modified) in the active window of the Compare Area.
• Save As… saves the file previewed (and probably modified) in the active window of the Compare Area under another specified name.
• Save+Exit saves the file previewed (and probably modified) in the active window of the Compare Area and quit.
• Exit quits the current PNDiff window.
6.2.2.2 Edit Menu
The pull-down menu in Edit Menu is shown in Figure 6 6. These menus are used to edit the file in the active window in-place. Please note that any in-place editing operations can be performed only after clearing the difference mark (refer to section 3.1.5.2).
Figure 6 6 Edit Menu in PNDiff window

• Undo undoes the last change.
• Redo reverts the last undoing.
• Cut copies and then deletes the selected contents.
• Copy copies the selected contents to clipboard buffers.
• Paste gets the contents from the latest clipboard buffer and pastes to the position where the cursor locates.
• Input Mode enters the input mode.
• Preview Mode enters the preview mode.
• Select selects contents by word, line, and paragraph, or selects all the contents.
6.2.2.3 View Menu
View Menu (Figure 6 7) configures the view settings for the Compare Area. It is similar to the View Menu in PNEdit Window. Please refer to section 5.2.2.3 for details.
Figure 6 7 View Menu in PNDiff window

6.2.2.4 Diff Menu
The pull-down menu in Diff Menu is shown in Figure 6 8.
Figure 6 8 Diff Menu in PNDiff window

• Setting opens the configuring window. (refer to section 6.3).
• Clear clears any difference marks from all windows in the Compare Area in PNDiff. Only when all the difference marks are removed, the files in Compare Area can be edited in-place with the Edit Buttons or the right-click menu.
• Start refreshes the comparison and updates the difference marks in Compare Area.
• List opens the window of the difference list. (refer to section 6.4.2).
• Goto Review goes to the difference result item specified in the text box of the Review Bar (section 6.2.3.5).
• Goto Prev goes to the previous difference result item.
• Goto Next goes to the next difference result item.
6.2.2.5 Tool Menu
The pull-down menu in Tool Menu is shown in Figure 6 9.
Figure 6 9 Tool Menu in PNDiff window

• System Information opens the window that prints system information (refer to section 3.8.2).
• Encrypt/Decrypt opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• Split/Join splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• Directory Print opens the tool window of the directory information printer (refer to section 3.8.4).
6.2.2.6 Help Menu
The pull-down menu in Help Menu is shown in Figure 6 10.
Figure 6 10 Help Menu in PNDiff window

• User Manual opens this user manual.
• About shows the tool information.
6.2.3 Button Area
Button Bar is grouped as shown in Figure 6 11.
Figure 6 11 Button Area in PNDiff

6.2.3.1 File Bar
There are seven buttons in File Bar.
• opens a file in the active window. This option is only valid in Input Mode.
• adds a window to Compare Area and opens a file in it. This option is only valid in Input Mode.
• delete the active window from Compare Area. This option is only valid in Input Mode.
• launches PNEdit to edit the file opened in the active window.
• saves the file of the active window. This is used when there are in-place changes to save.
• enters Input Mode to edit the file in the active window. This is only valid when the difference marks are cleared.
• backs to Command Mode for the file in the active window. This is only valid when the difference marks are cleared.
6.2.3.2 Edit Bar
There are five buttons on the Edit Bar. These buttons are used to edit the file in the active window in-place. Please note that any in-place editing operations can be performed only after clearing the difference mark (refer to section 3.1.5.2).
• undoes the last change.
• reverts the latest undo.
• cuts the selected contents and registers.
• copies the selected contents and registers.
• pastes the latest cut or copied contents to the cursor’s location.
6.2.3.3 Search Bar
There is one text box and two buttons in Search Bar. The search is performed on the file of the active window.
• is an input text box for users to search keywords quickly. After entering the keywords in the box, users just need to click Enter to search. The little cross before the box is used to clear all the inputs from the box.
• goes to the previous match.
• goes to the next match.
6.2.3.4 Diff Bar
There are four buttons in Diff Bar.
• opens the configuring window. (refer to section 6.3).
• clears any difference marks from all windows in the Compare Area in PNDiff. Only when all the difference marks are removed, the files in Compare Area can be edited in-place with the Edit Buttons or the right-click menu.
• refreshes the comparison and updates the difference marks in Compare Area.
• opens the window of the difference list. (refer to section 6.4.2).
6.2.3.5 Review Bar
There are one text box and two buttons in the Review Bar.
• goes to the previous difference result item.
• goes to the next difference result item.
• is an input text box for users to fill the difference item number to Goto. All the difference results are numbered and listed in the Diff List (section 6.4.2).
6.2.3.6 Tool Bar
There are four buttons in Tool Bar.
• opens the window that prints system information (refer to section 3.8.2).
• opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• opens the tool window of the directory information printer (refer to 3.8.4).
6.2.3.7 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens this user manual.
• shows the tool information, like tool name, tool version, etc.
6.2.4 Compare Area
6.2.4.1 Multiple Split Windows
Compare Area in PNDiff is split into multiple embedded PNPreview windows (Figure 6 12), and the files being compared are opened in those windows respectively. The only one of these split windows where the cursor is currently in is called the active window.
Figure 6 12 Compare Area in PNDiff

After comparing, the difference marks are highlighted. These marks can be cleared or updated. More details about how to compare and how to understand the results are in sections 6.3 and 6.4.
6.2.4.2 Right-click Menus in Two Modes
• Edit Mode
The right-click menu in Edit Mode (Figure 6 13) is the same as that described in the section 3.1.5.3.
Figure 6 13 Right-click Menu in Edit Mode in Compare Area

• Diff Mode
The functions supported in the right-click menu in Diff Mode (Figure 6 14) is similar to that described in the section 6.2.2.4.
Figure 6 14 Right-click Menu in Diff Mode in Compare Area

6.2.5 Status Area
Status Area shows the status of the files being compared and the summary of the comparison.
Figure 6 15 Status Area in PNDiff

In the example in Figure 6 15, the items “test_old.tcl” and “test_new.tcl” are the name of the two files being compared. “Total: 35” indicates that there are thirty-five differences between the two files.
6.3 Comparing Two or Multiple Files
PNDiff compares files automatically. Generally, users are not required to concern about the configuration. However, for the users who have advanced requirements on the comparison, PNDiff provides the Diff Setting window (Figure 6 16).
Figure 6 16 Diff Setting window in PNDiff

6.3.1 Setting Diff Mode
In Diff Mode Card on the Diff Setting panel, there are two modes supported, Line Mode and Column Mode. Line Mode is enabled by default, and it cannot be disabled. Column Mode is enabled by default as well, but it can be disabled via the Diff Setting window.
6.3.1.1 Line Mode
With Line Mode enabled, PNDiff compares the lines among the candidate files. There are three exclusive options for Line Mode, Auto, Precise, and Customized (Figure 6 17).
Figure 6 17 Configure Line Mode of PNDiff

• Auto is the default one. Choosing Auto means PNDiff configures Line Mode automatically.
• Precise limits PNDiff to compare the files line by line precisely.
• Customized allows for even more flexible comparing. I-NUM sets the maximum line number that PNDiff looks for a line from the other side if there is no match. B-NUM sets the maximum line number that PNDiff looks for two neighboring lines from the other side if there is no match.
6.3.1.2 Column Mode
With Column Mode enabled, PNDiff compares the columns for each line as well. Column Mode is enabled by default, but users can disable it by not ticking . When Column Mode is disabled, only the identical lines are marked as of no diff.
Similarly, there are three exclusive options for Column Mode, Auto, Precise, and Customized (Figure 6 18).
Figure 6 18 Configure Column Mode of PNDiff

• Auto is the default one. Choosing Auto means PNDiff configures Column Mode automatically.
• Precise limits PNDiff to compare the mapped lines word by word precisely.
• Customized allows for even more flexible comparing. I-NUM sets the maximum word number that PNDiff looks for a word in one line from other files if there is no match.
6.3.2 Setting Diff Range
In some cases, there are needs to only compare part of the lines rather than the entire file. Diff Range provides the approach to set the line range that users want to compare (Figure 6 19).
Figure 6 19 Set Diff Range for PNDiff

• Line All is the default setting. That means the comparison is performed on all the lines of both files.
• Line Sel allows users to set the Start and End line number for PNDiff to compare. The Start line number is valid when it is not larger than the minimum EOF line of candidate files. The End line number is valid when it is not smaller than the Start line number and not larger than the minimum EOF line of candidate files. If invalid ranges are set, PNDiff adjusts them automatically.
Figure 6 20 shows one example of the different result after setting Line Sel. Those lines that are not compared are masked in a different color.
Figure 6 20 One example of Line Sel in Diff Range setting

6.4 Understanding the Compare results
6.4.1 Diff Marks
After comparing, the difference marks are displayed. There are four different types of diff marks, Column Diff, Line Diff, Redundant Diff, and Missing Diff (Figure 6 21). Each of them has unique highlight color (the color varies with Color Style).
There is the fifth mark called Not Care showing the mask on those lines that are not compared due to the range setting (refer to section 6.3.2).
Figure 6 21 Diff Marks in PNDiff

6.4.2 Diff List
The Diff results can be viewed in the Diff List window (Figure 6 22, and refer to section 6.2.3.4 for the way of opening the Diff List window).
It demonstrates the Diff Type and the Diff location in each file compared. Users can use the button Goto to jump to the Diff item selected.
Figure 6 22 Diff List Window

7 PNConsole
PNConsole is a graphical Multi-Language Platform Console, which has four languages preset, including Shell, TCL, Python, and Perl. After selecting the compiler from the preset ones, any commands and scripts in this language can be well supported in the graphical PNConsole.
Besides, any other language compilers which are available in the system can be well supported in PNConsole as well.
This section introduces the ways to launch PNConsole, the interfaces of PNConsole, and the usage of PNConsole.
7.1 Launching PNConsole
PNConsole can be launched from PNFile or system terminals directly.
7.1.1 Launching from PNFile
There are two ways to launch PNConsole from PNFile. The first one is to use the Tool Button “PNConsole” in PNFile (Figure 7 1).
Figure 7 1 Launch PNConsole from PNFile Tool Button

The second one is to click “PNConsole” in the Application Menu of PNFile (Figure 7 2).
Figure 7 2 Launch PNConsole from PNFile Application Menu

7.1.2 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNConsole from system terminals, users only need to fire the command pnconsole.
Example: > pnconsole
To get the help information of the command pnconsole, please use the option “+h” (Figure 7 3).
Figure 7 3 PNConsole help information

7.2 Interfaces of PNConsole
The PNConsole window is shown in Figure 7 4. There are four areas in the PNConsole window, including Title Area, Button Area, Message Area, and Command Area.
Figure 7 4 Main areas in PNConsole window

7.2.1 Title Area
The Title Area shows the current compiler (Figure 7 5).
Figure 7 5 Title Area of PNConsole

7.2.2 Button Area
Button Bar is grouped as shown in Figure 7 6.
Figure 7 6 Button Area of PNConsole

7.2.2.1 Compiler Bar
There is one pull-down list and one button in the Compiler Bar.
• allows users to select or set one compiler (refer to section 7.3.1).
• opens the file-selecting window and loads/executes scripts selected (refer to section 7.3.3).
7.2.2.2 Search Bar
There are one text box and two buttons in Search Bar.
• is an input text box for users to search keywords from the Message Area quickly. After entering the keywords in the box, users just need to click Enter to search. The little cross before the box is used to clear all the inputs from the box.
• goes to the previous match.
• goes to the next match.
7.2.2.3 Goto Bar
There are two buttons and one text box in the Goto Bar.
• goes to the top of the Message Area.
• goes to the bottom of the Message Area.
• is an input text box for users to fill the line number of the Message Area to Goto.
7.2.2.4 Console Bar
There are three buttons in the Console Bar.
• clears all messages from the Message Area.
• sets the color scheme for the Message Area.
• sets the font of the Message Area.
7.2.2.5 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens this user manual.
• shows the tool information, like tool name, tool version, etc.
7.2.3 Message Area
The Message Area demonstrates all the messages and running logs (Figure 7 7). Searching and jumping are supported in Message Area (refer to sections 7.2.2.2 and 7.2.2.3). The color scheme and font can be changed (refer to section 7.2.2.4).
Figure 7 7 Message Area in PNConsole window

7.2.4 Command Area
In the Command Area (Figure 7 8), commands in the language selected can be typed in and executed.
Figure 7 8 Command Area in PNConsole window

Please note that multiple commands should be typed in as one multi-line command separated by Ctrl+Enter and executed at one time. Any command typed in and followed by the Enter key is executed separately. Please refer to section 7.3 for more details.
7.3 Running Commands and Scripts in PNConsole
7.3.1 Selecting Compiler
The pull-down list in Compiler Bar allows users to select or set one compiler (Figure 7 9). There are four preset language compilers, including Shell, TCL, Python, and Perl.
Figure 7 9 Pull-Down List in Compiler Bar

Users can also select “…” from the pull-down list to customize the compiler by setting any compiler available in the system (Figure 7 10).
Figure 7 10 Customize Compiler setting window

7.3.2 Running Commands
Any command typed in and followed by the Enter key is executed separately.
If there are multiple commands which have dependencies, they should be typed in as one multi-line command separated by Ctrl+Enter and executed at one time. For example, with a Python compiler, if users need to run the two commands below, and the second command depends on the result of the first command, they should be executed at one time.
import os
print (os.path.abspath(‘./’)
There are two ways to do so, the one is to type the first command followed by Ctrl+Enter and the second command, and then to press Enter to execute; the other one is to save the commands in a file, and then to source or load the file.
7.3.3 Running Scripts
Running scripts in PNConsole is very simple and efficient. Users can either use the “load script” button (section 7.2.2.1) or source the script files in the Command Area (the specific sourcing command depends on the language selected).

8 PNFinder
PNFinder is an efficient tool to find file and search (and replace) the content. Multiple searching modes and filtering configs make the tool flexible and powerful. It supports both normal plain text and regex text expression searching. It manages to control the searching depth and filter files by multiple criteria like name, owner, access, time, and size. What’s more, reviewing and locating any of the searching results is quite easy in the PNFinder results window.
This section introduces the ways to launch PNFinder, the interfaces, and the usage of PNFinder.
8.1 Launching PNFinder
PNFinder can be launched from PNFile or system terminals directly.
8.1.1 Launching from PNFile
There are two entries to PNFinder from PNFile main window. The one is in Application Menu (Figure 8 1), and the other is in Application Bar (Figure 8 2).
If more than one file or directory is selected in the embedded PNTree of the PNFile window before launching PNFinder, the path of the latest selection is used as the initial home path (i.e., the starting hierarchy of the searching) the new PNFinder window.
If one file or directory is selected in the embedded PNTree of the PNFile window before launching PNFinder, the path of the selection is used as the initial home path (i.e., the starting hierarchy of the searching) of the new PNFinder window.
If no file or directory is selected in the embedded PNTree of the PNFile window before launching PNCompare, the home path of the embedded PNTree is used as the initial home path (i.e., the starting hierarchy of the searching) the new PNFinder window.
Figure 8 1 Launch PNFinder from PNFile Application Menu

Figure 8 2 Launch PNFinder from PNFile Application Bar

8.1.2 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNFinder from system terminals, users just need to fire the command pnfinder followed by one optional directory path. The path followed is the initial home path (i.e., the starting hierarchy of searching) of PNFinder. The current path where the tool is launched is used if no option is followed. When there is more than one path followed, the last one is the starting hierarchy of searching. If the specified path is not available, the current path is used.
Example: > pnfinder
To get the help information of the pnfinder command, please use the option “+h” (Figure 8 3).
Figure 8 3 pnfinder help information

8.2 Interfaces of PNFinder
The PNFinder main window is shown in Figure 8 4. There are seven areas in the window, including Title, Menu, Button, PNTree, PNPreview, Result, and Status Area.
Figure 8 4 Main Window of PNFinder

8.2.1 Title Area
The Title Area (Figure 8 5) shows the full path and the name of the file opened in PNPreview Area.
Figure 8 5 Title Area of PNFinder Main Window

8.2.2 Menu Area
There are six menus (Figure 8 6) in Menu Area, including File, Edit, View, Finder, Tool, and Help Menu.
Figure 8 6 Menu Area of PNFinder Main Window

8.2.2.1 File Menu
The pull-down menu in File Menu is shown in Figure 8 7.
Figure 8 7 File Menu in PNFinder Main Window

• PNTree launches a new PNTree and uses the path of the selected file or directory as its Home Path (refer to section 4.2.2 for multiple PNTrees).
• Tree Home … opens the directory selecting window for users to change the Home Path of the current PNTree (refer to section 4.2.1 for the concept of Home Path).
• PNEdit opens the file selected in the embedded PNTree with a new PNEdit window (refer to section 5 for PNEdit).
• Send To … opens the file selected in the embedded PNTree in a new tab of one existed PNEdit window.
• Save saves the file that is opened and edited in PNPreview (refer to section 3.1.5 for PNPreview) area.
• Save As … saves the file that is opened and edited in PNPreview area, but to another path or with another name.
• Save+Exit saves the file that is opened and edited in PNPreview area and quits PNFinder.
• Exit quits PNFinder.
8.2.2.2 Edit Menu
The pull-down menu in Edit Menu is shown in Figure 8 8. It is associated with the operations in the PNPreview area.
Figure 8 8 Edit Menu in PNFinder Main Window

• Undo undoes the last change.
• Redo reverts the last undoing.
• Cut copies and then deletes the selected contents.
• Copy copies the selected contents.
• Paste pastes the latest cut or copied contents to the cursor’s location.
• Input Mode enters the input mode.
• Preview Mode enters the default preview mode.
• Select selects contents by word, line, and paragraph, or selects all the contents.
8.2.2.3 View Menu
View Menu (Figure 8 9) configures the view settings for PNPreview Area. It is similar to the View Menu in PNEdit Window. Please refer to section 5.2.2.3 for details.
Figure 8 9 View Menu in PNFinder Main Window

8.2.2.4 Finder Menu
The key menu of PNFinder is the Finder Menu (Figure 8 10).
Figure 8 10 Finder Menu in PNFinder Main Window

• Setting opens the finder setting window (refer to section 8.3).
• Clear clears the current finding results.
• Start starts to find.
• Replace All replaces all with specific contents.
• Goto Select jumps to the result item selected (refer to section 8.4).
• Replace Select replaces the result item selected with specific contents.
8.2.2.5 Tool Menu
There are multiple tools listed in Tool Menu (Figure 8 11).
Figure 8 11 Tool Menu in PNFinder Main Window

• System Information opens the window that prints system information (refer to section 3.8.2).
• Encrypt/Decrypt opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• Split/Join splits or joins the files selected in the embedded PNTree area (refer to section 3.8.3).
• Directory Print opens the tool window of the directory information printer (refer to section 3.8.4).
8.2.2.6 Help Menu
The pull-down menu in Help Menu is shown in Figure 8 12.
Figure 8 12 Help Menu in PNFinder Main Window

• User Manual opens this user manual.
• About shows the tool information.
8.2.3 Button Area
Button Bar is grouped as shown in Figure 8 14.
Figure 8 13 Button Area in PNFinder Main Window

8.2.3.1 File Bar
There are six buttons in File Bar.
• launches a new PNTree window and uses the selected path as the home path.
• launches a new PNEdit window and opens the selected files or directories.
• launches a file-selecting window for users to select and open a file in the PNPreview area.
• saves the file that is opened and edited in the PNPreview area (refer to section 3.1.5 for PNPreview).
• enters Input Mode to edit the file in the PNPreview area (refer to section 3.1.5 for PNPreview). To back to the default preview mode, enter Escape (Esc).
• enters Preview Mode.
8.2.3.2 Edit Bar
There are five buttons in Edit Bar. These operations are only available for the files opened in the PNPreview area (refer to section 3.1.5 for PNPreview).
• undoes the last change.
• reverts the latest undo.
• cuts the selected contents and registers.
• copies the selected contents and registers.
• pastes the latest cut or copied contents to the cursor’s location.
8.2.3.3 Search Bar
There are one input text box and two buttons in Search Bar.
• is an input text box for users to search keywords in PNPreview quickly. After entering the keywords in the box, users just need to click Enter to search. The little cross before the box is used to clear all the inputs from the box.
• goes to the previous match.
• goes to the next match.
8.2.3.4 Finder Bar
There are four buttons in Finder Bar (refer to section 8.3 for the detailed usage).
• opens the finder setting window.
• clears the current finding results.
• starts to find.
• replaces all items found with specified contents.
8.2.3.5 Review Bar
There are one input text box and two buttons in Review Bar (refer to section 8.4 for the detailed usage).
• is an input text box for users to fill the number of a specific result item to either review or replace.
• goes to the result item specified.
• replaces the result item specified with the content set in the Finder Setting window.
8.2.3.6 Tool Bar
There are four buttons in Tool Bar.
• opens the window that prints system information (refer to section 3.8.2).
• opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• opens the tool window of the directory information printer (refer to 3.8.4).
8.2.3.7 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens this user manual.
• shows the tool information, like tool name, tool version, etc.
8.2.4 PNTree Area
In this area, one PNTree is embedded. Please refer to section 4 for details about PNTree. The difference is the right-click menu is not available in this PNTree.
8.2.5 PNPreview Area
PNPreview is embedded in this area. Please refer to section 3.1.5 for details about PNPreview.
8.2.6 Result Area
All finding matches with the information like file, line number, and content preview are numbered and listed in this area. Please refer to section 8.4 for details about how to review the PNFinder results.
8.2.7 Status Area
The Status Area is at the bottom of the PNFinder Main Window showing the information and the status of the file opened in the PNPreview Area. Please refer to section 3.1.5.3 for details.
8.3 Setting PNFinder
To find any files or contents in files with PNFinder, the first step is to set it according to users’ requirements.
Figure 8 14 is the Finder Setting window which can be opened from either Finder Menu (section 8.2.2.4) or Finder Bar (section 8.2.3.4).
Figure 8 14 Finder Setting Window of PNFinder

8.3.1 Text Expression Card
Text Expression Card configures the searching on the text content of each candidate file.
Similar to the Expression Card in PNEdit, there are two searching & replacing modes supported, Normal and Regex. Please refer to section 5.3.1 for details.
8.3.2 File Filter Card
File Filter Card sets the conditions, including name, owner, access type, time last updated and size, to filter candidate files. Any condition works only when it is ticked (i.e., selected).
Only the files that meets all conditions selected are to be looked for.
• Name, file name. The wildcard is supported in the keyword box to match any characters.
• Owner, the username of the file owner.
• Access, the access type of the file of current users, such as “r”, “w”, “x”, or “rw”, etc.
• Time, the range of time when the file was updated last time. The format is yyyy-mm-dd.
• Size, the range of file size, in the unit of Byte.
8.3.3 Scope Select Card
Scope Select Card sets the searching depth.
• sets the home path (i.e., the starting hierarchy of the searching). The default starting path can be overridden here.
• Level All means to search all subhierarchies from the starting hierarchy.
• Level 1 means to only search one level from the starting hierarchy.
• Level 1-? means to search one to N level from the starting hierarchy. The number N is set in the following text box.
• Level ? means to only search the N level counting from the starting hierarchy. The number N is set in the following text box.
8.3.4 Buttons
There are four buttons at bottom of the Finder Setting panel.
• starts to search with PNFinder.
• replaces the matches in the selected candidate file with the content or expression typed in the Replace box. Please use this button with caution since this action is not reversible.
• clears all the settings. It also clears the current PNFinder results.
• closes the Finder Setting window.
8.4 Reviewing PNFinder Results
8.4.1 Finding Results
The finding results are listed in the Result Area. Each match with certain information, including file, line number, and content preview, is numbered and listed.
Figure 8 15 shows an example of PNFinder settings and its result.

Figure 8 15 PNFinder Example Result

The right-click menu is provided in the Result Area to support more operations (Figure 8 16).
• Goto Select goes to the selected match.
• Replace Select replaces the selected match with the contents specified in the Finder Setting Window.
• Full Path shows the full path of the files listed.
• Remove Full Path shows the file name only with no path (default).
Figure 8 16 Right-Click menu in the result list area

When the finding results are available, users can either Goto any of them or Replace one, multiple, or all the matches with specified texts or expressions.
8.4.2 Operation Goto
By double-clicking on any match listed in Results Area, users can “Goto” that match, i.e., the associated file is highlighted in the PNTree Area and opened in the PNPreview Area, and the cursor goes to the specific line automatically (Figure 8 17).
There are three other entries to the operation Goto. The first one is in the right-click menu (Figure 8 16). The second one is the button in the Review Bar (section 8.2.3.5). The last one is the “Goto Select” in Finder Menu (section 8.2.2.4).
Figure 8 17 Goto one of the finding results

8.4.3 Operation Replace
As described in section 8.3.1, both Normal and Regex modes are supported for Search & Replace in PNFinder. With the text or expression specified in the Text Expression Card in the Finder Setting Window, users can replace any or all the matches. Please use this with caution as it is not reversible.
• Replace All

It replaces all the matches at once. There are three entries to this function. The first one is the button “Replace” in the Finder Setting Window (section 8.3.4). The second one is the button in the Finder Bar (section 8.2.3.4). The last one is “Replace All” in the Finder Menu (section 8.2.2.4).

• Replace Selected

It replaces one or multiple matches which are selected only. There are three ways to Replace Selected. The first one is to select one or multiple matches in the Result Area and use the right-click menu (Figure 8 16). The second one is to type the number of the target match in the text box of the Review Bar and use the button (section 8.2.3.5). The last one is to select one or multiple matches in the Result Area and use the “Replace Select” of the Finder Menu (section 8.2.2.4)

9 PNCompare
PNCompare is an efficient and practical file & directory comparing tool that aims to compare two directories and/or files inside. It supports to compare by multiple criteria, such as owner, access, time, size, and content. It also supports comparing depth control and multiple comparing modes like File-Folder, File-Only, and Folder-Only. After comparing, PNCompare manages to review the results and to resolve the differences easily.
This section introduces the ways to launch PNCompare, the interfaces of PNCompare, and the usage of PNCompare.
9.1 Launching PNCompare
PNCompare can be launched from PNFile or system terminals directly.
9.1.1 Launching from PNFile
There are two entries to PNCompare from PNFile main window. The one is in Application Menu (Figure 9 1), and the other is in the Application Bar (Figure 9 2).
If two or more files or directories are selected in the embedded PNTree of PNFile window before launching PNCompare, the paths of the latest two selections are used as the initial home paths for the Left and Right side PNTrees in the Compare Area (Figure 9 4 and section 9.2.4) of the new PNCompare window.
If one file or directory is selected in the embedded PNTree of PNFile window before launching PNCompare, the path of the selection is used as the initial home path for both the Left and Right side PNTrees in the Compare Area (Figure 9 4 and section 9.2.4) of the new PNCompare window.
If no file or directory is selected in the embedded PNTree of PNFile window before launching PNCompare, the home path of the embedded PNTree is used as the initial home path for both the Left and Right side PNTrees in the Compare Area (Figure 9 4 and section 9.2.4) of the new PNCompare window.
Figure 9 1 Launch PNCompare from PNFile Application Menu

Figure 9 2 Launch PNCompare from PNFile Application Bar

9.1.2 Launching from terminals as an independent tool
Assuming the PNFile Toolkit is installed and configured properly, to launch the PNCompare from system terminals, users just need to fire the command pncompare followed by optional directory paths.
The only valid path followed is used as the initial home path for both the Left and Right side PNTrees in the Compare Area (Figure 9 4 and section 9.2.4) of the new PNCompare window. The current path where the tool is launched is used if no option is followed.
When there is more than one path followed, the last two are used as the initial home paths for the Left and Right side PNTrees in the Compare Area (Figure 9 4 and section 9.2.4) of the new PNCompare window. If the specified path is not available, the current path is used.
Example: > pncompare
To get the help information of the pncompare command, please use the option “+h” (Figure 9 3).
Figure 9 3 pncompare help information

9.2 Interfaces of PNCompare
The PNCompare main window is shown in Figure 9 4. There are six areas in the window, including Title, Menu, Button, Compare, Result, and Status Area.
Figure 9 4 Main Window of PNCompare

9.2.1 Title Area
The Title Area (Figure 9 5) shows the work path of PNCompare.
Figure 9 5 Title Area of PNCompare Main Window

9.2.2 Menu Area
There are five menus (Figure 9 6) in Menu Area, including File, Directory, Compare, Tool, and Help Menu.
Figure 9 6 Menu Area of PNCompare Main Window

9.2.2.1 File Menu
The pull-down menu in File Menu is shown in Figure 9 7.
Figure 9 7 File Menu in PNCompare Main Window

• Left Tree Home… sets the home path for the left PNTree.
• Right Tree Home… sets the home path for the right PNTree.
• PNTree launches a new independent PNTree window using the selected path as the home path.
• PNDiff launches PNDiff to compare the files selected (refer to section 6.1.1).
• PNEdit launches a new PNEdit window and opens the selected files or directories.
• Send To… opens the file selected in a new tab of one existed PNEdit window.
• Exit quits PNCompare.
9.2.2.2 Directory Menu
The pull-down menu in Directory Menu is shown in Figure 9 8. This is the same as that in section 3.1.2.2 but only valid when the comparing results are cleared.
Figure 9 8 Directory Menu in PNCompare Main Window

9.2.2.3 Compare Menu
The pull-down menu in Compare Menu is shown in Figure 9 9.
Figure 9 9 Compare Menu in PNCompare Main Window

• Setting opens the Compare Setting Window (refer to section 9.3).
• Clear clears all the comparing results.
• Start starts to compare based on the settings.
• L2R All resolves all the comparing differences by trying to make the left side the same as the right side (refer to section 9.5.1 for operation L2R). This menu is effective only when the comparing result is available.
• R2L All resolves all the comparing differences by trying to make the right side the same as the left side (refer to section 9.5.2 for operation R2L). This menu is effective only when the comparing result is available.
• Goto Select highlights the result selected in Results Area on both sides of the tree in Compare Area (refer to section 9.4.2 for operation Goto).
• L2R Select resolves the difference selected in Results Area by trying to make the left one the same as the right one (refer to section 9.5.1 for operation L2R).
• R2L Select resolves the difference selected in Results Area by trying to make the right one the same as the left one (refer to section 9.5.2 for operation R2L).
9.2.2.4 Tool Menu
The pull-down menu in Tool Menu is shown in Figure 9 10. This is the same as that in section 3.1.2.6.
Figure 9 10 Tool Menu in PNCompare Main Window

9.2.2.5 Help Menu
The pull-down menu in Help Menu is shown in Figure 9 11.
Figure 9 11 Help Menu in PNCompare Main Window

• User Manual opens this user manual.
• About shows the tool information.
9.2.3 Button Area
Button Bar is grouped as shown in Figure 9 12.
Figure 9 12 Button Area in PNCompare Main Window

9.2.3.1 File Bar
There are five buttons in File Bar.
• sets the home path for the left PNTree.
• sets the home path for the right PNTree.
• launches a new independent PNTree window using the selected path as the home path.
• launches PNDiff to compare the files selected (refer to section 6.1.1).
• launches a new PNEdit window and opens the selected files or directories.
9.2.3.2 Compare Bar
There are five buttons in Compare Bar.
• opens the Compare Setting Window (refer to section 9.3).
• clears all the comparing results.
• starts to compare based on the settings.
• L2R All. It resolves all the comparing differences by trying to make the left side the same as the right side (refer to section 9.5 for details). This menu is effective only when the comparing result is available.
• R2L All. It resolves all the comparing differences by trying to make the right side the same as the left side (refer to section 9.5 for details). This menu is effective only when the comparing result is available.
9.2.3.3 Review Bar
There are one input text box and five buttons in Review Bar.
• highlights the previous result on both sides of the tree in Compare Area.
• highlights the next result on both sides of the tree in Compare Area.
• is a text box for user to fill the number of specific result in to highlight.
• highlights the result specified in the text box on both sides of the tree in Compare Area (refer to section 9.4.2 for operation Goto).
• resolves the difference specified in the text box by trying to make the left one the same as the right one (refer to section 9.5.1 for operation L2R).
• resolves the difference specified in the text box by trying to make the right one the same as the left one (refer to section 9.5.2 for operation R2L).
9.2.3.4 Tool Bar
There are four buttons in Tool Bar.
• opens the window that prints system information (refer to section 3.8.2).
• opens the tool window of Encrypt and Decrypt (refer to section 3.8.1).
• splits or joins the files selected in the embedded PNTree (refer to section 3.8.3).
• opens the tool window of the directory information printer (refer to 3.8.4).
9.2.3.5 Help Bar
There is one button in the Help Bar. The tool information is also displayed on the right side of the bar.
• opens this user manual.
• shows the tool information, like tool name, tool version, etc.
9.2.4 Compare Area
Compare Area consists of two PNTrees which are placed side by side. The left and right PNTree show the two candidates of the comparison whose home path can be changed.
There are three ways to change the home path of either side of the PNTrees. The first way is to use the “Left Tree Home” and “Right Tree Home” in File Menu (section 9.2.2.1), the second way is to use the button and in File Bar (section 9.2.3.1), and the last one is to set them in the “Compare Setting Window” (section 9.3).
Compare Area also highlights the results after comparing (section 9.4) and shows the real-time updates after resolving the difference (section 9.5). Please note that both sides in this area support full features of PNTree (section 4) only when the result highlights are cleared.
9.2.5 Result Area
The comparing results with information like difference types and associated files in both sides of directories are numbered and listed in the Result Area. Please refer to section 9.4 for details.
9.2.6 Status Area
Status Area shows the information and status of the file selected from either side of the PNTree.
9.3 Setting PNCompare
To compare two sides of the candidates with PNCompare, the first step is to set it according to users’ requirements.
Figure 9 13 is the Compare Setting window which can be opened from either Compare Menu (section 9.2.2.3) or Compare Bar (section 9.2.3.2).
Figure 9 13 Compare Setting Window of PNCompare

9.3.1 Home Select Card
Two set the home paths of the left and right PNTree respectively. The home paths are also the starting hierarchies of comparing.
9.3.2 Scope Select Card
Scope Select Card sets the comparing depth.
• Level All means to compare all subhierarchies from the starting hierarchy (home path).
• Level 1 means to only compare one level from the starting hierarchy.
• Level 1-? means to compare one to N level from the starting hierarchy. The number N is set in the following text box.
• Level ? means to only compare the N level counting from the starting hierarchy. The number N is set in the following text box.
9.3.3 Compare Condition Card
Compare Condition Card sets the criteria (Figure 9 14) and types (Figure 9 15) of comparing.
Figure 9 14 Multiple Criteria Prioritized from Left to Right

• Owner, if ticked, PNCompare compares the username of the owner of the files or/and folders.
• Access, if ticked, PNCompare compares the access type of the files or/and folders. The access type includes “r”, “w”, “x”, and “rw”, etc.
• Time, if ticked, PNCompare compares the time when the files or/and folders was updated last time.
• Size, if ticked, PNCompare compares the size of the files or/and folders.
• Content, if ticked, PNCompare compares the content of the files.
One or multiple criteria listed above can be selected for comparison. Multiple criteria are prioritized from left to right, and the comparison on one file or folder will stop once one criterion is matched.
Besides, users can control the comparing type as below.
Figure 9 15 Comparing Types

• File-Folder, if selected, PNCompare compares both file and folder (default).
• File Only, if selected, PNCompare compares file only.
• Folder Only, if selected, PNCompare compares folder only.
9.3.4 Buttons
After setting, the buttons at the bottom of the Compare Setting Window are used to start comparing and resolve the differences. The entries to these functions are also available in Compare Menu (section 9.2.2.3) and Compare Bar (section 9.2.3.2)
• starts to compare based on the configurations.
• resolves all the comparing differences by trying to make the left side the same as the right side (refer to section 9.5 for details). This button is effective only when the comparing result is available.
• resolves all the comparing differences by trying to make the right side the same as the left side (refer to section 9.5 for details). This button is effective only when the comparing result is available.
• clears all the comparing results.
• dismisses the window.
9.4 Reviewing PNCompare Results
9.4.1 Comparing Results
After comparing, the results are listed in the Result Area and highlighted in the Compare Area (Figure 9 16).
Figure 9 16 PNCompare Example Result

There are seven types of comparing differences.
• Left, the file or folder only exists on the left-side tree.
• Right, the file or folder only exists on the right-side tree.
• Owner, the owner of the file or folder on the two sides are different from each other.
• Access, the access type of the file or folder on the two sides are different from each other.
• Time, the latest update time of the file or folder on the two sides are different from each other.
• Size, the size of the file or folder on the two sides are different from each other.
• Content, the content of the file on the two sides are different from each other.
The results listed in the Result Area can be filtered with the drop-down button (Figure 9 17) on the bottom left of the Result Area. The results are also paged as shown in Figure 9 18, and one hundred items can be listed on one single page.
Figure 9 17 Type Filter on PNCompare Result

Figure 9 18 Page of PNCompare Result

The right-click menu is also supported in the Result Area (Figure 9 19).
Figure 9 19 Right-click Menu in Result list

• Goto Select highlights the selected item on both sides of the tree in Compare Area.
• L2R Select resolves the difference selected by trying to make the left one the same as the right one (refer to section 9.5 for details).
• R2L Select resolves the difference selected by trying to make the right one the same as the left one (refer to section 9.5 for details).
• Full Path displays the file and folder with full path in the Result Area (default).
• Remove Full Path displays the name of the file and folder only.
9.4.2 Operation Goto
By double-clicking on any item in the Result Area, users can “Goto” it, i.e., the associated files or folders of both sides are highlighted in dark blue on the two PNTrees simultaneously (Figure 9 20).
There are three other entries to the operation Goto. The first one is in the right-click menu (Figure 9 19). The second one is the button in Review Bar (section 9.2.3.3). The last one is the “Goto Select” in Compare Menu (section 9.2.2.3).
Figure 9 20 Example: Goto the fourth comparing result

9.5 Resolving Comparing Differences
When the comparing results are available, users can review them in Results Area (section 9.4) and resolve the differences by either merging the left to the right or otherwise. Please always use the resolving function with caution since this is not reversible.
There are two opposite ways of resolving, L2R and R2L.
9.5.1 Operation L2R
L2R is to consider the right side the baseline and try to eliminate the difference from the left side. The approaches to resolving the differences in the L2R way depend on the result type.
a. Left: A file or folder exists on the left side but not on the right side.
To resolve the difference, PNCompare tries to copy the file or folder from the right side.

b. Right: A file or folder exists on the right side but not on the left side.
To resolve the difference, PNCompare tries to remove the file or folder from the left side.

c. Other types: There are differences in Owner, Access, Time, Size, or Content between files or folders on the left and right side.
To resolve the difference, PNCompare tries to copy the file or folder from the right side and override the one on the left side.
It is supported to resolve all the differences at once. There are three entries to this function. The first one is the button “L2R” in Compare Setting Window (section 9.3.4). The second one is the button in Compare Bar (section 9.2.3.2). The last one is the “L2R All” in Compare Menu (section 9.2.2.3).
It is also supported to resolve one or multiple selected differences only. There are three ways to do so. The first one is to select one or multiple difference in the Results Area and use the right-click menu (Figure 9 19). The second one is to type the number of the target difference in the text box of Review Bar and use the button (section 9.2.3.3). The last one is to select one or multiple difference in the Results Area and use the “L2R select” of Compare Menu (section 9.2.2.3).
After resolving, both sides of PNTrees will be fully updated only when all the highlights in Compare Area are cleared.
9.5.2 Operation R2L
On the contrary, R2L is to consider the left side the baseline and try to eliminate the difference from the right side. The approaches to resolving differences in the R2L way are similar to that in the L2R way (section 9.5.1).

Appendix A: Commands in PNEdit

================== 1. Select Commands ==================

Select contents.

ggVG Select all.

Select word. when click on []()<>{}, select contents inside matched pairs. Alphabetic and numeric characters joined by underlines are considered as one word and can be selected by double-clicking mouse left button. Continuously duplicated non-alphabetic and non-whitespace characters will be selected too. Continuously duplicated whitespace characters will be selected as well. Select one line.

===========================================================================
================== 2. Input Commands ==================

By entering input commands, you can switch into input mode. Once in input
mode, any character you type is taken to be text and is added to the file.
To exit input mode, press the Escape (Esc) key. Insert/replace via these
commands can be undone. When ‘autoindent’ is on, the indent of current line
will be copied and applied to the new line automatically.

a Append text after the cursor.

A Append text at the end of the line.

i Insert text before the cursor.

I Insert text before the first non-blank in the line.

o Begin a new line below the cursor and insert text.

O Begin a new line above the cursor and insert text.

===========================================================================
================== 3. Change Commands ==================

Make changes. Insert/replace via these commands can be undone. When
‘autoindent’ is on, the indent of current line will be copied and applied
to the new line automatically.

s Delete char and insert.

S Same as command ‘cc’. If ‘autoindent’ is on, preserve
the indent.

r Replace one character. Keep in command mode after
replacing.

R Enter replace mode. [Esc] to get back to command mode.

cw Change (replace) to the end of the word.

ciw Change (replace) entire word.

cc Change (replace) entire line. If ‘autoindent’ is on,
preserve the indent.

c$ Change (replace) to the end of the line

C Change (replace) to the end of the line. (same as c$)

h Used in input mode, back one character.

w Used in input mode, back one word.

u Used in input mode, back to the beginning of non-blank
character.

[count] J Join [count] lines below to the current one with one
space in between. with no [count] set, a minimum of two
lines will be joined. Remove the indent and insert one
space when joining

[count] gJ Similar to [count] J, but don’t insert any spaces or
remove any indent.

u Undo the last edit.

r Redo changes which were undone.

:changeb[uffer] Open the change buffer window (GUI).

:change
Go to a change listed in the change buffer.

Paste from buffer *(clipboard). This does not change the command/input mode.

===========================================================================
================== 4. Cut, copy and paste ==================

Delete/Cut and paste. Can be undone.

x Delete (Cut) a character to general buffer.

nx Delete (Cut) n characters to general buffer.

X Back (Cut) a character to general buffer.

nX Back (Cut) n characters to general buffer.

dd Delete (Cut) a whole line to general buffer.

ndd Delete (Cut) n lines to general buffer.

dw Delete (Cut) word (counting from cursor) to general
buffer.

dnw Delete (Cut) n words (counting from cursor) to general
buffer.

d) Delete (Cut) to the end of sentence.

db Delete (Cut) previous word to general buffer.

dnb Delete (Cut) previous n words to general buffer.

D Delete (Cut) to the end of the line to general buffer.

d$ Delete (Cut) to the end of the line to general buffer.

"*ndd Delete (cut) n lines to buffer *. Buffer * is the
special buffer for storing the selection.

"[a-z]ndd Delete (cut) n lines to buffer [a-z].

"[A-Z]ndd Delete (cut) n lines and append to buffer [a-z].

y Yank (copy) the selected chars to general buffer.

yy Yank (copy) a line to general buffer.

Y Yank (copy) a line to general buffer.

nyy Yank (copy) n lines to general buffer.

nY Yank (copy) n lines to general buffer.

yw Yank (copy) a word to general buffer.

ynw Yank (copy) n words to general buffer.

"*nyy Yank (copy) n lines to buffer *. Buffer * is the
special buffer for storing the selection.

"[a-z]nyy Yank (copy) n lines to buffer [a-z].

"[A-Z]nyy Yank (copy) n lines and append to buffer [a-z].

"[a-z]nY Yank (copy) n lines to buffer [a-z].

"[A-Z]nY Yank (copy) n lines and append to buffer [a-z].

"*nY Yank (copy) n lines to buffer *. Buffer * is the
special buffer for storing the selection.

p Put (paste) general buffer after cursor.

"*p Put (paste) text from buffer * after cursor. Buffer *
is the special buffer for storing the selection.

"[a-z]p Put (paste) text from buffer [a-z] after cursor.

P Put (paste) general buffer before cursor.

"*P Put (paste) text from buffer * before cursor. Buffer *
is the special buffer for storing the selection.

"[a-z]P Put (paste) text from buffer [a-z] before cursor.

np Put (paste) general buffer after cursor by n times.

"*np Put (paste) text from buffer * after cursor by n times.
Buffer * is the special buffer for storing the
selection.

"[a-z]np Put (paste) text from buffer [a-z] after cursor by n
times.

nP Put (paste) general buffer before cursor by n times.

"*nP Put (paste) text from buffer * before cursor by n
times. Buffer * is the special buffer for storing the
selection.

"[a-z]nP Put (paste) text from buffer [a-z] before cursor by n
times.

:stringb[uffer] Open the string buffer window (GUI) to display the
contents of all string buffers, clipboard included.

===========================================================================
================== 5. Set parameters ==================

Set parameter like to enable/disable displaying line number, invisible
characters, etc.

:se[t] number Display a line number in front of every line.

:se[t] nonumber Switch off ‘:set number’, not display line number any
more.

:se[t] list Show invisible characters.

:se[t] nolist Not show invisible characters.

:se[t] autoindent Automatically copy indent from current line when
starting a new line.

:se[t] noautoindent
Turn off auto indent

:se[t] wrap Lines longer than the width of the window will wrap and
displaying continues on the next line.

:se[t] nowrap Lines will not wrap and only part of long lines will be
displayed.

===========================================================================
================== 6. File operations ==================

The commands that operate current file or multiple files. The relative path
to the search paths is supported.

:se[t] path=[,,…]
Set search path list. Search path is a list of
directories which will be searched when using relative
paths in the file related commands. Multiple paths
should be separated by comma, the order of the paths in
the list determines the search priority. Default search
path is the home path of the pnfile tree. The reference
to the current path is $path.

:se[t] path+=[,,…]
Append paths to the search path list.

:se[t] path-=[,,…]
Remove paths from the search path list.

:path[list] List the search paths.

:homepath Print the home path of the pnfile tree.

:r[ead] [file] Insert the [file] (default: current file) below the
cursor. can be undone.

gf Find the file name the cursor is on and edit it, or
find the directory the cursor is on and browse it. This
command fails if the Editor refuses to abandon the
current file.

wgf Similar to gf, but open in a new tab.

6 Quickly jump back and forth between the latest opened
two files.

:E[xplore] [directory]
Find the directory and browse it, :E with no argument
opens the directory where the current file locates.
this fails if the current file is edited but not saved.

:E[xplore]! [directory]
Same as :E[xplore] [directory], but discard any
changes.

:e[dit] [file/directory]
Find the file and edit it, or find the directory and
browse it. this fails if the current file is edited but
not saved.

:e[dit]! [file/directory]
Same as :e[dit] [file/directory], but discard any
changes.

:ene[w] Edit a new, unnamed buffer. This fails when changes
have been made to the current buffer but not saved.

:ene[w]! Edit a new, unnamed buffer. Discard any changes to the
current buffer.

:tabnew [file] Open [file] in new tab. When with no argument, open a
new blank tab.

:sp[lit] [file] Split current window in two. open (default current
file) file in the split window.

ws Split current window in two.

:vs[plit] [file] Like ‘:split’, but split vertically.

wv Vertically split current window in two.

:sav[eas] Save the file under a new name.

:q[uit] Quit the current window. This fails when changes have
been made but not saved.

:q[uit]! Discard any changes and quit.

:w[rite] [file] Save the file in-place, or under a new name. Writing
fails when the file is read-only or when the specified
[file] exists.

:w[rite]! [file] Save the file in-place, or under a new name.

:wq [file] Save the file in-place, or under a new name, and then
exit. Writing fails when the file is read-only. Exiting
fails when changes have been made but not saved.

:wq! [file] Save the file in-place, or under a new name, and then
quit.

:qa[ll] Quit all tabs. This fails when changes have been made
but not saved.

:qa[ll]! Discard any changes and quit all tabs.

:wqa[ll] Write (save) and quit on all tabs. Writing fails when
the file is read-only. Exiting fails when changes have
been made but not saved.

:wqa[ll]! Write (save) and quit on all tabs.

:wa[ll] Write (save) on all tabs. Writing fails when the file
is read-only.

:wa[ll]! Write (save) on all tabs.

ZZ Same as ‘:wq’

ZQ Same as ‘:q!’

:f[ile] Display current file information.

g Display current file information.

gg Display current cursor information.

:fileb[uffer] Open the file buffer window (GUI)

:h[elp] Finding the help documents.

===========================================================================
================== 7. motion and scrolling ==================

The commands that move the cursor or scroll the window.

H Move to upper left corner of current screen.

M Move to middle left of current screen.

L Move to last left of current screen.

w Move forward one word

b Move backward to the start of the previous one word

e Move to the next end of one word.

ge Move to the previous end of one word.

k Move one line up.

j Move one line down.

h Move one char left.

l Move one char right.

gg Go to the start of a file.

G Positions you at the end of the file.

nG Go to the start of the line n.

:[lineno] Go to the start of line [lineno].

$ Move to the end of a line.

Does the same thing as ‘$’ command.

^ Move to the first non-blank character of the line.

0 Move to the very first character of the line.

Move to the very first character of the line.

% Go to the nesxt matched [], {}, <>, ()

f[char] Move to the next [char] of current line. If the cursor
is on the [char], will not move.

; Repeat the last ‘f[char]’, but move forward if the
cursor is on the current [char].

u Scroll down half a screen of text.

d Move the viewing window down half a screen in the file,
thus scrolls the text up half a screen.

f Scroll forward by a whole screen.

b Scroll backward by a whole screen.

l Redraw current screen.

z Make the current line the top of the window and move
the cursor to the first non-blank charactor.

z. Make the current line the middle of the window and move
the cursor to the first non-blank charactor.

z- Make the current line the bottom of the window and move
the cursor to the first non-blank charactor.

/{pattern}[/flags]
Search forward and move to next occurrence of
{pattern}, flags can be combination of ‘i’, ‘m’, ‘s’,
‘r’. ‘i’:(ignore case), ‘m’:(multi-line), ‘s’:(dot
matches all), ‘r’:(raw data matching)

?{pattern}[?flags]
Search backward and move to next occurrence of
{pattern}, flags can be combination of ‘i’, ‘m’, ‘s’,
‘r’. ‘i’:(ignore case), ‘m’:(multi-line), ‘s’:(dot
matches all), ‘r’:(raw data matching)


Search forward and move to next occurrence of the word
where the cursor is on

Search backward and move to next occurrence of the word

                where the cursor is on
  •               Search forward and move to next occurrence of the word 
                  where the cursor is on
    

n Repeat the last search

N Repeat the last search reversely

===========================================================================
================== 8. Replace using regex ==================

Search and replace the whole file or part of the file. [range] here can be

  1. . : current line; 2) n : line n; 3) .+n : current line plus n lines; 4)
    $ : last line; 5) m,n : from line m to line n; 5)’<,’> : selected text, In
    column mode, the search&replace will be applied on the selected columns
    only. No [range] works the sam as ‘.’.

:%s/[regex_old]/[regex_new]/[flags]
Replace old with new throughout file. flags can be
combination of ‘i’, ‘m’, ‘s’, ‘r’. ‘i’:(ignore case),
‘m’:(multi-line), ‘s’:(dot matches all), ‘r’:(raw data
matching).

:[range]s/[regex_old]/[regex_new]/[flags]
Replace old with new in line [range]. flags can be
combination of ‘i’, ‘m’, ‘s’, ‘r’. ‘i’:(ignore case),
‘m’:(multi-line), ‘s’:(dot matches all), ‘r’:(raw data
matching).

===========================================================================
================== 9. column mode ==================

In column mode, the operations are performed vertically. The change
commands can be undone.

v Start column mode.

k In column mode, move one line up to select block.

j In column mode, move one line down to select block.

h In column mode, move one char left to select block.

l In column mode, move one char right to select block.

I In column mode, insert characters.

s In column mode, cut to general buffer and insert.

d In column mode, delete (cut) to the general buffer.

x In column mode, delete (cut) to the general buffer.

y In column mode, yank (copy) to the general buffer.

p In column mode, put general buffer after cursor.

P In column mode, put general buffer before cursor.

np In column mode, put general buffer after cursor by n
times.

nP In column mode, put general buffer before cursor by n
times.

J In column mode, join all involved lines together.
Remove the indent and insert one space when joining.

gJ In column mode, similar to J, but don’t insert any
spaces or remove any indent.
Appendix B: Config File .pnrc

================== config file .pnrc ==================

The tool reads config file .pnrc when starts. The priority of .pnrc in
multiple places is: ‘./.pnrc’ > ‘HOME/.pnrc′>′HOME/.pnrc' > 'HOME/.pnrc>TOOLPATH/.pnrc’. The
following command lines are supported in .pnrc. All of them can be
re-configure in GUI. The pond sign, #, is used as line comment and it is
case-ignored in .pnrc.

set syntax <on|off>
Default is on to enable tool to highlight/colorize text
in auto-detected language. The language detecting is
based on file’s extension. The tool supports limited
but most popular languages.

set window <default|x>
Set the size for the tool windows. The default is auto
calculated on screen size.

set number <on|off>
Same as command ‘:set number’ (on), ‘:set nonumber’
(off). default is on.

set list <on|off> Same as command ‘:set list’ (on), ‘:set nolist’ (off).
default is off.

set wrap <on|off> Same as command ‘:set wrap’ (on), ‘:set nowrap’ (off).
default is on.

set autoindent <on|off>
Same as command ‘:set autoindent’ (on), ‘:set
noautoindent’ (off). default is on.

set colorstyle
Set color mode. there are multiple preset modes to
choose from, such as default, desert, evening, ect…

set fontstyle
Set font modes, like Normal, Bold, Italic, Small,
Medium or Large. default is Medium.

set font_family
Set the font of charactors. default is Monospace.

set font_size
Set the size of charactors. default is 10.

set font_weight <normal|bold>
Set normal or bold for charactors.

set font_slant <roman|italic>
Set Roman or Italic for charactors.

set cursorline <on|off>
Highlight the text line of the cursor with CursorLine,
useful to easily spot the cursor. default is off.

set cursorline_bgcolor <default|color name|color code>
Set background color of cursor line when cursor line is
set to on. The color can be name or code in HEX. If the
color name or code is not set correctly, default one in
the set colormode will be applied.

set cursorline_fgcolor <default|color name|color code>
Set foreground color of cursor line when cursor line is
set to on. The color can be name or code in HEX. If the
color name or code is not set correctly, default one in
the set colormode will be applied.

set cursorcolumn <on|off>
Highlight the screen column of the cursor with
CursorColumn, useful to align text. default is off.

set cursorcolumn_bgcolor <default|color name|color code>
Set background color of cursor column when cursor
column is set to on. The color can be name or code in
HEX. If the color name or code is not set correctly,
default one in the set colormode will be applied.

set cursorcolumn_fgcolor <default|color name|color code>
Set foreground color of cursor column when cursor
column is set to on. The color can be name or code in
HEX. If the color name or code is not set correctly,
default one in the set colormode will be applied.

set cursorflicker <on|off>
Make the flicker visable. default is on.

set cursorflicker_bgcolor <default|color name|color code>
Set background color of flicker when flicker is set to
on. The color can be name or code in HEX. If the color
name or code is not set correctly, default one in the
set colormode will be applied.

set cursorflicker_fgcolor <default|color name|color code>
Set foreground color of flicker when flicker is set to
on. The color can be name or code in HEX. If the color
name or code is not set correctly, default one in the
set colormode will be applied.

set select_bgcolor <default|color name|color code>
Set background color of selection. The color can be
name or code in HEX. If the color name or code is not
set correctly, default one in the set colormode will be
applied.

set select_fgcolor <default|color name|color code>
Set foreground color of selection. The color can be
name or code in HEX. If the color name or code is not
set correctly, default one in the set colormode will be
applied.

set insert_color <default|color name|color code>
Set color of insertion. The color can be name or code
in HEX. If the color name or code is not set correctly,
default one in the set colormode will be applied.

set insert_width <default|width number>
Set the insert cursor width, default is 3.

set edit_bgcolor <default|color name|color code>
Set background color of edit. The color can be name or
code in HEX. If the color name or code is not set
correctly, default one in the set colormode will be
applied.

set edit_fgcolor <default|color name|color code>
Set foreground color of edit. The color can be name or
code in HEX. If the color name or code is not set
correctly, default one in the set colormode will be
applied.

set search_bgcolor <default|color name|color code>
Set background color of match when searching. The color
can be name or code in HEX. If the color name or code
is not set correctly, default one in the set colormode
will be applied.

set search_fgcolor <default|color name|color code>
Set foreground color of match when searching. The color
can be name or code in HEX. If the color name or code
is not set correctly, default one in the set colormode
will be applied.

set list_bgcolor <default|color name|color code>
Set background color of list. The color can be name or
code in HEX. If the color name or code is not set
correctly, default one in the set colormode will be
applied.

set list_fgcolor <default|color name|color code>
Set foreground color of list. The color can be name or
code in HEX. If the color name or code is not set
correctly, default one in the set colormode will be
applied.

set tag_bgcolor <default|color name|color code>
Set background color of tag. The color
can be name or code in HEX. If the color name or code
is not set correctly, default one in the set colormode
will be applied.

set tag_fgcolor <default|color name|color code>
Set foreground color of tag. The color
can be name or code in HEX. If the color name or code
is not set correctly, default one in the set colormode
will be applied.

set title
Add the preset title for all created new files.

set path [,,…]
Set search path list, reference to the current path is
$path

Appendix C: Error/Warning Message

===================== 1. PNFile =======================

FILEEX
Short Message : File exists (add ! to override)
Severity : Error
Description : You are protected from accidentally overwriting a file. When
you want to write anyway, use the same command, but add a “!”
right after the command.
Example:
:w /home/test.txt
changes to:
:w! /home/test.txt

NOWRIT
Short Message : No write since last change (add ! to override)
Severity : Error
Description : You are trying to |abandon| a file that has changes. PNEdit
protects you from losing your work. You can either write the
changed file with “:w”, or, if you are sure, |abandon| it anyway,
and lose all the changes. This can be done by adding a ‘!’ character
right after the command you use.
Example:
:e /home/test.txt
changes to:
:e! /home/test.txt

READOY
Short Message : File access is ‘read-only’ (add ! to override)
Severity : Error
Description : You are trying to write a file whose access is read-only. To
write the file anyway, add a ‘!’ character right after the command
you use.
Example:
:w
changes to:
:w!

CNTWTF
Short Message : Can not open the file for writing <write_file>
Severity : Error
Description : For some reason, the file you are writing to cannot be created
or overwritten. The reason could be that you do not have permission
to write in the directory or the file name is not valid.

CNTACP
Short Message : Can not access start path <start_path>
Severity : Warning
Description : You may have set the wrong path or do not have the appropriate
permission to access the path.

===========================================================================
===================== 2. PNEdit =======================

NOWRIT
Short Message : No write since last change (add ! to override)
Severity : Error
Description : You are trying to |abandon| a file that has changes. PNEdit
protects you from losing your work. You can either write the
changed file with “:w”, or, if you are sure, |abandon| it anyway,
and lose all the changes. This can be done by adding a ‘!’ character
right after the command you use.
Example:
:e /home/test.txt
changes to:
:e! /home/test.txt

CNTOPF
Short Message : Can not open file <open_file>
Severity : Error
Description : If you’re getting this error, the problem is most likely that
the file name or the path to the file is incorrect.

ARGREQ
Short Message : Argument required
Severity : Error
Description : This happens when an Ex command with mandatory argument(s)
was executed, but no argument has been specified.

READOY
Short Message : File access is ‘read-only’ (add ! to override)
Severity : Error
Description : You are trying to write a file that access was read-only. To
write the file anyway, add a ‘!’ character right after the command
you use.
Example:
:w
changes to:
:w!

FILEEX
Short Message : File exists (add ! to override)
Severity : Error
Description : You are protected from accidentally overwriting a file. When
you want to write anyway, use the same command, but add a “!”
right after the command.
Example:
:w /home/test.txt
changes to:
:w! /home/test.txt

CNTWTF
Short Message : Can not open the file for writing <write_file>
Severity : Error
Description : For some reason, the file you are writing to cannot be created
or overwritten. The reason could be that you do not have permission
to write in the directory or the file name is not valid.

CNTRDF
Short Message : Can not read the file <read_file>
Severity : Error
Description : PNEdit can not read a temporary file.

CNTFDF
Short Message : Can not find file <find_file> in path
Severity : Error
Description : The file item you selected can not be found. If you do want to edit
a new file, use:
:e

CNTACD
Short Message : Can not access directory <directory_name>
Severity : Error
Description : You may have set the wrong directory or do not have the appropriate
permission to access the directory.

BADRGX
Short Message : Bad regular expression:
Severity : Error
Description : Invalid Regular Expression. The pattern you entered is not
supported in the current regular expression rules.

BADPSP
Short Message : Bad Paste position:
Severity : Error
Description : The line-column position you selected is not valid. You can not
paste anything into an invalid position.

BADFMP
Short Message : Bad From position:
Severity : Error
Description : The From line-column position you selected is not valid.

BADTOP
Short Message : Bad To position:
Severity : Error
Description : The To line-column position you selected is not valid.

IVDTAG
Short Message : Tag position invalid
Severity : Error
Description : The line-column position you selected is not valid. The tag will
not be created.

===========================================================================
===================== 3. PNTree =======================

CNTACP
Short Message : Can not access start path <start_path>
Severity : Warning
Description : You may have set the wrong path or do not have the appropriate
permission to access the path.

BADRGX
Short Message : Bad regular expression:
Severity : Error
Description : Invalid Regular Expression. The pattern you entered is not
supported in the current regular expression rules.

BADDIR
Short Message : Bad directory: <directory_name>
Severity : Error
Description : You have selected a directory that either does not exist or
you may not have permission to access.

CNTEXD
Short Message : Can not expand <directory_name>
Severity : Warning
Description : Can not expand the directory. This warning could be triggered by
one of the following reasons:
- The directory has been changed
- You have no permissions to access the directory

CNTSHF
Short Message : Can not search file <search_file>
Severity : Warning
Description : PNTree can not perform search operation in this selected file.

CNTRPF
Short Message : Can not replace file <replace_file>
Severity : Warning
Description : PNTree can not perform replace operation in this selected file.

CNTDED
Short Message : Can not delete directory <delete_directory>
Severity : Warning
Description : The CNTDED warning occurs when users try to delete a directory
from their disk. This warning could be triggered by one of the following
reasons:
- The directory not exist, or its directory name is misspelled
- There are files or subdirectories which need higher permissions
- There are files in use

CNTCPD
Short Message : Can not copy directory from <from_directory> to <to_directory>
Severity : Warning
Description : The CNTCPD warning message appears when you attempt to copy a file or
folder to another directory path. It might come up followed by one of the
following messages in different cases:
- There is not enough free disk space. Delete one or more files to
free disk space, and then try again.
- An error occurred while copying the file or folder. The operation
timed out.
- Can not find the specified directory. Make sure you specify the
correct copy to directory name.
- The copy to path is write-protected.

CNTMVD
Short Message : Can not move directory from <from_directory> to <to_directory>
Severity : Warning
Description : The CNTMVD warning message appears when you attempt to move a file or
folder to another directory path. It might come up followed by one of the
following messages in different cases:
- There is not enough free disk space. Delete one or more files to
free disk space, and then try again.
- An error occurred while moving the file or folder. The operation
timed out.
- Can not find the specified directory. Make sure you specify the
correct move to directory name.
- The move to path is write-protected.

CNTNWD
Short Message : Can not new directory <new_directory>
Severity : Warning
Description : The CNTNWD warning occurs when users try to create a new file or folder
in a directory path. This warning could be triggered by one of the following
reasons:
- The file or folder already exists
- You have no permissions to access the directory

CNTRND
Short Message : Can not rename directory <rename_directory> to <new_directory>
Severity : Warning
Description : The rename warning message occurs most likely when the directory already
exists.

CNTCMD
Short Message : Can not compress directory <compress_directory> to <compress_file>
Severity : Warning
Description : An warning occurs while compressing a directory

CNTDCF
Short Message : Can not decompress file <decompress_file> to <decompress_directory>
Severity : Warning
Description : An warning occurs while decompressing a directory

===========================================================================
===================== 4. PNDiff =======================

NOWRIT
Short Message : No write since last change (add ! to override)
Severity : Error
Description : You are trying to |abandon| a file that has changes. PNEdit
protects you from losing your work. You can either write the
changed file with “:w”, or, if you are sure, |abandon| it anyway,
and lose all the changes. This can be done by adding a ‘!’ character
right after the command you use.
Example:
:e /home/test.txt
changes to:
:e! /home/test.txt

READOY
Short Message : File access is ‘read-only’ (add ! to override)
Severity : Error
Description : You are trying to write a file that access was read-only. To
write the file anyway, add a ‘!’ character right after the command
you use.
Example:
:w
changes to:
:w!

CNTWTF
Short Message : Can not open file for writing <write_file>
Severity : Error
Description : For some reason the file you are writing to cannot be created
or overwritten. The reason could be that you do not have permission
to write in the directory or the file name is not valid.

DIFRNG
Short Message : Input diff range from <from_line> and to <to_line> is invalid
Severity : Error
Description : The number of diff from/to line is out of range, you need to
set a valid diff from/to line number.

===========================================================================
=================== 5. PNConsole ======================

===========================================================================
====================== 6. Tools =======================

SPTLRG
Short Message : Split add Line-Range <line_range> is invalid
Severity : Error
Description : The number of split add line is out of range, you need to
set a valid split add line number.

SPTPRG
Short Message : Split add Part-Range <part_range> is invalid
Severity : Error
Description : The number of split add part is out of range, you need to
set a valid split add part number.

JONRNG
Short Message : Join insert Line-Range <line_range> is invalid
Severity : Error
Description : The number of join insert line is out of range, you need to
set a valid join insert line number.

BADDIR
Short Message : Bad directory: <directory_name>
Severity : Error
Description : You have selected a directory that either does not exist or
you may not have permission to access.

CNTPTD
Short Message : Can not print directory <print_directory> to <output_file>
Severity : Error
Description : The CNTPTD error message appears when you attempt to print
directory information into an output file. This error could be caused
by one of the following reasons:
- There is not enough free disk space. Delete one or more files to
free disk space, and then try again.
- An error occurred while printing a directory information.
- You have no permissions to access the printing file or folder

IVDECT
Short Message : Can not encrypt file <encrypt_file>
Severity : Error
Description : You may not have permission to access the file or it has been
encrypted before.

IVDDCT
Short Message : Invalid password to decrypt file <decrypt_file>
Severity : Error
Description : You have entered an incorrect password. The encrypted file can not
be decrypted correctly, please input the right password and try again.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值