2017-07-05 12:23 GMT+03:00 Bram Moolenaar <[email protected]>: > > R0b0t1 wrote: > >> On Mon, Jul 3, 2017 at 7:50 AM, mattn <[email protected]> wrote: >> > On Monday, July 3, 2017 at 6:16:51 PM UTC+9, Bram Moolenaar wrote: >> >> Yasuhiro Matsumoto wrote: >> >> >> >> > I have implementation (but PoC/WIP) that works on Windows. >> >> > >> >> > https://qiita-image-store.s3.amazonaws.com/0/665/67e1a2e1-c2dc-847e-20b6-5b26a0f62b89.gif >> >> > >> >> > This is in vim/terminal branch in my repository. >> >> > >> >> > https://github.com/mattn/vim/tree/terminal >> >> >> >> Interesting. What kind of terminal does it pretend to be? With >> >> libvterm it's like an xterm. On MS-Windows commands expect to be >> >> running in a console, that is quite different. So only programs ported >> >> from Unix would run in libvterm. >> > >> > This is not terminal. This is gvim.exe (with guioptions= ). This doesn't >> > any external libraries. >> > >> >> Yes, but your terminal implementation must adhere to some standard. >> Most Unix derived virtual terminals use inline control characters to >> manipulate the state of the terminal. On Windows, a terminal is >> created by operating system code as a desktop window and doesn't >> implement a control code standard. As it always existed as some form >> of abstraction and never copied physical hardware, there is a set of >> system calls that interacts with the same code that creates a terminal >> as a desktop window.[1] >> >> This is what I was trying to point out when I mentioned Cygwin. The >> project may have merit (and I think it does) but it is far less useful >> for all Windows users of Vim based on assumptions that are being built >> into it. >> >> [1] You can make cmd.exe or powershell.exe interpret most VT control >> codes but this doesn't do anything for you if you need to make a >> Windows program run in a VT environment. > > We will have to let the user decide whether to open a terminal emulator > in a Vim window, in which it's possible to run Vim and perhaps gdb, or a > Windows console, which can do anything. But it won't be in a Vim window > (I believe that is impossible, unless we fake it by positioning the > console on top of Vim). We already have this code for the GUI.
If I am not mistaking, winpty is a thing which makes it possible: quoting winpty README > The software works by starting the winpty-agent.exe process with a new, > hidden console window, which bridges between the console API and terminal > input/output escape codes. It polls the hidden console's screen buffer for > changes and generates a corresponding stream of output. > > The important part is that the commands and functions we add to Vim for > terminal support work on Unix, Mac and Windows, even when it works a > little bit differently. > > -- > hundred-and-one symptoms of being an internet addict: > 106. When told to "go to your room" you inform your parents that you > can't...because you were kicked out and banned. > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org /// > \\\ help me help AIDS victims -- http://ICCF-Holland.org /// > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
