Skip to content

Ensure proper directory with Vimux #802

@jpwallace22

Description

@jpwallace22

Not sure if this is a bug, or a feature request, but when using the vimux strategy with a terminal pane already open, it will use the open pane instead of creating a new one. That's great, I like that. However, if it's not also in the same directory, it will just fail instead of switching directories.

Is it possible to ensure the pane is in the correct directory? Something like:

autoload/test/strategy.vim

function! test#strategy#vimux(cmd) abort
  if exists('g:test#preserve_screen') && !g:test#preserve_screen
    " cd to current working directory 
    call VimuxClearTerminalScreen()
    call VimuxClearRunnerHistory()
    call VimuxRunCommand(s:command(a:cmd))
  else
    call VimuxRunCommand(s:pretty_command(a:cmd))
  endif
endfunction

Thanks a bunch!

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