nvim-ipy icon indicating copy to clipboard operation
nvim-ipy copied to clipboard

Execution status and time info on buffer status bar

Open rsdenijs opened this issue 10 years ago • 3 comments

It was annoying me that there was apparently no visual indication as to whether a command is executing. Similar to Jupyter Notebooks, i added a [*] to the buffer name when it is executed, together with the time when the command was sent. It also displays the elapsed time when the command is finished.

rsdenijs avatar Oct 02 '15 23:10 rsdenijs

Rather than changing the buffer name, which is kinda a hack and not flexible, it is better to expose variables (and callbacks if needed) to let the info be shown e.g. in titlestring or statusline, per users configuration. There already is g:ipy_status which will be "idle" or "busy" accordingly, even for commands initiated on another client. (not documented, I know). For instance, I use set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)%(\ -\ %{g:ipy_status}%)\ -\ NVIM in my nvimrc.

bfredl avatar Oct 03 '15 09:10 bfredl

I agree it is not a clean solution, and probably the buffer name is not the right place to put the information. Regarding the positioning, i think the natural place for the status is the buffer, not the terminal window name, although having it in the title does allow me to know do some other work while the code is running.

rsdenijs avatar Oct 03 '15 12:10 rsdenijs

True, that was an example, g:ipy_status could just as well be put in the statusline. Maybe this plugin should integrate with airline or similar per default if its not too tricky.

bfredl avatar Oct 03 '15 13:10 bfredl