The home of Mikael Jansson, hacker, hobby chef & adrenaline junkie based in Sweden. More…

Mikael Jansson.be » Hacking

Ticket #21 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

(,) to navigate, B,W to transpose

Reported by: mikael Owned by: mikael
Priority: minor Milestone: 0.3.4
Component: lisp mode Version: 0.3.3
Keywords: Cc:

Description (last modified by mikael) (diff)

Pressing ( at the following position:

(defun hello-world (who)
  (dotimes (n 10)
             ^ cursor
    (format t "Hey, ~A!~%" who)))

would move the cursor just to the right of first paren of the previous s-exp, i.e.:

(defun hello-world (who)
  (dotimes (n 10)
   ^ cursor
    (format t "Hey, ~A!~%" who)))

Similarly, ) at the same position would do this:

(defun hello-world (who)
  (dotimes (n 10)
    (format t "Hey, ~A!~%" who)))
     ^ cursor

Something like this:

:map ) /(<CR>:normal l<CR>
:map ( ?(<CR>?(<CR>:normal l<CR>

Won't work for ) if the character is placed at a paren, i.e. expand("<cWORD>")[0] == "/".

* W: transpose current s-exp with next.
* B: transpose current s-exp with previous.

Change History

Changed 2 years ago by mikael

  • status changed from new to accepted
  • description modified (diff)
  • summary changed from Map B/W to navigate through s-exps. to (,) to navigate, B,W to transpose

Changed 2 years ago by mikael

  • status changed from accepted to closed
  • resolution set to fixed

[326]: New bindings for

  • Move to previous/next s-exp '(,)'
  • Transpose current s-exp forward/backward '{,}'
Note: See TracTickets for help on using tickets.
'