📄 home.em
字号:
/* S H I F T H O M E */
/*-------------------------------------------------------------------------
Extends the selection back to the first non-white space on the
current line.
-------------------------------------------------------------------------*/
macro ShiftHome()
{
hwnd = GetCurrentWnd()
if (hwnd == 0)
stop
sel = GetWndSel(hwnd)
hbuf = GetWndBuf(hwnd)
// if selection is extended, collapse it first
if (sel.fExtended)
{
SetBufIns(hbuf, sel.lnFirst, sel.ichFirst)
sel = GetWndSel(hwnd)
}
// if the first character on the line is white space,
// then move forward to the first word on the line
szLine = GetBufLine(hbuf, sel.lnFirst)
chTab = CharFromAscii(9)
ich = 0
while (szLine[ich] == " " || szLine[ich] == chTab)
ich = ich + 1
if (ich < sel.ichLim)
{
sel.ichFirst = ich;
SetWndSel(hwnd, sel);
}
else
Beginning_of_Line
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -