Using Command Line Options
http://www.emeditor.com/help/howto/file/file_commandline.htm
Command line options can be specified in the Run dialog box on the Start menu or a Command Prompt window.
Syntax
Open a file or files
"File1" "File2" "File3" ... [/r] [/fh] [/nr] [/sp] [/l LineNumber] [/cl ColumnNumber] [/cp encoding] [/c "Config"] [/mf "MacroPath"]
Create a new file
[/cd] [/sp] [/c "Config"] [/mf "MacroPath"]
Create a new file and paste
[/i] [/cd] [/sp] [/c "Config"] [/mf "MacroPath"]
Create a new file and paste with quote
[/iq] [/cd] [/sp] [/c "Config"] [/mf "MacroPath"]
Create a new file and paste with quote and returns
[/iqr] [/cd] [/sp] [/c "Config"] [/mf "MacroPath"]
Display the Tray Icon
/ti
Print a file
"File" /p [/nr] [/sp] [/cp encoding]
Compare two files
/cmp "File1" "File2"
Convert a file encoding
"SrcFile" [/nr] [/sp] [/cp EncodingToOpen] [/c "Config"] /cps EncodingToSave /ss+ /sa "DestFile"
To save without the Unicode signature (BOM), use /ss- instead of /ss+.
Display Find in Files dialog box
/fd
Display Replace in Files dialog box
/rd
Find in files
/fc "FindWhat" [/fr] [/fw] [/x] [/fn] [/fu "FilesToIgnore"] [/cp encoding] "path"
This command is called internally when the Find button is selected in the Find in Files dialog box. To search without matching case, use /fi instead of /fc.
Replace in files
/fc "FindWhat" [/fr] [/fw] [/x] [/ko] [/fu "FilesToIgnore"] [/cp encoding] "path" /rw "RepalceWith" [/bk "BackupFolder"]
This command is called internally when the Replace All button is selected in the Replace in Files dialog box. To search without matching case, use /fi instead of /fc. /ko and /bk cannot be specified simultaneously.
Open a file and replace
"File" /rc "FindWhat" [/fw] [/x] [/cp encoding] /rw "RepalceWith"
This command is called internally during the Replace in Files process. To search without matching case, use /ri instead of /rc.
Restore workspace
/ws
This command is called internally when the Restore Workspace command is selected.
Save workspace
/wss
This command is called internally when the Save Workspace command is selected.
Grab text with EmEditor
/eh
This command is called from the Tray Icon when the shortcut key to grab text with EmEditor defined in the Customize Tray Icon dialog box is pressed.
Display Help
/?
Options
/? | displays Help. | ||||||||
/act | activates EmEditor if it is already running, or launches EmEditor if it is not already running. | ||||||||
/bk "BackupFolder" | specifies a backup folder when replacing in files. | ||||||||
/c "Config" | sets the configuration. | ||||||||
/ca | closes all documents. | ||||||||
/car | closes all documents including a hidden window if the "Quick Start" option is enabled. | ||||||||
/cd | set the current directory as the default folder in the Open dialog box. | ||||||||
/cjl | customizes the Jump List on Windows 7 or later. | ||||||||
/cl ColumnNumber | logical column number. | ||||||||
/clw | clears the workspace. | ||||||||
/cmp | compares two files. | ||||||||
/cp Encoding | sets an encoding to open as. An encoding can be one of Encoding Constants. A combination with following values can be specified.
|
||||||||
/cps Encoding | sets an encoding to save as. An encoding can be one of Encoding Constants. | ||||||||
/di | specifies the working folder when creating a new document. Used internally by EmEditor. | ||||||||
/eh | grabs a text box contents. | ||||||||
/fc "FindWhat" | find in files (case sensitive). | ||||||||
/fd | displays the Find in Files dialog box. | ||||||||
/ff "FindWhat" | find a string directly within the opened document. Can be combined with /mc or /x. | ||||||||
/fi "FindWhat" | find in files (ignore case). | ||||||||
/fh | highlights searched strings. | ||||||||
/fn | displays only file names when finding in file. | ||||||||
/fu "FilesToIgnore" | ignores the following file or folder names. | ||||||||
/fr | search in sub folders when finding in files (use with /fc or /fi). | ||||||||
/fw | searches only words. | ||||||||
/hide | runs EmEditor as a hidden window when the "Quick Start" option is enabled. | ||||||||
/i | pastes a text string from the Clipboard. | ||||||||
/ipi | refreshes the plug-in list. used from plug-in installers. | ||||||||
/iq | pastes a text string in quotes from the Clipboard. | ||||||||
/iqr | pastes a text string in quotes and returns from the Clipboard. | ||||||||
/ko | keeps modified files open when replacing in files. | ||||||||
/l LineNumber | move cursor to the logical line number. | ||||||||
/mc | matches cases when /ff is used to find a string. | ||||||||
/mf | specifies a macro file to run. | ||||||||
/n | always start as a new file. | ||||||||
/ncp | suppresses "The specified file does not exist. Open as a new file?" prompt when a specified file is not found. | ||||||||
/ne | specifies event-triggered macros should be disabled. | ||||||||
/nr | does not add the file path to the recent file list. | ||||||||
/od | displays the Open dialog box to select files to open. | ||||||||
/p | prints the file. | ||||||||
/pos left top right bottom | specifies the window position with four integers (left, top, right, bottom). | ||||||||
/r | read-only mode. | ||||||||
/rc "FindWhat" | replaces in files (case sensitive). | ||||||||
/rd | displays the Replace in Files dialog box. | ||||||||
/rh | opens HTML files as read-only. Used internally. | ||||||||
/ri "FindWhat" | replaces in files (ignore case). | ||||||||
/rr | opens files in folders recursively. | ||||||||
/rw | specifies a string to be replaced with. | ||||||||
/sa "DestFile" | specifies a file name to save as after the encoding conversion. | ||||||||
/sca | saves and closes all opened documents. | ||||||||
/scrlf | saves the file using CR+LF as return method after the encoding conversion. | ||||||||
/scr | saves the file using the CR only as return method after the encoding conversion. | ||||||||
/slf | saves the file using the LF only as return method after the encoding conversion. | ||||||||
/sp | specifies that a new separate process from other EmEditor windows should be run. This option is useful when a new EmEditor window must be launched from another application because the application must monitor the process termination so it can detect the file modification. If this is specified, however, some features including tab operations will be disabled, and will void support. | ||||||||
/ss+ | saves the file with a Unicode signature (BOM) after the encoding conversion. | ||||||||
/ss- | saves the file without a Unicode signature (BOM) after the encoding conversion. | ||||||||
/ti | displays the Tray Icon. | ||||||||
/uob | uses the Output Bar to display the Find in Files results. | ||||||||
/x | finds or finds in files using a regular expression. | ||||||||
/ws | restores the workspace. | ||||||||
/wss | saves the workspace. |
Examples
/rr *.htm
opens all .htm files including all sub folders.
/p "filename"
prints filename.
/r "filename"
opens filename in read only mode.
/c "Normal" "filename"
opens filename in the default configuration.
/l 123 "filename"
opens filename, jumps to 123rd line and display it.
/ff "what" /mc "filename"
opens filename, and finds what matching cases.
/fh
highlights string of last search.
/ti
opens as a tray icon.
/fi "ABC" "c:\Temp\*.txt"
searches for the string ABC from all files with the extension .txt on the c:\Temp folder while ignoring case.
/fi "abc" /fr /fw /fn /fu "_*;*.bak" /cp 65536 "c:\test\*.htm;*.txt"
searches for the string abc from all files with the extension .htm and .txt on the c:\test folder while ignoring case. it searches sub folders, searches only words, displays only file names, ignores file or folder names matching "_*;*.bak", and uses the system default encoding.
/fc "[a-e]" /fr /x /fu "_*;*.bak" /cp 65536 "c:\test\*.htm;*.txt"
searches for text matching a regular expression [a-e] from all files with the extension .htm and .txt on the c:\test folder while not ignoring case. it searches sub folders, ignores file or folder names matching "_*;*.bak", and uses the system default encoding.
"c:\test\utf16.txt" /cp 65537 /cps 65001 /ss- /sa "c:\test\utf8.txt" /scrlf
converts a UTF-16LE file c:\test\utf16.txt to UTF-8 without a Unicode signature and saves as c:\test\utf8.txt. The return method is converted to CR+LF.
Tips
- The string searched for in files must be after /fc or /fi.
- If no options are specified, the selected file will simply be opened.
- If /c is not specified and the associated extensions of the configuration are the same, open the file with that configuration.
- If a folder name is specified instead of a file name, the Open dialog box with that folder will be displayed.
- Command line options are case sensitive. For instance /r will not be recognized if written as /R.
- Escape seaquences are always on when searching from the command line.
相关推荐
EmEditor是一款功能强大的文本编辑器,尤其受到程序员和高级用户喜爱。它支持多种编程语言的高亮显示,具有丰富的自定义功能,可以极大地提高文本处理的效率。本压缩包"EmEditor插件集.rar"包含了多款专为EmEditor...
EmEditor是一款功能强大的文本编辑器,它以其丰富的可定制性、高效的性能以及对大文件的良好支持而受到程序员和文本编辑爱好者的青睐。本主题聚焦于"EmEditor 配色方案 2",这是一个用户自定义的配色方案,相较于...
CLASSES_ROOT\.txt`(或其他需要关联的文件类型)下新建一个名为`Editor`的项,然后在`Editor`下创建`shell`子项,接着在`shell`下创建`Edit with EmEditor`项,最后在`Edit with EmEditor`下创建`command`项,并将...
EmEditor是一款功能强大的文本编辑器,专为满足高级用户和程序员的需求而设计。它提供了丰富的特性集,使得处理大量文本、编程代码或者其他形式的数据变得更加高效和便捷。EmEditor以其轻巧、快速、可定制以及对大...
EmEditor 注册码 14.2.2 14.3.1 通用。 亲测可用。
EmEditor是一款广受欢迎的文本编辑器,特别是在程序员和高级用户中。它以其强大的功能、高度的自定义性和轻量级的特性而闻名。EmEditor14.4版本是该软件的一个较早但仍然广泛使用的迭代,它包含了丰富的文本处理功能...
EmEditor是一款广受欢迎的文本编辑器,尤其在程序员和高级用户中备受青睐,因为它提供了丰富的自定义功能和高效的工作环境。这款编辑器支持多种编程语言,并且可以通过安装插件进一步扩展其功能。"EmEditor中文插件...
emeditor 文本编辑器 可以竖排复制 狠强大
EmEditor是一款广受欢迎的文本编辑工具,以其高效、易用性以及丰富的功能集而闻名。作为一款专业的文本编辑器,它不仅适用于日常的文字处理工作,还能满足程序员、Web开发者等专业人士的需求。下面将详细介绍...
其实EmEditor本身就是一款设计完好的便携软件(Portable), EmEditor本身支持将配置保存在注册表或是INI配置文件中,意即支持便携性; 但默认情况下EmEditor是将配置保存在注册表中, 注册表地址是: “HKCU\Software...
EmEditor是一款广受欢迎的文本编辑器,特别是在程序员和高级用户中有着较高的声誉。这款软件以其强大的功能、灵活性和用户友好的界面而闻名。EmEditor 8.06 中文包是专门为满足中国用户需求设计的版本,它包含了完整...
EmEditor是一款轻量级但功能强大的文本编辑器,尤其受到程序员和码农们的喜爱。它支持自定义主题,使得用户可以根据个人喜好和工作需求调整编辑环境。本文将深入探讨如何修改EmEditor的主题来保护视力,特别是在夜间...
EmEditor是一款功能强大的文本编辑器,专为满足高级用户需求而设计。它以其高效、稳定和易用性在IT行业中赢得了良好的声誉,是许多程序员、Web开发者和文档编写者的首选工具。EmEditor免费版虽然相较于专业版有所...
EmEditor是一款备受赞誉的专业文本编辑器,尤其在程序员、网页设计师和高级用户群体中广受欢迎。它以其强大的功能和高效的操作体验,为处理大量文本、编程代码和日常文档提供了无与伦比的便利。 首先,EmEditor的...
标题中的“右键菜单, 快捷启动EmEditor编辑文件”指的是在Windows操作系统中通过鼠标右键点击文件,快速调用EmEditor文本编辑器来打开和编辑文件的一种方法。EmEditor是一款功能强大的文本编辑器,它支持Unicode编码...
EmEditor9是一款强大的文本编辑器,尤其以处理大型文件而著名。它以其绿色版的形式提供,无需进行传统意义上的安装过程,使得用户可以更方便、快捷地在任何电脑上使用。这款编辑器以其轻巧的体积、高效的功能和丰富...
EmEditor是一款功能强大的文本编辑器,尤其受到程序员和文本工作者的喜爱。它支持多种语言和自定义功能,其中配色方案是提升代码可读性和工作舒适度的重要元素。本篇文章将详细探讨EmEditor的配色方案及其应用。 ...
EmEditor是一款功能强大的文本编辑器,尤其受到程序员和高级用户喜爱。EmEditor 8.0是该软件的一个重要版本,提供了许多改进和新特性。在深入探讨EmEditor 8.0之前,我们先来了解一些关于EmEditor的基础知识。 ...
EmEditor是一款广受欢迎的文本编辑器,特别是在程序员和IT专业人士中使用广泛。它以其轻巧、高效和强大的功能集而闻名。此版本为v12.0.4,通过提供的"emed32_12.0.4.exe"文件,用户可以安装这个经典版本的EmEditor。...
EmEditor是一款功能强大的文本编辑器,它以其可定制性、高效性和灵活性深受程序员、Web开发者以及文本处理人员的喜爱。在EmEditor中,配色方案(Color Scheme)是至关重要的一个特性,因为它能够极大地影响用户的...