 {
     If lr
     {
-        ControlGetPos,x,y,w,h,%TCPanel2%,ahk_class TTOTAL_CMD
-        ControlGetPos,tm1x,tm1y,tm1W,tm1H,%TCPanel1%,ahk_class TTOTAL_CMD
+        ControlGetPos, x, y, w, h, %TCPanel2%, ahk_class TTOTAL_CMD
+        ControlGetPos, tm1x, tm1y, tm1W, tm1H, %TCPanel1%, ahk_class TTOTAL_CMD
         If (tm1w < tm1h) ; 判断纵向还是横向 Ture为竖 false为横
         {
-            ControlMove,%TCPanel1%,x+w,,,,ahk_class TTOTAL_CMD
+            ControlMove, %TCPanel1%, x+w, , , , ahk_class TTOTAL_CMD
         }
         else
-            ControlMove,%TCPanel1%,0,y+h,,,ahk_class TTOTAL_CMD
-        ControlClick, %TCPanel1%,ahk_class TTOTAL_CMD
+            ControlMove, %TCPanel1%, 0, y+h, , , ahk_class TTOTAL_CMD
+        ControlClick, %TCPanel1%, ahk_class TTOTAL_CMD
         WinActivate ahk_class TTOTAL_CMD
     }
     Else
     {
-        ControlMove,%TCPanel1%,0,0,,,ahk_class TTOTAL_CMD
-        ControlClick,%TCPanel1%,ahk_class TTOTAL_CMD
+        ControlMove, %TCPanel1%, 0, 0, , , ahk_class TTOTAL_CMD
+        ControlClick, %TCPanel1%, ahk_class TTOTAL_CMD
         WinActivate ahk_class TTOTAL_CMD
     }
 }
 ; <GoLastTab> {{{1
 <GoLastTab>:
-    GoSub,<cm_SrcActivateTab1>
-    GoSub,<cm_SwitchToPreviousTab>
+    GoSub, <cm_SrcActivateTab1>
+    GoSub, <cm_SwitchToPreviousTab>
 return
 ; <CopyNameOnly> {{{1
 <CopyNameOnly>:

; 返回到上层文件夹，可返回到我的电脑
<GoToParentEx>:
    IsRootDir()
    GoSub,<cm_GoToParent>
return
IsRootDir()
{
    ClipSaved := ClipboardAll
    clipboard :=
    GoSub,<cm_CopySrcPathToClip>
    ClipWait,1
    Path := Clipboard
    Clipboard := ClipSaved
    If RegExMatch(Path,"^.:\\$")
    {
        GoSub,<cm_OpenDrives>
        Path := "i)" . RegExReplace(Path,"\\","")
        ControlGetFocus,focus_control,AHK_CLASS TTOTAL_CMD
        ControlGet,outvar,list,,%focus_control%,AHK_CLASS TTOTAL_CMD
        Loop,Parse,Outvar,`n
        {
            If Not A_LoopField
                Break
            If RegExMatch(A_LoopField,Path)
            {
                Focus := A_Index - 1
                Break

    }
    Global Mark := []
    Global NewFiles := []
    vim.Comment("<Normal_Mode_TC>", "返回正常模式")
    vim.Comment("<Insert_Mode_TC>", "进入插入模式")
    vim.Comment("<ToggleTC>", "打开/激活TC")
    vim.comment("<FocusTCCmd>", "激活TC，并定位到命令行")

    vim.Comment("<azHistory>", "a-z历史导航")
    vim.Comment("<DownSelect>", "向下选择")
    vim.Comment("<UpSelect>", "向上选择")
    vim.Comment("<Mark>", "标记功能")
    vim.Comment("<ForceDelete>", "强制删除")
    vim.Comment("<ListMark>", "显示标记")
    vim.Comment("<Toggle_50_100Percent>", "切换当前窗口显示状态50%~100%")
    vim.Comment("<WinMaxLeft>", "最大化左侧窗口")
    vim.Comment("<WinMaxRight>", "最大化右侧窗口")
    vim.Comment("<GoLastTab>", "切换到最后一个标签")
    vim.Comment("<CopyNameOnly>", "只复制文件名，不含扩展名")
    vim.Comment("<GotoLine>", "移动到[count]行，默认第一行")
    vim.Comment("<LastLine>", "移动到[count]行，默认最后一行")
    vim.Comment("<Half>", "移动到窗口中间行")
    vim.Comment("<CreateNewFile>", "文件模板")
    vim.Comment("<GoToParentEx>", "返回到上层文件夹，可返回到我的电脑")
    vim.Comment("<AlwayOnTop>", "设置TC顶置")
    vim.comment("<OpenDriveThis>", "打开驱动器列表:本侧")
    vim.comment("<OpenDriveThat>", "打开驱动器列表:另侧")
    vim.comment("<MoveDirectoryHotlist>", "移动到常用文件夹")
    vim.comment("<CopyDirectoryHotlist>", "复制到常用文件夹")
    vim.comment("<GotoPreviousDirOther>", "后退另一侧")
    vim.comment("<GotoNextDirOther>", "前进另一侧")
    vim.comment("<Search>", "连续搜索")
    vim.comment("<CopyUseQueues>", "无需确认，使用队列拷贝文件至另一窗口")
    vim.comment("<MoveUseQueues>", "无需确认，使用队列移动文件至另一窗口")
    vim.comment("<Repeat>", "重复上次操作")
    vim.comment("<ViewFileUnderCursor>", "使用查看器打开光标所在文件(shift+f3)")
    vim.comment("<OpenWithAlternateViewer>", "使用外部查看器打开(alt+f3)")
    GoSub, TCCOMMAND

    vim.mode("normal", "TQUICKSEARCH")
    vim.map("J", "<Down>", "TQUICKSEARCH")
    vim.map("K", "<Up>", "TQUICKSEARCH")
    ;vim.map("<esc>", "<Normal_Mode_TC>", "TQUICKSEARCH")

    vim.mode("insert", "TTOTAL_CMD")
    vim.SetTimeOut(800, "TTOTAL_CMD")
    vim.map("<esc>", "<Normal_Mode_TC>", "TTOTAL_CMD")
    vim.mode("Search", "TTOTAL_CMD")
    vim.map("<esc>", "<Normal_Mode_TC>", "TTOTAL_CMD")

    vim.mode("normal", "TTOTAL_CMD")

    ;复制/移动到右侧 f取file的意思 filecopy
    vim.map("fc", "<cm_CopyOtherpanel>", "TTOTAL_CMD")
    vim.map("fx", "<cm_MoveOnly>", "TTOTAL_CMD")

    ;使用队列复制/移动到右侧 q-queue, fcq会影响对fc的使用，改用fqc/fqx的方式
    vim.map("fqc", "<CopyUseQueues>", "TTOTAL_CMD")
    vim.map("fqx", "<MoveUseQueues>", "TTOTAL_CMD")

    ;ff复制到剪切板 fz剪切到剪切板 fv粘贴
    vim.map("ff", "<cm_CopyToClipboard>", "TTOTAL_CMD")
    vim.map("fz", "<cm_CutToClipboard>", "TTOTAL_CMD")
    vim.map("fv", "<cm_PasteFromClipboard>", "TTOTAL_CMD")

    ;fb复制到收藏夹某个目录，fd移动到收藏夹的某个目录
    vim.map("fb", "<CopyDirectoryHotlist>", "TTOTAL_CMD")
    vim.map("fd", "<MoveDirectoryHotlist>", "TTOTAL_CMD")
    vim.map("ft", "<cm_SyncChangeDir>", "TTOTAL_CMD")
    vim.map("<shift>f", "<Search>", "TTOTAL_CMD")
    vim.map("gh", "<GotoPreviousDirOther>", "TTOTAL_CMD")
    vim.map("gl", "<GotoNextDirOther>", "TTOTAL_CMD")
    vim.map("<shift>vh", "<cm_SwitchIgnoreList>", "TTOTAL_CMD")
    vim.map("0", "<0>", "TTOTAL_CMD")
    vim.map("1", "<1>", "TTOTAL_CMD")
    vim.map("2", "<2>", "TTOTAL_CMD")
    vim.map("3", "<3>", "TTOTAL_CMD")
    vim.map("4", "<4>", "TTOTAL_CMD")
    vim.map("5", "<5>", "TTOTAL_CMD")
    vim.map("6", "<6>", "TTOTAL_CMD")
    vim.map("7", "<7>", "TTOTAL_CMD")
    vim.map("8", "<8>", "TTOTAL_CMD")
    vim.map("9", "<9>", "TTOTAL_CMD")
    vim.map("k", "<up>", "TTOTAL_CMD")
    vim.map("K", "<upSelect>", "TTOTAL_CMD")
    vim.map("j", "<down>", "TTOTAL_CMD")
    vim.map("J", "<downSelect>", "TTOTAL_CMD")
    vim.map("h", "<left>", "TTOTAL_CMD")
    vim.map("H", "<cm_GotoPreviousDir>", "TTOTAL_CMD")
    vim.map("l", "<right>", "TTOTAL_CMD")
    vim.map("L", "<cm_GotoNextDir>", "TTOTAL_CMD")
    vim.map("I", "<CreateNewFile>", "TTOTAL_CMD")
    vim.map("i", "<Insert_Mode_TC>", "TTOTAL_CMD")
    vim.map("d", "<cm_DirectoryHotlist>", "TTOTAL_CMD")
    vim.map("D", "<cm_OpenDesktop>", "TTOTAL_CMD")
    vim.map("e", "<cm_ContextMenu>", "TTOTAL_CMD")
    vim.map("E", "<cm_ExeCuteDOS>", "TTOTAL_CMD")
    vim.map("n", "<azHistory>", "TTOTAL_CMD")
    vim.map("m", "<Mark>", "TTOTAL_CMD")
    vim.map("M", "<Half>", "TTOTAL_CMD")
    vim.map("'", "<ListMark>", "TTOTAL_CMD")
    vim.map("u", "<GoToParentEx>", "TTOTAL_CMD")
    vim.map("U", "<cm_GoToRoot>", "TTOTAL_CMD")
    vim.map("o", "<cm_LeftOpenDrives>", "TTOTAL_CMD")
    vim.map("O", "<cm_RightOpenDrives>", "TTOTAL_CMD")
    vim.map("q", "<cm_SrcQuickView>", "TTOTAL_CMD")
    vim.map("r", "<cm_RenameOnly>", "TTOTAL_CMD")
    vim.map("R", "<cm_MultiRenameFiles>", "TTOTAL_CMD")
    vim.map("x", "<cm_Delete>", "TTOTAL_CMD")
    vim.map("X", "<ForceDelete>", "TTOTAL_CMD")
    vim.map("w", "<cm_List>", "TTOTAL_CMD")
    vim.map("y", "<cm_CopyNamesToClip>", "TTOTAL_CMD")
    vim.map("Y", "<cm_CopyFullNamesToClip>", "TTOTAL_CMD")
    vim.map("P", "<cm_PackFiles>", "TTOTAL_CMD")
    vim.map("p", "<cm_UnpackFiles>", "TTOTAL_CMD")
    vim.map("t", "<cm_OpenNewTab>", "TTOTAL_CMD")
    vim.map("T", "<cm_OpenNewTabBg>", "TTOTAL_CMD")
    vim.map("/", "<cm_ShowQuickSearch>", "TTOTAL_CMD")
    vim.map("?", "<cm_SearchFor>", "TTOTAL_CMD")
    vim.map("[", "<cm_SelectCurrentName>", "TTOTAL_CMD")
    vim.map("{", "<cm_UnselectCurrentName>", "TTOTAL_CMD")
    vim.map("]", "<cm_SelectCurrentExtension>", "TTOTAL_CMD")
    vim.map("}", "<cm_UnSelectCurrentExtension>", "TTOTAL_CMD")
    vim.map("\", "<cm_ExchangeSelection>", "TTOTAL_CMD")
    vim.map("|", "<cm_ClearAll>", "TTOTAL_CMD")
    vim.map("-", "<cm_SwitchSeparateTree>", "TTOTAL_CMD")
    vim.map(", ", "<Mark>", "TTOTAL_CMD")
    vim.map("_", "<cm_Split>", "TTOTAL_CMD")
    vim.map("+", "<cm_Combine>", "TTOTAL_CMD")
    vim.map("=", "<cm_MatchSrc>", "TTOTAL_CMD")
    vim.map(";", "<cm_FocusCmdLine>", "TTOTAL_CMD")
    vim.map(":", "<cm_FocusCmdLine>", "TTOTAL_CMD")
    vim.map("~", "<cm_SysInfo>", "TTOTAL_CMD")
    ;vim.map("``", "<ToggleShowComment>", "TTOTAL_CMD")
    vim.map("G", "<LastLine>", "TTOTAL_CMD")
    vim.map("ga", "<cm_CloseAllTabs>", "TTOTAL_CMD")
    vim.map("gg", "<GoToLine>", "TTOTAL_CMD")
    vim.map("g$", "<LastLine>", "TTOTAL_CMD")

    ;与vim保持一致
    vim.map("gt", "<cm_SwitchToNextTab>", "TTOTAL_CMD")
    vim.map("gT", "<cm_SwitchToPreviousTab>", "TTOTAL_CMD")
    vim.map("gc", "<cm_CloseCurrentTab>", "TTOTAL_CMD")
    vim.map("gb", "<cm_OpenDirInNewTabOther>", "TTOTAL_CMD")
    vim.map("ge", "<cm_Exchange>", "TTOTAL_CMD")
    vim.map("gw", "<cm_ExchangeWithTabs>", "TTOTAL_CMD")
    vim.map("g1", "<cm_SrcActivateTab1>", "TTOTAL_CMD")
    vim.map("g2", "<cm_SrcActivateTab2>", "TTOTAL_CMD")
    vim.map("g3", "<cm_SrcActivateTab3>", "TTOTAL_CMD")
    vim.map("g4", "<cm_SrcActivateTab4>", "TTOTAL_CMD")
    vim.map("g5", "<cm_SrcActivateTab5>", "TTOTAL_CMD")
    vim.map("g6", "<cm_SrcActivateTab6>", "TTOTAL_CMD")
    vim.map("g7", "<cm_SrcActivateTab7>", "TTOTAL_CMD")
    vim.map("g8", "<cm_SrcActivateTab8>", "TTOTAL_CMD")
    vim.map("g9", "<cm_SrcActivateTab9>", "TTOTAL_CMD")
    vim.map("g0", "<GoLastTab>", "TTOTAL_CMD")
    vim.map("sn", "<cm_SrcByName>", "TTOTAL_CMD")
    vim.map("se", "<cm_SrcByExt>", "TTOTAL_CMD")
    vim.map("ss", "<cm_SrcBySize>", "TTOTAL_CMD")
    vim.map("sd", "<cm_SrcByDateTime>", "TTOTAL_CMD")
    vim.map("sr", "<cm_SrcNegOrder>", "TTOTAL_CMD")
    vim.map("s1", "<cm_SrcSortByCol1>", "TTOTAL_CMD")
    vim.map("s2", "<cm_SrcSortByCol2>", "TTOTAL_CMD")
    vim.map("s3", "<cm_SrcSortByCol3>", "TTOTAL_CMD")
    vim.map("s4", "<cm_SrcSortByCol4>", "TTOTAL_CMD")
    vim.map("s5", "<cm_SrcSortByCol5>", "TTOTAL_CMD")
    vim.map("s6", "<cm_SrcSortByCol6>", "TTOTAL_CMD")
    vim.map("s7", "<cm_SrcSortByCol7>", "TTOTAL_CMD")
    vim.map("s8", "<cm_SrcSortByCol8>", "TTOTAL_CMD")
    vim.map("s9", "<cm_SrcSortByCol9>", "TTOTAL_CMD")
    vim.map("s0", "<cm_SrcUnsorted>", "TTOTAL_CMD")
    vim.map("v", "<cm_SrcCustomViewMenu>", "TTOTAL_CMD")
    vim.map("Vb", "<cm_VisButtonbar>", "TTOTAL_CMD")
    vim.map("Vd", "<cm_VisDriveButtons>", "TTOTAL_CMD")
    vim.map("Vo", "<cm_VisTwoDriveButtons>", "TTOTAL_CMD")
    vim.map("Vr", "<cm_VisDriveCombo>", "TTOTAL_CMD")
    vim.map("Vc", "<cm_VisDriveCombo>", "TTOTAL_CMD")
    vim.map("Vt", "<cm_VisTabHeader>", "TTOTAL_CMD")
    vim.map("Vs", "<cm_VisStatusbar>", "TTOTAL_CMD")
    vim.map("Vn", "<cm_VisCmdLine>", "TTOTAL_CMD")
    vim.map("Vf", "<cm_VisKeyButtons>", "TTOTAL_CMD")
    vim.map("Vw", "<cm_VisDirTabs>", "TTOTAL_CMD")
    vim.map("Ve", "<cm_CommandBrowser>", "TTOTAL_CMD")
    vim.map("zz", "<Toggle_50_100Percent>", "TTOTAL_CMD")
    vim.map("zi", "<WinMaxLeft>", "TTOTAL_CMD")
    vim.map("zo", "<WinMaxRight>", "TTOTAL_CMD")
    vim.map("zt", "<AlwayOnTop>", "TTOTAL_CMD")
    vim.map("zn", "<cm_Minimize>", "TTOTAL_CMD")
    vim.map("zm", "<cm_Maximize>", "TTOTAL_CMD")
    vim.map("zr", "<cm_Restore>", "TTOTAL_CMD")
    vim.map("zv", "<cm_VerticalPanels>", "TTOTAL_CMD")
    vim.map("zv", "<cm_VerticalPanels>", "TTOTAL_CMD")
    vim.map(".", "<Repeat>", "TTOTAL_CMD")

    vim.BeforeActionDo("TC_BeforeActionDo", "TTOTAL_CMD")

    /*
    ;vim.map("zs", "<TransParent>", "TTOTAL_CMD")
    KeyList := vim.listKey("TTOTAL_CMD")
    GUI, Add, ListView, w300 h500, a
    Loop, Parse, KeyList, `n
    {
        LV_Add("", A_LoopField)
    }
    GUI, Show , w310 h510
    */
    ;; 默认按键完
    ReadNewFile()
