Skip to content

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

@cleary

Description

@cleary

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions