jez / vim-better-sml

:tada: Enjoy writing SML within Vim
https://blog.jez.io/sml-dev-setup/
104 stars 10 forks source link

[Feature] Vim 8 terminal buffer backend for the REPL #18

Open Skyb0rg007 opened 1 year ago

Skyb0rg007 commented 1 year ago

This pull request adds a Vim 8 backend for the terminal repl. It uses term_start and term_sendkeys to implement this.

I'm not sure if this is also an issue for Neovim, but the "switching back to the original window" logic needs to use window id, not window number, since window number changes when opening windows. This PR uses win_getid and win_id2win, and if this is an issue with Neovim as well I can update that logic as well.

I also removed the setting of textwidth and shiftwidth from the indent file, since that setting overrides a user's after/ftplugin/sml.vim file, which should be prioritized over the plugins' settings. However this may also be me misunderstanding how Vim loads files.