Code Monkey home page Code Monkey logo

Comments (5)

jpalardy avatar jpalardy commented on August 27, 2024

The vim from which I run slime is usually not in a tmux. The terminal I use as a target is running tmux. As such, there's never confusion about where things go. I understand your case because I've run into that situation before. But +1, -1 or some other value is arbitrary.

The defaults are stored in b:slime_config:

{"socket_name": "default", "target_pane": ":"}

If you need to change those, you can probably do it on a hook.

Alternatively, there could be a global config variable to define those. What do you think?

from vim-slime.

MarcoPolo avatar MarcoPolo commented on August 27, 2024

I didn't realize you could use vim-slime like that, that explains the defaults. I'm not very familiar with vimscript, but isn't that the purpose of the b:slime_config? what if you let something like
"target_pane" : ":.+1" or "target_pane" : ":.-1"

then add/subtract appropriately when you send the data. as in a mini simple templating system. Then anyone can add the let b:slime_config... in their vimrc with their defaults easily.

from vim-slime.

jpalardy avatar jpalardy commented on August 27, 2024

You can set yourself a variable for the target_pane in your .vimrc:

let g:slime_config_target_pane = ":.+1"

And you would modify line 66 of the plugin like this:

let b:slime_config = {"socket_name": "default", "target_pane": g:slime_config_target_pane}

But if you're modifying the plugins, you might as well burn your default there.

from vim-slime.

MarcoPolo avatar MarcoPolo commented on August 27, 2024

I didn't realize the "target_pane" : ":.+1" or "target_pane" : ":.-1" already work! I just made that up as an example.

I ended up putting in my .vimrc:
let b:slime_config = {"socket_name": "default", "target_pane": ":.+1"}

and that defaults the target to the next pane from my current.

The .+1 and .-1 should be put in the docs so others know how to change the defaults to something possibly more useful.

I'll just close this issue, because it's a simple change :)

from vim-slime.

jpalardy avatar jpalardy commented on August 27, 2024

I didn't know it worked either :-)

I assumed your examples worked. I just tried it.

from vim-slime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.