Port more next/previous motions from vim

They are:

]m, [m
  Jump to next/previous beginning of method/function.
]M, [M
  Jump to next/previous end of method/function
]#, [#
  Jump to next/previous preprocessor directive (only supports C-style
  directives for now)
]*, [* (or ]\, [\)
  Jump to next/previous comment
This commit is contained in:
Henrik Lissner 2019-06-17 12:37:19 +02:00
parent 61502d7e31
commit 855ff34e2c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 86 additions and 1 deletions

View file

@ -7,6 +7,11 @@
"If non-nil, the o/O keys will continue comment lines if the point is on a
line with a linewise comment.")
(defvar +evil-preprocessor-regexp "^\\s-*#[a-zA-Z0-9_]"
"The regexp used by `+evil/next-preproc-directive' and
`+evil/previous-preproc-directive' on ]# and [#, to jump between preprocessor
directives. By default, this only recognizes C directives.")
;; Set these defaults before `evil'; use `defvar' so they can be changed prior
;; to loading.
(defvar evil-want-C-i-jump (or (daemonp) (display-graphic-p)))