Comments (5)
Hi there,
"easy way" … I don't think so, unless I've missed something. When we paste text to tmux, it just flushes it in the input buffer (as if you had typed it yourself)… but what happens (the feedback) is a result of whatever is running.
I can imagine doing a snapshot before, a snapshot after, and diff both -- taking that as the "result" of the command you just ran. I'm not sure how easy/hard that would be … or whether it would be useful at all.
In what context do you need to copy the result back in vim? (maybe there are other ways)
from vim-slime.
Ah I see, yeah there weren't any easy ways that came to my mind either.
I have a ipython session pane open alongside a vim pane in tmux, and I've gotten into the habit of pasting the results of snippets of python evaluations back into vim to remind me of how I developed a function (kind of like really lazy tdd).
Maybe wrapping the contents of what you send into tmux with a session (bash, ipython, ghci etc.) specific callback that sends the output back to tmux to give back to the vim pane? Does that sound like something that might work - I don't mind spending some time looking into this if you think it's plausible!
Eddie
from vim-slime.
You can feed and read back a command with the system(…)
function. If you do that, you need to feed enough context to run… it's a new process every time. I mean: feed the function and feed the invocation, both.
It's similar to what happens when you select a block of text and feed it to python:
print 1 + 2 # shift-v select, !python, => 3
from vim-slime.
Hmm do you think there might be a way to preserve the environment of the interpreter (e.g. previously defined variables etc.) between system
calls?
from vim-slime.
no, not really :-(
from vim-slime.
Related Issues (20)
- Cursor returns to the beginning of a selection when sending code from a script in one tmux pane to the terminal in the other terminal pane. HOT 8
- send to multiple panes HOT 2
- How to send <Ctrl-C> via tmux? HOT 2
- <C-c><Text object> HOT 2
- Option to change bracket paste delimiters HOT 4
- neovim tmux in msys2 in windows HOT 4
- Run vimscript commands interactively HOT 5
- Issue #23 returns HOT 1
- Can SlimeConfig apply to all vim buffers HOT 10
- slime_no_mappings works only if declaredbefore plugin is loaded HOT 1
- Naming convention inconsistency HOT 1
- kitty slime broken in kitty v0.32 HOT 5
- WezTerm Pane Direction ID has trailing whitespace
- Proposal for Changes to `autoload/slime.vim` HOT 6
- Additional 'return' required when sending indented, commented code to ipython HOT 3
- neovim target TermOpen autocmd interactions with other terminal buffers HOT 3
- working with ConqueTerm HOT 1
- Error raised after trigger send if there is no neovim terminal opened HOT 6
- Issue to send multiple lines with recent versions of vim-slime HOT 7
- "Undefined variable: g:slime_config_defaults" on opening Python files HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-slime.