Skip to content
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

Easier navigation of subforms #6

Open
jonathanj opened this issue Oct 6, 2014 · 2 comments
Open

Easier navigation of subforms #6

jonathanj opened this issue Oct 6, 2014 · 2 comments

Comments

@jonathanj
Copy link

I hope I'm not missing something obvious but navigating into (and out of) subforms seems to be more difficult than one would hope it would be in a Lisp. For example imagine the following Clojure code:

(defn some-function
  "Some
   docstring."
  [x]
  (if (= x 42)
    "That's the answer!"
    (str x " is not the answer")))

If the cursor is at |(defn (perhaps by way of using [[ or ]] to navigate) and one wanted to navigate into the function to add a parameter, for example but imagine introducing another let assignment, adjusting a condition, etc., how would one achieve this? Currently I believe you have to move the cursor into the form you wish to subnavigate and use the sibling motion keys but then of course this navigates elements and not forms.

@bpstahlman
Copy link
Collaborator

I believe you're missing the following from paredit:

paredit-forward-down
paredit-forward-up
paredit-backward-down
paredit-backward-up

I've pointed out the lack of these commands and several others in issue #5 .

@bpstahlman
Copy link
Collaborator

Something like vim-easymotion could definitely facilitate traversing levels until the aforementioned list navigation commands become available. In fact, for jumps of more than a level or two, I could even imagine easymotion being faster (though perhaps less aesthetically pleasing) than the corresponding paredit-like commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants