我不會解釋……就是不管上下行字數有無相同,在按了上下鍵後游標都會在同一個位置上下跑。
我一直以為好用的Editor都應該會有這個功能,後來才發現……Notepad++沒有!
之後好久好久終於在Visual Studio看到了這個功能,中文名詞是:
「啟用虛擬空間」
英文是"Enabling Virtual Space mode"
後來在這個討論串中找到解法,節錄內容如下:
Sort of a hack (sends a window message directly to the Scintilla edit control on startup), but works great:
- Install NppExec plugin
- Go to Plugins -> NppExec -> Execute
- Enter the following code:
// ensure console stays hidden NPP_CONSOLE 0 // enable virtual spaces (cursor past end of line) outside column edit mode SCI_SENDMSG 2596 3 0 // SCI_SENDMSG == send message to Scintilla edit control // 2596 == the message we're sending is SCI_SETVIRTUALSPACEOPTIONS // 3 == send the value (SCVS_RECTANGULARSELECTION | SCVS_USERACCESSIBLE) // the default value is 1 (just SCVS_RECTANGULARSELECTION) for // virtual spaces in column select mode only // you can find these values by poking around the source code a bit, or // see http://www.scintilla.org/ScintillaDoc.html
- Click the Save button at the bottom, and give the script a name
- Now go to Plugins -> NppExec -> Advanced Options
- On the right, under "Execute this script when Notepad++ starts", select the script name you just saved
- Click OK, close/reopen Notepad++, and enjoy ;)
這方面還是外國人厲害啊!讚!