getchar.h
Go to the documentation of this file.
1 #ifndef NVIM_GETCHAR_H
2 #define NVIM_GETCHAR_H
3 
4 #include "nvim/buffer_defs.h"
5 #include "nvim/ex_cmds_defs.h"
6 #include "nvim/os/fileio.h"
7 #include "nvim/types.h"
8 #include "nvim/vim.h"
9 
14  REMAP_YES = 0,
15  REMAP_NONE = -1,
16  REMAP_SCRIPT = -2,
17  REMAP_SKIP = -3,
18 };
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 #define MAP_ARGUMENTS_INIT { false, false, false, false, false, false, false, \
60  { 0 }, 0, NULL, 0, false, NULL, 0 }
61 
62 #define KEYLEN_PART_KEY -1 // keylen value for incomplete key-code
63 #define KEYLEN_PART_MAP -2 // keylen value for incomplete mapping
64 
66 enum { NSCRIPT = 15, };
67 
70 
71 #ifdef INCLUDE_GENERATED_DECLARATIONS
72 # include "getchar.h.generated.h"
73 #endif
74 #endif // NVIM_GETCHAR_H
map_arguments
Definition: getchar.h:34
REMAP_SKIP
@ REMAP_SKIP
No remapping for first char.
Definition: getchar.h:17
types.h
REMAP_SCRIPT
@ REMAP_SCRIPT
Remap script-local mappings only.
Definition: getchar.h:16
map_arguments::lhs
char_u lhs[MAXMAPLEN+1]
Definition: getchar.h:48
RemapValues
RemapValues
Definition: getchar.h:13
FileDescriptor
Structure used to read from/write to file.
Definition: fileio.h:11
FLUSH_TYPEAHEAD
@ FLUSH_TYPEAHEAD
Definition: getchar.h:23
map_arguments::rhs_len
size_t rhs_len
The {rhs} of the mapping.
Definition: getchar.h:52
MAXMAPLEN
#define MAXMAPLEN
Definition: vim.h:205
map_arguments::silent
bool silent
Definition: getchar.h:40
scriptin
FileDescriptor * scriptin[NSCRIPT]
Streams to read script from.
Definition: getchar.c:59
map_arguments::nowait
bool nowait
Definition: getchar.h:38
map_arguments::orig_rhs
char_u * orig_rhs
True when the {orig_rhs} is <nop>.
Definition: getchar.h:55
map_arguments::lhs_len
size_t lhs_len
Definition: getchar.h:49
REMAP_YES
@ REMAP_YES
Allow remapping.
Definition: getchar.h:14
fileio.h
REMAP_NONE
@ REMAP_NONE
No remapping.
Definition: getchar.h:15
char_u
unsigned char char_u
Definition: types.h:12
ex_cmds_defs.h
map_arguments::script
bool script
Definition: getchar.h:39
NSCRIPT
@ NSCRIPT
Definition: getchar.h:66
map_arguments::buffer
bool buffer
Definition: getchar.h:35
buffer_defs.h
FLUSH_MINIMAL
@ FLUSH_MINIMAL
Definition: getchar.h:22
vim.h
map_arguments::noremap
bool noremap
Definition: getchar.h:37
FLUSH_INPUT
@ FLUSH_INPUT
Definition: getchar.h:24
map_arguments::orig_rhs_len
size_t orig_rhs_len
The original text of the {rhs}.
Definition: getchar.h:56
map_arguments::rhs
char_u * rhs
Definition: getchar.h:51
map_arguments::unique
bool unique
Definition: getchar.h:41
flush_buffers_T
flush_buffers_T
Definition: getchar.h:21
map_arguments::rhs_is_noop
bool rhs_is_noop
Definition: getchar.h:53
map_arguments::expr
bool expr
Definition: getchar.h:36