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)
- Order files by names when searching in the file picker. HOT 1
- JSON schema for config files HOT 1
- :q (quit) command unexpected behaviour (unsaved buffer) with auto-save by delay HOT 1
- Incorrect syntax highlighting with CRLF line endings HOT 1
- Honor whitespace escape sequences in `yank-join` HOT 4
- Add ability to update the window title HOT 2
- Using the built-in emmet tools in vue-language-server
- Markdoc default LSP should be changed from deprecated to official version HOT 1
- Misalignement in the diagnostic picker HOT 2
- Running command/script with sudo inside `:sh` HOT 1
- Completion replace not fully replacing when in macro string literal HOT 1
- Dim effect not working on WezTerm
- Ubuntu 24.03 snap package - :w causes file sort HOT 2
- Swap the "<space>f" and <space>F" bindings HOT 1
- The `move` command should request conformation before overriding
- Add option to disable sorting for file picker
- (config help) Swap the "<space>f" and <space>F" bindings HOT 3
- Using :w as shortcut in insert mode leaves buffer with unsaved marker
- Using `diff` in gutters twice makes Helix get stuck
- swapping the space (f and F) keys, provide unexpected behavior.
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.