guns / vim-sexp

Precision Editing for S-expressions
MIT License
612 stars 33 forks source link

Flow movements #23

Closed bpstahlman closed 7 years ago

bpstahlman commented 7 years ago

Synopsis Adds commands for moving in and out of lists in a way that's not possible with vim-sexp's other movement commands. Something like Paredit's up/down list commands, but with a traversal paradigm inspired by the Emacs Lispy package's "flow" command.

Motivation Although vim-sexp already provides commands for moving forward and backward within a list, sometimes you want to "escape" from the current list, or descend into a child list. The added commands are called "flow commands" because they permit you to flow freely in and out of lists. In fact, it is possible to use an unbroken sequence of flow commands to move all the way from one end of the buffer to the other. Flow commands fall into 2 basic categories:

  1. List Land only on brackets. There are 4 variants, differentiated by both the direction moved in the buffer, and the type of bracket landed on (open or close).

  2. Leaf Land only on leaf (non-list) elements (atoms, strings, comments)

See doc/vim-sexp.txt for details and examples...

guns commented 7 years ago

Impressive changes. Now that this is implemented, I can see the ergonomic benefits.

bpstahlman commented 7 years ago

Thanks!

On Mon, May 15, 2017 at 11:25 AM, Sung Pae notifications@github.com wrote:

Impressive changes. Now that this is implemented, I can see the ergonomic benefits.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/guns/vim-sexp/pull/23#issuecomment-301527702, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7pQDRIX-stdCFpigw4r5ROJw6W-B6Eks5r6HyFgaJpZM4Nadh9 .