-p 开关对于 Notepad++ 到底起什么作用?

-p 开关对于 Notepad++ 到底起什么作用?

来自手册:

---------------------------
Notepad++ Command Argument Help
---------------------------
Usage :

notepad++ [--help] [-multiInst] [-noPlugin] [-lLanguage] [-LlangCode] [-nLineNumber] [-cColumnNumber] [-pPosition] [-xLeftPos] [-yTopPos] [-nosession] [-notabbar] [-ro] [-systemtray] [-loadingTime] [-alwaysOnTop] [-openSession] [-r] [-qnEasterEggName | -qtText | -qfCntentFileName] [-qSpeed1|2|3] [-quickPrint] [filePath]

--help : This help message
-multiInst : Launch another Notepad++ instance
-noPlugin : Launch Notepad++ without loading any plugin
-l : Open file or display ghost typing with syntax highlighting of choice
-L : Apply indicated localization, langCode is browser language code
-n : Scroll to indicated line on filePath
-c : Scroll to indicated column on filePath
-p : Scroll to indicated position on filePath
-x : Move Notepad++ to indicated left side position on the screen
-y : Move Notepad++ to indicated top position on the screen
-nosession : Launch Notepad++ without previous session
-notabbar : Launch Notepad++ without tabbar
-ro : Make the filePath read only
-systemtray : Launch Notepad++ directly in system tray
-loadingTime : Display Notepad++ loading time
-alwaysOnTop : Make Notepad++ always on top
-openSession : Open a session. filePath must be a session file
-r : Open files recursively. This argument will be ignored
     if filePath contain no wildcard character
-qn : Launch ghost typing to display easter egg via its name
-qt : Launch ghost typing to display a text via the given text
-qf : Launch ghost typing to display a file content via the file path
-qSpeed : Ghost typing speed. Value from 1 to 3 for slow, fast and fastest
-quickPrint : Print the file given as argument then quit Notepad++
filePath : file or folder name to open (absolute or relative path name)

---------------------------
OK   
---------------------------

如果 -n 表示行,-c 表示列,那么“位置”(-p) 又是什么呢?如果不是行 + 列的组合?我不明白。它指的是什么?

答案1

此参数允许将光标定位到某个字符的位置。

如果将光标定位在文件中的所需位置,并使用 ++ctrl选择从当前光标位置到文件开头的所有字符 ,则状态栏将显示“Sel:numchars|numrows”。shifthome

numchars数字与参数一起使用时-p,将打开文件并将光标定位在指示的位置。

该命令应该写成:

"C:\Program Files (x86)\Notepad++\notepad++.exe" -p<numchars> file-path

相关内容