使用 Vim 编辑 SciTE |
|
-- Edit with Vim as an external editor of SciTE -- 2013.03.31 by lee.sheen at gmail dot com scite_Command { 'Edit with Vim|EditWithVim|Alt+Shift+V', } function CurrentLine () return editor:LineFromPosition(editor.CurrentPos) + 1 end function EditWithVim () local gvim_exe = 'C:/"Program Files"/Vim/vim73/gvim.exe' local cur_file_path = props['FilePath'] local current_line = CurrentLine() os.execute("start " .. gvim_exe .. " " .. cur_file_path .. " +" .. current_line) end
想法和建议:是否可以捕获 os.execute 的状态,并在 Vim 中的编辑工作完成后,SciTE 会自动重新打开文件(在 Vim 关闭后)?