Closed alexzanderr closed 2 years ago
I don't think so, but can't you just prefix the command you run with a let
that sets up the variable the way you want it for the following command?
hmm. interesting idea
another question (related): i saw that vimux always vertically split to the right side, is there a way to specify that i want to split the new pane to left?
or this is about tmux; tmux by default vertically splits to right?
well i found the command that split to left:
tmux split-window -hb "zsh"
but how to i specify that to vimux?
You should be able to use g:VimuxOpenExtraArgs
to add things to the split-window command that Vimux runs. Also consider if you want that much manual control over your panes you can manage them yourself and use g:VimuxUseNearest
and/or g::VimuxRunnerName
or similar to just use the splits you have manually setup.
well i found the command that split to left:
tmux split-window -hb "zsh"
but how to i specify that to vimux?
to achieve this you must go to /plugged/vimux/plugin/vimux.vim
and edit line 101
:
- call VimuxTmux('split-window '.s:vimuxPaneOptions().' '.extraArguments)
+ call VimuxTmux('split-window -b '.s:vimuxPaneOptions().' '.extraArguments)
-b
means that tmux will split new created pane to left
g:VimuxOpenExtraArgs
so if I set g:VimuxOpenExtraArgs = "-b"
i will achieve split to left?
g:VimuxOpenExtraArgs
so if I set
g:VimuxOpenExtraArgs = "-b"
i will achieve split to left?
okey. its working, very nice. this is very useful, so that i dont need to hard edit the plugin's code.
I don't think so, but can't you just prefix the command you run with a
let
that sets up the variable the way you want it for the following command?
it works. thanks.
here the code that i used:
function! s:code_runner_orientation_below()
if &modified == 1
w!
endif
if &filetype == "python"
let g:VimuxOrientation = "v"
let g:VimuxOpenExtraArgs = ""
call VimuxRunCommand("python3 " . getcwd() . "/" . expand('%:f'))
let g:VimuxOrientation = "h"
let g:VimuxOpenExtraArgs = "-b"
endif
endfunction
nnoremap <silent> <C-A-b> :call <SID>code_runner_orientation_below()<CR>
inoremap <silent> <C-A-b> <C-o>:call <SID>code_runner_orientation_below()<CR>
i know that there is a:
but is there a way to specifiy orientation as argument to the function
VimuxRunCommand
?because i want to map:
as you can see i put
orientation
just as filling.any ideas? thanks.