Comments (3)
Hello,
That sounds like a pretty cool workflow!
You'll need to use bracketed paste to get this working:
- Send
\cc
to clear euporie's input box before sending anything - Send
\x1b[200~
before your code; - Send your code;
- Send
\x1b[201~
after your code; - Send
\x1b[13;5u
to run the code (Ctrl-Enter).
\x1b[13;5u
will always run whatever is entered, whereas \r
will only run what is entered if it passes the kernel's code-completeness check.
For example:
kitty @ send-text --all --exclude-active '\cc\x1b[200~print(123)\nprint(456)\x1b[201~\x1b[13;5u'
I hope that you get it working!
from euporie.
Thanks for the tip about bracketed paste! that works great.
You seem pretty knowledgeable so can I ask, is there a good utility/library for converting keypresses into those csi/escape codes? or somewhere to learn all the details necessary to make one myself?
from euporie.
The VT100 user guide always makes a nice bit of light reading:
https://vt100.net/docs/vt100-ug/chapter3.html#S3.3
There's also a wikipedia page on control-codes which might be a bit more accessible:
https://en.wikipedia.org/wiki/C0_and_C1_control_codes
You might want to read the wikipedia page on ansi escape sequences first for a bit of background:
https://en.wikipedia.org/wiki/ANSI_escape_code#Fe_Escape_sequences
Here's a couple of pages on modern terminal keyboard input:
http://www.leonerd.org.uk/hacks/fixterms/
https://sw.kovidgoyal.net/kitty/keyboard-protocol/
If you run stty raw -echo; cat -v
, your terminal will print escaped key-press escape sequences.
from euporie.
Related Issues (20)
- ImportError: cannot import name '_PosixFlavour' from 'pathlib' HOT 2
- Unable to display Latex on foot terminal HOT 7
- Autoformat is not working HOT 2
- Graphics rendering bugs HOT 1
- Latex printing from sympy shows `\displaystyle` and doesn't print using graphics HOT 1
- Custom keybindings for `euporie.notebook.tabs.notebook.Notebook` are not detected
- Scrolling through outputs with keyboard? HOT 3
- euproie makes ptpython not runnable due to an AssertionError HOT 2
- Euporie crashes upon loading notebook HOT 1
- "command" to go to a specific cell (by cell number and line number) HOT 3
- Not detecting kitty image support on Mac, falls back to ANSI HOT 2
- markdonw-it-py version conflict HOT 2
- Love this but it's not working
- Scrolling past top in vim normal mode replaces text HOT 2
- Hover widget displays filenames twice HOT 1
- Installation issues HOT 3
- Non-default color schemes obscure terminal graphics (e.g., Matplotlib plots) in Notebook HOT 3
- Doesn't start HOT 9
- Running `^[` in the console prints a `KeyError` HOT 1
- Error in console HOT 1
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 euporie.