You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command expansion change made in #12527 has been an amazing change for people who love to integrate external tools into Helix.
However, I think command expansions could be 100x more powerful with just a few more additions.
Brainstorming,
%reg{<reg>} would expand into the text stored in <reg>. This would allow users to setup clipboard mirroring on Windows + Linux VM users. For example, rebinding y to yank to system clipboard, but also pipe the contents of " to win32yank.
%selected variable which would expand to the current selection. This would allow users to integrate common pipes like sort, bc or fmt into keybinds.
%workspace_dir variable would expand into the directory that helix was opened in. This would allow users to open file explorers like yazi in more sensible starting directories.
%focused_dir variable would expand into the directory that the current focused buffer is in, defaulting to %workspace_dir if in a scratch buffer. Another sensible starting directory for file explorers.
%git_root variable would expand into the directory holding the current file's .git folder. Other variables related to version control would help speed up a lot of workflows.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The command expansion change made in #12527 has been an amazing change for people who love to integrate external tools into Helix.
However, I think command expansions could be 100x more powerful with just a few more additions.
Brainstorming,
%reg{<reg>}
would expand into the text stored in<reg>
. This would allow users to setup clipboard mirroring on Windows + Linux VM users. For example, rebindingy
to yank to system clipboard, but also pipe the contents of"
towin32yank
.%selected
variable which would expand to the current selection. This would allow users to integrate common pipes likesort
,bc
orfmt
into keybinds.%workspace_dir
variable would expand into the directory that helix was opened in. This would allow users to open file explorers likeyazi
in more sensible starting directories.%focused_dir
variable would expand into the directory that the current focused buffer is in, defaulting to%workspace_dir
if in a scratch buffer. Another sensible starting directory for file explorers.%git_root
variable would expand into the directory holding the current file's.git
folder. Other variables related to version control would help speed up a lot of workflows.Continue on!
Beta Was this translation helpful? Give feedback.
All reactions