Comments (8)
I guess it could easily be supported as a plugin. I'm not sure if this is useful enough to be part of the core (I personally never used it).
I wish it is in core, I always use this. I missed this in kakoune and I had to manually copy out the region with lots of spaces in kakoune, bad experience.
from helix.
I'd like to see this added, I recommend using https://github.com/alacritty/copypasta since it also includes Wayland support.
Both yank and delete always use register::set
:
helix/helix-term/src/commands.rs
Line 1766 in 661dbdc
Which is a dumb hashmap with a lock right now:
helix/helix-core/src/register.rs
Line 9 in 661dbdc
I think we should special case certain registers inside set
/get
, in this case +
should interface with the clipboard instead of the map.
The register changing via "
(i.e. "+y
/"+p
) could be a command that uses on_next_key
to wait for the next key, then change the register on the context, similar to how count
is handled inside ui/editor.rs
(set_register
would have to be added to commands::Context
).
on_next_key example:
helix/helix-term/src/commands.rs
Lines 2265 to 2294 in 661dbdc
from helix.
If no one is working on that yet, I'll take it
EDIT: I gave a try
from helix.
Some discussion on the implementation: #119 (comment)
from helix.
We also discussed on matrix about not using registers, for example using commands (clipboard-yank
, clipboard-paste
), to handle pasting and yanking from system clipboard.
This approach is similar to emacs and kakoune.
idk if this helps inform anything but in kakoune i set
user y
as yank to clipboard anduser p
as paste from clipboard and am reasonably happy with that. it doesn't let me do fancy things like idk, copying to the clipboard from somewhere else and executing that as a macro, but i don't really find myself needing more functionality often
since kakoune lacks a+
register in the first place
especially since if you don't treat it as a register then you can make the semantics different from registers in the ways that they fundamentally differ
By ash from matrix (I don't know your GitHub ID)
from helix.
We also discussed on matrix about not using registers, for example using commands (clipboard-yank, clipboard-paste), to handle pasting and yanking from system clipboard.
I still think using registers is a cleaner approach. Because we have quite some keys that work with clipboard, like ctrl-r *
later if we want to paste from clipboard in insert mode.
from helix.
Could helix support OSC 52 as a simpler alternative? that is if we only care about yanking to the clipboard and not from it.
from helix.
I guess it could easily be supported as a plugin. I'm not sure if this is useful enough to be part of the core (I personally never used it).
from helix.
Related Issues (20)
- add adwaita light theme HOT 1
- Smart tab jump limit
- With multiple languages in a single file, comment type is static HOT 1
- Helix randomly starts in insert mode and delete first character HOT 2
- "Closest surrounding pair (tree-sitter)" not working anymore in git context HOT 3
- "file modified by an external process" is noisy HOT 2
- easiest "repeat last" HOT 1
- crash when opening repo with V3 pack files HOT 3
- Prefix new block comment lines with block comment character HOT 2
- Desktop entry missing HOT 1
- LSP errors disappear after file save and don't come back for a few seconds HOT 1
- add option to display syntax tree path in status line or enably sticky scroll HOT 2
- Yank relative/absolute path to a document HOT 1
- Ctr-v Past in Windows 11 HOT 1
- Remove '' and add ⟨⟩ autopairs in Lean HOT 3
- Visual selection issues.
- Unexpected behaviour while tabbing inside comments HOT 2
- Enabled whitespace rendering adds extra chars into urls HOT 1
- hx complains that theme can't be found HOT 1
- Panic Error in Python with Pyright/Pylsp & Ruff HOT 2
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 helix.