-
Notifications
You must be signed in to change notification settings - Fork 0
Description
thanks for this nice vterm/fish integration. I wanted to also have it open in an emacs buffer to edit when I use fish commands like M-v to edit the current line, or funced to edit a function. Just setting vf as EDITOR doesn't work with M-v for example as when the command returns it thinks you're done editing, and the command returns instantly as it's just telling emacs to open a new buffer, so I wanted a version that will block until the buffer is closed. What I did was make a script:
#!/usr/bin/env fish
vf $argv
inotifywait -e close_write (realpath "$argv")
and then set EDITOR to that, it needs to be a script rather than just a fish function as M-v will work with EDITOR as function but funced requires it to be a actual file. I'm new with both emacs and fish so I'm not really sure best way to implement this. My solution works but is hacky in that it doesn't handle the case of closing the buffer without modifying the file. Also it introduces a dependency on inotify-tools.