Replies: 1 comment 1 reply
-
It will be cool to have a xontrib with all of this e.g. based on https://github.com/xonsh/xontrib-template. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering what keybindings you are all using. I'm trying to be more conscious about my workflows on the command line, and how the possibilities that prompt toolkit gives us can make them more fluent. There are already are some nice defaults compared to other shells (like no strange stuff being inserted on pressing C-Arrow, or DEL), but there is still room for improvement.
My example is an expansion on the idea of plugin for other shells that allows you to add "sudo " to the front of the current line:
C-O
, followed by a number deletes that many words from the start of the line,C-O O
deletes one word.C-O C-O
deletes one word at the start, inserts a space at the beginning, then moves the cursor there, then you can correct a typo in the program you wanted to call, or invoke e.g. a different editor with the same set of files.C-O f
changesstuff
tof"{stuff}"
as a helper for printing out python variables inside xonshC-O u
insertssudo
at the start.When I experiment with small helper programs I tend to want to try them out in my main environment instead of a jail or VM, so often I wonder how/where an executable comes from. Hence why I use
which some-executable
often. My package manager (FreeBSD's pkg) provides its ownpkg which some-path
subcommand that tells me which package installed a certain file. That's what the last two keybindingsC-O w
andC-O W
help with.I'm looking forward to hearing some more ideas you have come up with :)
Beta Was this translation helpful? Give feedback.
All reactions