aboutsummaryrefslogtreecommitdiff
path: root/text-motions.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-08-01 19:46:48 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-08-02 00:13:51 +0200
commitdd3a6e2d9487c970fd007989833fc68a3261183a (patch)
tree621a03395217b0237b90afc2230b8a0b17583642 /text-motions.h
parent7c5c6581bca271f41c7ae3ac53107b89249a5fa9 (diff)
downloadvis-dd3a6e2d9487c970fd007989833fc68a3261183a.tar.gz
vis-dd3a6e2d9487c970fd007989833fc68a3261183a.tar.xz
vis: add motions [[, [], ][, ]]
They behave not like in vim, but instead try to find the start/end of C-like function definitions. The first character stands for the direction [ for backwards, ] for forwards. The second character denotes the start [ or end ] respectively.
Diffstat (limited to 'text-motions.h')
-rw-r--r--text-motions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/text-motions.h b/text-motions.h
index c89c256..ce3c5d5 100644
--- a/text-motions.h
+++ b/text-motions.h
@@ -43,6 +43,9 @@ size_t text_line_char_set(Text*, size_t pos, int count);
/* move to the next/previous character on the same line */
size_t text_line_char_next(Text*, size_t pos);
size_t text_line_char_prev(Text*, size_t pos);
+/* move to the next/previous empty line */
+size_t text_line_empty_next(Text*, size_t pos);
+size_t text_line_empty_prev(Text*, size_t pos);
/* move to same offset in previous/next line */
size_t text_line_up(Text*, size_t pos);
size_t text_line_down(Text*, size_t pos);
@@ -86,6 +89,11 @@ size_t text_sentence_prev(Text*, size_t pos);
*/
size_t text_paragraph_next(Text*, size_t pos);
size_t text_paragraph_prev(Text*, size_t pos);
+/* Find next/previous start/end of a C like function definition */
+size_t text_function_start_next(Text*, size_t pos);
+size_t text_function_start_prev(Text*, size_t pos);
+size_t text_function_end_next(Text*, size_t pos);
+size_t text_function_end_prev(Text*, size_t pos);
/* A section begins after a form-feed in the first column.
size_t text_section_next(Text*, size_t pos);
size_t text_section_prev(Text*, size_t pos);