Thursday, January 28, 2010

常用编辑器的列模式和十六进制编辑

       今天看到有一种说法:做为一个比较强大的编辑器,起码应该具有列编辑模式和十六进制编辑功能。下面把我常用的三个通用型编辑器的以上两个功能做一个比较:
1、Source Insight
在Source Insight的帮助文档里面有如下描述:
Make Column Selection
The Make Column Selection is used with the mouse. Alt+Left Click and drag creates a rectangular selection. The column selection can be Cut, Copied, or Pasted.
按下Alt键的同时鼠标左键拖动即可进行列编辑。但是并未找到有关SI支持hex编辑的说明。 
 
2、SlickEdit
在帮助文档的BasicEditing部分有详细的描述:
 

Block selection

This is created when columns of text are selected, also known as a "column selection".

Right-click and drag or use the select_block command (Ctrl+B or Edit Select Block ). See also Block Selections.

可以使用鼠标右键拖动或者快捷键来完成块的选择。
关于hex编辑有如下描述:
You can enable Hex view/edit mode on a per-document or language-specific basis:
To view the current binary or text file in a Hex mode, click View → Hex or View → Line Hex (or use the commands hex or linehex, respectively).
To enable Hex or Line Hex view on a language-specific basis, so that each file opened in that language is displayed in Hex mode, use the Language-Specific View Options.
3、UltraEdit
在帮助文档的关于列模式有如下描述:
Column Mode command (Column menu)    
This command changes the operation of the editor for selecting text.  When column mode is selected highlighted text is based on the character column position of the first character selected to the column of the last character of text selected.  Text selected in this mode does not automatically include all text between the start and end position, but includes all text in the columns between the first and last character selected.
Column mode editing is sometimes referred to as block mode editing as the act of selecting text forms a rectangle.
 
Cut, Copy and Paste work with the selected text.
 
Column mode editing requires that Word Wrap be turned off and a fixed pitch font be selected.
 
When column mode is enabled, additional column features are enabled; Insert/Fill Columns, Delete Columns, Cut Columns and Insert Number.
 
Shortcut:        ALT+C
关于十六进制的编辑有如下描述:
Hex Edit command (Edit menu)  
The Hex Edit command selects the editing mode for the active window. The mode is toggled between Hexadecimal (HEX) and ASCII. The ASCII mode of editing is typically used for any ASCII (text) based files. In the ASCII mode UltraEdit allows normal operation of all functions and allows any characters to be typed.
 
The Hex mode of editing is typically used for non-ASCII files, or binary files. These files typically contain non-printable characters and are not text files.
       对于这三个软件我并没有明显的偏好,只是在不同的场合下选用不同的软件。比如只编辑查看几个文件或者文件是二进制文件等情况的时候,一般会选择UltraEdit.

No comments:

Post a Comment