Skip to content

Commit

Permalink
Add new function to navigate tag-lists (#5)
Browse files Browse the repository at this point in the history
- navigate next sibling or parent
  • Loading branch information
jtkDvlp authored Dec 14, 2018
1 parent 8b8ac07 commit e9cc213
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web-mode-edit-element-elements.el
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@

(not (= parent-position tag-next-position))))

(defun web-mode-edit-element-elements-sibling-next-or-parent ()
(interactive)
(if (web-mode-edit-element-elements-sibling-next-p)
(web-mode-element-sibling-next)
(web-mode-element-parent)))

;; Parent
(defun web-mode-edit-element-elements-parent-p ()
(save-excursion
Expand Down

1 comment on commit e9cc213

@fniessen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear, I've changed it to:

(defun web-mode-edit-element-elements-sibling-next-or-next-parent ()
  (interactive)
  (if (web-mode-edit-element-elements-sibling-next-p)
      (web-mode-element-sibling-next)
    (web-mode-element-parent)
    (web-mode-element-sibling-next)))

to better clone IDEA's behavior.

Thanks a lot for this!

Please sign in to comment.