Comments (4)
Hmmmm. Several terminals for sniprun output seems like a huge waste of space at first glance. Especially when you have splits, and on smaller (laptop) screens, I don't think more 'terminal' output buffers is a good solution.
However, I agree that sniprun's term buffer closes annoyingly often.
I'd favor a 'simpler' solution: a setting (possible enabled by default) would inhibit the BufWinLeave autocommand. A single output buffer would still be shared between all splits/buffers and should not close on one of them BufWinLeave'ing or help buffers closing.
Sniprun term buffer could still be closed with :q
or :SnipClose
You're welcome to implement this change if you want to, but I'll probably do it anyway in a couple days if not since I convinced myself that it's a good idea
from sniprun.
Will be included in 1.3.2 release through #231
from sniprun.
It's caused by vim.cmd("autocmd VimLeave,QuitPre,BufWinLeave ?* call Sniprun_close_term_on_leave()")
. The autocmd runs on every window close.
Currently all buffer share the same output terminal buffer. I'm considering to create output terminal per buffer calling Sniprun, basic idea like:
- document buffer has one-to-one relation with output terminal
VimLeave
would stay as global autocmd, as we want output windows to be closed before vim quitting.QuitPre, BufWinLeave
would be buffer-local autocmd, which is bound to the document buffer. It's set-up on first run ofSniprun
in current buffer. Whenever the doc buffer close, its output term would also close, but other doc buffers and output terms stay intact.
@michaelb Do you think this change is acceptable? I can create a PR.
from sniprun.
@michaelb Yes multiple output windows could be less nice on small screens. Your solution should be good enough. I'm focusing something else and won't check on this soon.
from sniprun.
Related Issues (20)
- Wrong cache directory path on linux HOT 1
- Wiki pages not working (404) HOT 2
- Check Health Deprecation HOT 1
- SnipRun failed to build in go, if last line is comment.. HOT 1
- add feature can auto add nested local package's function in go . HOT 3
- go file cant process dot import. HOT 2
- api.run_string cant work as expected. HOT 8
- Add a pre process goimports for golang project before really run_string. HOT 3
- Releases contain un-updated `Cargo.lock` file HOT 10
- Releases contain un-updated `Cargo.lock` file HOT 2
- Option to open Terminal in horizontal split HOT 2
- SnipRun is not working on markdown .md files on MacOS HOT 2
- Python3_jupyter not working HOT 3
- Bun Repl HOT 4
- [FEATURE] Explicit configuration for binaries HOT 3
- Error detected while processing function SnipRunLauncher HOT 6
- C+OpenGL ERROR HOT 1
- No Neorg support anymore? HOT 7
- Cpp Compile-Time Error HOT 2
- How to run the entire current file? HOT 4
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 sniprun.