getchar.h
Go to the documentation of this file.
1 #ifndef NVIM_GETCHAR_H
2 #define NVIM_GETCHAR_H
3 
4 #include "nvim/os/fileio.h"
5 #include "nvim/types.h"
6 #include "nvim/buffer_defs.h"
7 #include "nvim/ex_cmds_defs.h"
8 #include "nvim/vim.h"
9 
13 enum {
14  REMAP_YES = 0,
15  REMAP_NONE = -1,
16  REMAP_SCRIPT = -2,
17  REMAP_SKIP = -3,
18 } RemapValues;
19 
20 // Argument for flush_buffers().
21 typedef enum {
23  FLUSH_TYPEAHEAD, // flush current typebuf contents
24  FLUSH_INPUT // flush typebuf and inchar() input
26 
34 struct map_arguments {
35  bool buffer;
36  bool expr;
37  bool noremap;
38  bool nowait;
39  bool script;
40  bool silent;
41  bool unique;
42 
49  size_t lhs_len;
50 
52  size_t rhs_len;
53  bool rhs_is_noop;
54 
56  size_t orig_rhs_len;
57 };
58 typedef struct map_arguments MapArguments;
59 
60 #define KEYLEN_PART_KEY -1 /* keylen value for incomplete key-code */
61 #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */
62 #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */
63 
65 enum { NSCRIPT = 15 };
66 
69 
70 #ifdef INCLUDE_GENERATED_DECLARATIONS
71 # include "getchar.h.generated.h"
72 #endif
73 #endif // NVIM_GETCHAR_H
char_u lhs[MAXMAPLEN+1]
Definition: getchar.h:48
Remap script-local mappings only.
Definition: getchar.h:16
bool nowait
Definition: getchar.h:38
bool unique
Definition: getchar.h:41
Definition: getchar.h:34
enum @27 RemapValues
No remapping for first char.
Definition: getchar.h:17
Definition: getchar.h:65
Structure used to read from/write to file.
Definition: fileio.h:11
bool rhs_is_noop
Definition: getchar.h:53
No remapping.
Definition: getchar.h:15
Allow remapping.
Definition: getchar.h:14
size_t rhs_len
The {rhs} of the mapping.
Definition: getchar.h:52
Definition: getchar.h:23
FileDescriptor * scriptin[NSCRIPT]
Streams to read script from.
Definition: getchar.c:57
#define MAXMAPLEN
Definition: vim.h:205
bool noremap
Definition: getchar.h:37
bool silent
Definition: getchar.h:40
size_t orig_rhs_len
The original text of the {rhs}.
Definition: getchar.h:56
Definition: getchar.h:22
Definition: getchar.h:24
bool buffer
Definition: getchar.h:35
unsigned char char_u
Definition: types.h:11
flush_buffers_T
Definition: getchar.h:21
bool script
Definition: getchar.h:39
char_u * rhs
Definition: getchar.h:51
bool expr
Definition: getchar.h:36
char_u * orig_rhs
True when the {orig_rhs} is <nop>.
Definition: getchar.h:55
size_t lhs_len
Definition: getchar.h:49