Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g:tidal_paste_file is ignored for neovim/vim8 (using builtin terminal) #92

Open
cleary opened this issue Dec 17, 2023 · 0 comments
Open

Comments

@cleary
Copy link
Contributor

cleary commented Dec 17, 2023

I wanted to write my evals to a text file (using neovim), and found this handy feature had already been implemented... except it didn't work

Dug through the code, found it was implemented for tmux:

function! s:TmuxSend(config, text)
...
      call s:WritePasteFile(a:text)

But that is not called for neovim:

  function! s:TerminalSend(config, text)
    call s:TerminalOpen()
    if has('nvim')
      call jobsend(s:tidal_term_ghci, a:text . "\<CR>")
    elseif has('terminal')
      call term_sendkeys(s:tidal_term_ghci, a:text . "\<CR>")
    endif
  endfunction

Simply adding the line gets it working, but obviously that needs some var checking etc, so logging it as an issue rather than a pull request

  function! s:TerminalSend(config, text)
    call s:TerminalOpen()
    if has('nvim')
      call jobsend(s:tidal_term_ghci, a:text . "\<CR>")
+     call s:WritePasteFile(a:text)
    elseif has('terminal')
      call term_sendkeys(s:tidal_term_ghci, a:text . "\<CR>")
    endif
  endfunction
@cleary cleary changed the title g:tidal_paste_file is ignored for neovim built in term g:tidal_paste_file is ignored for neovim (using builtin terminal) Dec 17, 2023
@cleary cleary changed the title g:tidal_paste_file is ignored for neovim (using builtin terminal) g:tidal_paste_file is ignored for neovim/vim8 (using builtin terminal) Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant