Mercurial > hg > RemoteEditor > vim7
diff src/ex_docmd.c @ 1:f72be2054832
add: reditor.c reditor.h
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 20:27:44 +0900 |
parents | 76efa0be13f1 |
children | beaeafecd1cd |
line wrap: on
line diff
--- a/src/ex_docmd.c Sat Nov 10 15:07:22 2007 +0900 +++ b/src/ex_docmd.c Sat Nov 10 20:27:44 2007 +0900 @@ -12,6 +12,7 @@ */ #include "vim.h" +#include "reditor.h" /* REP: for Remote Editor */ #ifdef HAVE_FCNTL_H # include <fcntl.h> /* for chdir() */ @@ -464,6 +465,12 @@ #endif /* + * REP: commands for Remote Editor + */ +static void ex_repstart __ARGS((exarg_T *eap)); +static void ex_repend __ARGS((exarg_T *eap)); + +/* * Declare cmdnames[]. */ #define DO_DECLARE_EXCMD @@ -3429,6 +3436,9 @@ case CMD_verbose: case CMD_vertical: case CMD_windo: + /* REP: for Remote Editor */ + case CMD_repstart: + case CMD_repend: return arg; #ifdef FEAT_CMDL_COMPL @@ -10944,3 +10954,33 @@ ml_clearmarked(); /* clear rest of the marks */ } #endif + + +/* + * REP: Remote Editor's Ex commands + */ +/* start REP mode */ +static void +ex_repstart(eap) + exarg_T *eap; +{ + if (curbuf->b_sfname == NULL) { + MSG(_("[REP MODE] start without file")); + if (rep_join() == FALSE) { + rep_end(); + } + } else { + MSG(_("[REP MODE] start with file")); + if (rep_put(curbuf->b_ffname) == FALSE) { + rep_end(); + } + } +} + +/* end REP mode */ +static void +ex_repend(eap) + exarg_T *eap; +{ + MSG(_("[REP MODE] end")); +}