Created
January 28, 2017 17:53
-
-
Save danr/8be81b1680cfd545c225d21a886ce4f1 to your computer and use it in GitHub Desktop.
Move around dodging empty lines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nonempty -params 1 %{ | |
exec -no-hooks %arg{1} | |
try %{ | |
exec -no-hooks -draft \;Gg<a-k>(\n.*){3}<ret> | |
exec -no-hooks -draft \;Ge<a-k>(\n.*){3}<ret> | |
exec -no-hooks -draft \;<a-x><a-k>\A[\n]\Z<ret> | |
nonempty %arg{1} | |
} | |
} | |
map global normal j ':nonempty j<ret>' | |
map global normal k ':nonempty k<ret>' | |
map global normal J ':nonempty J<ret>' | |
map global normal K ':nonempty K<ret>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment