home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / v / vim_src.zip / OPS.H < prev    next >
Text File  |  1993-01-12  |  2KB  |  67 lines

  1. /* vi:ts=4:sw=4
  2.  *
  3.  * VIM - Vi IMitation
  4.  *
  5.  * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  6.  *                            Tim Thompson            twitch!tjt
  7.  *                            Tony Andrews            onecom!wldrdg!tony 
  8.  *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  9.  */
  10.  
  11. /*
  12.  * ops.h: things shared between normal.c, cmdline.c and ops.c
  13.  */
  14.  
  15. /*
  16.  * Operators
  17.  */
  18. #define NOP     0                /* no pending operation */
  19. #define DELETE    1
  20. #define YANK    2
  21. #define CHANGE    3
  22. #define LSHIFT    4
  23. #define RSHIFT    5
  24. #define FILTER    6
  25. #define TILDE    7
  26. #define INDENT    8
  27. #define FORMAT    9
  28. #define COLON    10
  29. #define UPPER    11
  30. #define LOWER    12
  31.  
  32. /*
  33.  * operator characters; the order must correspond to the defines above
  34.  */
  35. EXTERN char *opchars INIT(= "dyc<>!~=V:uU");
  36.  
  37. /*
  38.  * When a cursor motion command is made, it is marked as being a character or
  39.  * line oriented motion. Then, if an operator is in effect, the operation
  40.  * becomes character or line oriented accordingly.
  41.  *
  42.  * Character motions are marked as being inclusive or not. Most char. motions
  43.  * are inclusive, but some (e.g. 'w') are not.
  44.  *
  45.  * Generally speaking, every command in normal() should either clear any pending
  46.  * operator (with CLEAROP), or set the motion type variable.
  47.  */
  48.  
  49. /*
  50.  * Motion types
  51.  */
  52. #define MBAD    (-1)            /* 'bad' motion type marks unusable yank buf */
  53. #define MCHAR    0
  54. #define MLINE    1
  55. #define MBLOCK    2
  56.  
  57. EXTERN int        operator INIT(= NOP);    /* current pending operator */
  58. EXTERN int        mtype;                    /* type of the current cursor motion */
  59. EXTERN int        mincl;                    /* true if char motion is inclusive */
  60. EXTERN int        oneless;                /* 1 if !mincl and startop != endop */
  61. EXTERN FPOS     startop;                /* cursor pos. at start of operator */
  62. EXTERN FPOS        endop;                    /* cursor pos. at end of operator */
  63. EXTERN colnr_t    startvcol;                /* start col for block mode operator */
  64. EXTERN colnr_t    endvcol;                /* end col for block mode operator */
  65. EXTERN long        nlines;                    /* lines between startop and endop + 1 */
  66. EXTERN int        yankbuffer INIT(= 0);    /* current yank buffer */
  67.