daleeidd / natural-selection Goto Github PK
View Code? Open in Web Editor NEWFish shell plugin that makes selection as natural as a text editor.
License: GNU Lesser General Public License v3.0
Fish shell plugin that makes selection as natural as a text editor.
License: GNU Lesser General Public License v3.0
Fish version: 3.7.0
Natural Selection version: latest commit (2023-11-27)
Selecting multiple lines tries to execute the lines and gives an error.
After selecting 2 chars or more on the left:
test -z
because of the \n.I don't know fish enough. In the idea, it should be something like if test -z "$(commandline --current-selection)"
.
I don't know if other functions are affected by this.
I fixed this issue in:
fish-shell/fish-shell#3684
And it looks like regression was introduced here:
fish-shell/fish-shell#6329
Keybindings overlap between this plugin and https://github.com/jorgebucaran/autopair.fish. I'm trying to figure out if there's a trick to use them at the same time?
The following keybindings work.
bind -k sr '_natural_selection up-line --is-selecting' # shift + up
bind \e\[1\;2A '_natural_selection up-line --is-selecting'
bind -k sf '_natural_selection down-line --is-selecting' # shift + down
bind \e\[1\;2B '_natural_selection down-line --is-selecting'
Only Up / Down keys should end selection. The following does not work.
bind -k down '_natural_selection down-or-search'
bind \e\[B '_natural_selection down-or-search'
bind -k up '_natural_selection up-or-search'
bind \e\[A '_natural_selection up-or-search'
P.S. Default behavior of up and down is up-or-search and down-or-search respectively.
The docs say use fish add
to install the plugin but the idiomatic way to seems to fish install.
If I use the following binding then it selects all
bind \ca '_natural_selection beginning-of-buffer begin-selection end-of-buffer --is-selecting' # ctrl + a
However, when I use backspace or delete, it does not delete the selection.
What to do here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.