neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

ops.h (2428B)


      1 #pragma once
      2 
      3 #include <stdbool.h>
      4 #include <stddef.h>
      5 
      6 #include "nvim/api/private/defs.h"
      7 #include "nvim/ascii_defs.h"
      8 #include "nvim/ex_cmds_defs.h"  // IWYU pragma: keep
      9 #include "nvim/extmark_defs.h"  // IWYU pragma: keep
     10 #include "nvim/macros_defs.h"
     11 #include "nvim/normal_defs.h"
     12 #include "nvim/option_defs.h"  // IWYU pragma: keep
     13 #include "nvim/os/time_defs.h"
     14 #include "nvim/pos_defs.h"
     15 #include "nvim/register_defs.h"
     16 #include "nvim/types_defs.h"
     17 
     18 /// Operator IDs; The order must correspond to opchars[] in ops.c!
     19 enum {
     20  OP_NOP          = 0,   ///< no pending operation
     21  OP_DELETE       = 1,   ///< "d"  delete operator
     22  OP_YANK         = 2,   ///< "y"  yank operator
     23  OP_CHANGE       = 3,   ///< "c"  change operator
     24  OP_LSHIFT       = 4,   ///< "<"  left shift operator
     25  OP_RSHIFT       = 5,   ///< ">"  right shift operator
     26  OP_FILTER       = 6,   ///< "!"  filter operator
     27  OP_TILDE        = 7,   ///< "g~" switch case operator
     28  OP_INDENT       = 8,   ///< "="  indent operator
     29  OP_FORMAT       = 9,   ///< "gq" format operator
     30  OP_COLON        = 10,  ///< ":"  colon operator
     31  OP_UPPER        = 11,  ///< "gU" make upper case operator
     32  OP_LOWER        = 12,  ///< "gu" make lower case operator
     33  OP_JOIN         = 13,  ///< "J"  join operator, only for Visual mode
     34  OP_JOIN_NS      = 14,  ///< "gJ"  join operator, only for Visual mode
     35  OP_ROT13        = 15,  ///< "g?" rot-13 encoding
     36  OP_REPLACE      = 16,  ///< "r"  replace chars, only for Visual mode
     37  OP_INSERT       = 17,  ///< "I"  Insert column, only for Visual mode
     38  OP_APPEND       = 18,  ///< "A"  Append column, only for Visual mode
     39  OP_FOLD         = 19,  ///< "zf" define a fold
     40  OP_FOLDOPEN     = 20,  ///< "zo" open folds
     41  OP_FOLDOPENREC  = 21,  ///< "zO" open folds recursively
     42  OP_FOLDCLOSE    = 22,  ///< "zc" close folds
     43  OP_FOLDCLOSEREC = 23,  ///< "zC" close folds recursively
     44  OP_FOLDDEL      = 24,  ///< "zd" delete folds
     45  OP_FOLDDELREC   = 25,  ///< "zD" delete folds recursively
     46  OP_FORMAT2      = 26,  ///< "gw" format operator, keeps cursor pos
     47  OP_FUNCTION     = 27,  ///< "g@" call 'operatorfunc'
     48  OP_NR_ADD       = 28,  ///< "<C-A>" Add to the number or alphabetic character
     49  OP_NR_SUB       = 29,  ///< "<C-X>" Subtract from the number or alphabetic character
     50 };
     51 
     52 #include "ops.h.generated.h"
     53 #include "ops.h.inline.generated.h"
     54 
     55 EXTERN LuaRef repeat_luaref INIT( = LUA_NOREF);  ///< LuaRef for "."