Open phlummox opened 3 years ago
If you want to use a custom swank startup command then you need to override g:slimv_swank_cmd
in your .vimrc
. It's not that complicated if you print the default swank startup command by executing this in vim:
:echo SlimvSwankCommand()
Then append the printed line into your .vimrc after let g:slimv_swank_cmd=
, and modify whatever you want in the command.
If you intend to use the same .vimrc
on different OSes then you can put this in some if
statements, e.g. if has('win64')
for checking Windows. If you want a different command for tmux then you can use if $TMUX != ''
.
I don't think there is a much better way than completely overriding g:slimv_swank_cmd
, because there are just so many ways you may want to modify the command, it's not simply adding a prefix of suffix to it. Even adding a suffix is tricky when considering that quite frequently the command is enclosed in double quotes because it is passed as an argument to another command.
Ah no worries. Yes, that's what I ended up doing (printing out the Swank command and editing it). Thanks for your help!
Apologies if there is a better forum for this. Is there an easy and recommended way of making tweaks to the command used to start up swank? For instance, if the default startup command is mostly fine, but I'd like to add something to it?
I see that there is
g:slimv_swank_cmd
, which lets you completely override the startup command, but I am thinking something more likeg:slimv_browser_cmd_suffix
, which just tweaks the command used to start the browser.My use case is, I'd like swank to use a different .sbclrc file than my main .sbclrc; that'd normally be done by passing "--userinit /path/to/my/alternative-sbclrc" to sbcl.
For me, one quick fix is, I can edit this line in
slimv.vim
and add in the command line argument I want, but obviously that will break if I use a different OS/use tmux etc. Is there a better way to do this?