top | item 45350107

(no title)

jrop | 5 months ago

I've been keeping an eye on this in the hopes that text-reflow (edit: including for scrollback) could be solved in Neovim-based terminals [1]. I'm loving the innovation Ghostty is bringing to the terminal space.

1. https://github.com/neovim/neovim/issues/33155

discuss

order

jez|5 months ago

Do you consider yourself a neovim terminal power user?

I tried a while back to invert my workflow (from tmux driving neovim to neovim driving terminals) because I thought it might be easier to only ever have one buffer open for a given file, instead of attempting to open a file in a given pane only to realize that it's already open in a different neovim instance in a different pane.

When I was testing that stuff out I don't think I noticed particular issues with text reflow that would benefit from being solved by swapping to libghostty, rather my pain points were just about how to adjust to the different paradigm. I'd be curious to hear more about someone who is all in on Neovim embedded terminals (and possibly how libghostty might make it better).

c-hendricks|5 months ago

I'm all in on Neovim terminals, having a remote development setup means it keeps my terminal with my neovim window (I use nvim-qt).

Also not sure how ghostty would help, haven't noticed text reflowing issues.

It's not bad, a little awkward getting used to:

- you might want a plugin to give you a "persistent" terminal across all tabs

- I still haven't found a way to clear scroll back while a command is running

- I had to set up mappings for easier exiting terminal mode (c-\ c-n really sucks)

- I had to set up events so whenever a terminal buffer is focused it immediately enters insert mode. While I love vim, I've never wanted modal editing in a terminal

jrop|5 months ago

I do indeed live in the terminal (all day due to work), but tmux adds too much value for me to do all terminal management in Neovim (tmux session-management being what I use most). I've just encountered too many visual "glitches" in the Neovim terminal to rely on it for everything. That's not to say, however, that I never use the built-in Neovim :terminal.

> I thought it might be easier to only ever have one buffer open for a given file, instead of attempting to open a file in a given pane only to realize that it's already open in a different neovim instance

This is not a problem in my config:

    vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter', 'CursorHold' }, {
      pattern = '\*',
      command = 'silent! checktime',
    })
Since `'autoread'` is by default `on` in Neovim, this seamlessly reloads the buffer if the underlying file has been updated on disk.