-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to select lines up? #1285
Comments
That's the proper way. |
@lenormf, you have said that you generally dont select upward, rly? I select upward all the time, with the same frequency as downward. And who is using current behavior of
|
def -hidden -params 1 extend-line-down %{
exec "<a-:>%arg{1}X"
} def -hidden -params 1 extend-line-up %{
exec "<a-:><a-;>%arg{1}K<a-x>"
} map global normal x ":extend-line-down %val{count}<ret>" map global normal X ":extend-line-up %val{count}<ret>" |
@alexherbo2 nice, you have made my day, kudos) |
@alexherbo2 I have another one insane idea: made |
def -hidden select-next-word %{
exec /[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
} def -hidden extend-next-word %{
exec ?[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
} map global normal w :select-next-word<ret> map global normal W :extend-next-word<ret> |
@alexherbo2 , ahahahhh, you genius)) ❤️ |
@alexherbo2 , I think your answers must be in wiki |
Yep can you add them? :p |
I put it in How to |
@alexherbo2 , finally I have tried your scripts))
but there is error: if lines are containing only newlines - it will select up and down simultaneously, can you help me with that?
|
try %{
exec <a-K>\n<ret>
exec <a-x><a-:><a-\;>
} catch %{
exec <a-:><a-\;>K<a-x>
} |
Is that what you mean? I mean like in this video, if I am on new line it will select in both directions. This snippet is working the same( |
I updated the command |
Wow, awesome, I have got it, its beautiful |
You have forgotten count))) |
def -params 1 extend-line-down %{
exec "<a-:>%arg{1}X"
} def -params 1 extend-line-up %{
exec "<a-:><a-;>%arg{1}K<a-;>"
try %{
exec -draft ';<a-K>\n<ret>'
exec X
}
exec '<a-;><a-X>'
} map global normal x ':extend-line-down %val{count}<ret>' map global normal X ':extend-line-up %val{count}<ret>' |
this should be the default mapping! |
Hi there 👋 I just finished an initial version of a plugin I'm calling https://github.com/evanrelf/expand-line.kak
There may be certain edge cases I haven't discovered yet, but in my initial testing and development it's worked great. Feel free to report issues if you run into any. |
In order to select 3 lines down one shold do
3X
, how to do the same in up direction?2K<a-x>
? Too much keysThe text was updated successfully, but these errors were encountered: