Go to the documentation of this file. 1 #ifndef NVIM_EX_CMDS_DEFS_H
2 #define NVIM_EX_CMDS_DEFS_H
12 #ifdef INCLUDE_GENERATED_DECLARATIONS
13 # include "ex_cmds_enum.generated.h"
40 #define EX_RANGE 0x001 // allow a linespecs
41 #define EX_BANG 0x002 // allow a ! after the command name
42 #define EX_EXTRA 0x004 // allow extra args after command name
43 #define EX_XFILE 0x008 // expand wildcards in extra part
44 #define EX_NOSPC 0x010 // no spaces allowed in the extra part
45 #define EX_DFLALL 0x020 // default file range is 1,$
46 #define EX_WHOLEFOLD 0x040 // extend range to include whole fold also
48 #define EX_NEEDARG 0x080 // argument required
49 #define EX_TRLBAR 0x100 // check for trailing vertical bar
50 #define EX_REGSTR 0x200 // allow "x for register designation
51 #define EX_COUNT 0x400 // allow count in argument, after command
52 #define EX_NOTRLCOM 0x800 // no trailing comment allowed
53 #define EX_ZEROR 0x1000 // zero line number allowed
54 #define EX_CTRLV 0x2000 // do not remove CTRL-V from argument
55 #define EX_CMDARG 0x4000 // allow "+command" argument
56 #define EX_BUFNAME 0x8000 // accepts buffer name
57 #define EX_BUFUNL 0x10000 // accepts unlisted buffer too
58 #define EX_ARGOPT 0x20000 // allow "++opt=val" argument
59 #define EX_SBOXOK 0x40000 // allowed in the sandbox
60 #define EX_CMDWIN 0x80000 // allowed in cmdline window; when missing
63 #define EX_MODIFY 0x100000 // forbidden in non-'modifiable' buffer
64 #define EX_FLAGS 0x200000 // allow flags after count in argument
65 #define EX_KEEPSCRIPT 0x4000000 // keep sctx of where command was invoked
66 #define EX_FILES (EX_XFILE | EX_EXTRA) // multiple extra files allowed
67 #define EX_FILE1 (EX_FILES | EX_NOSPC) // 1 file, defaults to current file
68 #define EX_WORD1 (EX_EXTRA | EX_NOSPC) // one extra word allowed
89 #define BAD_REPLACE '?' // replace it with '?' (default)
90 #define BAD_KEEP (-1) // leave it
91 #define BAD_DROP (-2) // erase it
122 #define AUCMD_EXECUTABLE_INIT { .type = CALLABLE_NONE }
124 typedef char *(*LineGetter)(int,
void *, int,
bool);
164 #define cs_rettv cs_pend.csp_rv
165 #define cs_exception cs_pend.csp_ex
215 #define FORCE_BIN 1 // ":edit ++bin file"
216 #define FORCE_NOBIN 2 // ":edit ++nobin file"
219 #define EXFLAG_LIST 0x01 // 'l': list
220 #define EXFLAG_NR 0x02 // '#': number
221 #define EXFLAG_PRINT 0x04 // 'p': print
232 #ifndef BACKSLASH_IN_FILENAME
243 #define XP_BS_NONE 0 // nothing special for backslashes
244 #define XP_BS_ONE 1 // uses one backslash before a space
245 #define XP_BS_THREE 2 // uses three backslashes before a space
281 #endif // NVIM_EX_CMDS_DEFS_H
linenr_T line2
the second line number or count
Definition: ex_cmds_defs.h:190
int xp_backslash
Definition: ex_cmds_defs.h:231
bool keeppatterns
true when ":keeppatterns" was used
Definition: ex_cmds_defs.h:259
@ ADDR_TABS
Definition: ex_cmds_defs.h:77
char *(* LineGetter)(int, void *, int, bool)
Definition: ex_cmds_defs.h:124
bool keepmarks
true when ":keepmarks" was used
Definition: ex_cmds_defs.h:258
@ CSL_HAD_LOOP
Definition: ex_cmds_defs.h:169
@ ADDR_UNSIGNED
Definition: ex_cmds_defs.h:81
@ ADDR_BUFFERS
Definition: ex_cmds_defs.h:76
@ ADDR_TABS_RELATIVE
Definition: ex_cmds_defs.h:78
char * cmd_name
Name of the command.
Definition: ex_cmds_defs.h:128
@ CALLABLE_NONE
Definition: ex_cmds_defs.h:108
sctx_T xp_script_ctx
Definition: ex_cmds_defs.h:230
bool did_sandbox
when true did sandbox++
Definition: ex_cmds_defs.h:212
int cs_lflags
Definition: ex_cmds_defs.h:162
@ ADDR_WINDOWS
Definition: ex_cmds_defs.h:73
Definition: ex_cmds_defs.h:224
bool noswapfile
true when ":noswapfile" was used
Definition: ex_cmds_defs.h:261
Structure for command definition.
Definition: ex_cmds_defs.h:127
long verbose
Definition: ex_cmds_defs.h:273
bool hide
true when ":hide" was used
Definition: ex_cmds_defs.h:255
eslist_T * cs_emsg_silent_list
Definition: ex_cmds_defs.h:161
bool bar
Definition: ex_cmds_defs.h:277
struct cmdname CommandDefinition
Structure for command definition.
int useridx
user command index
Definition: ex_cmds_defs.h:204
LuaRef xp_luaref
Definition: ex_cmds_defs.h:229
int force_enc
++enc= argument (index in cmd[])
Definition: ex_cmds_defs.h:202
int flags
extra flags after count: EXFLAG_
Definition: ex_cmds_defs.h:192
int read_edit
++edit argument
Definition: ex_cmds_defs.h:200
bool file
Definition: ex_cmds_defs.h:276
@ ADDR_LINES
Definition: ex_cmds_defs.h:72
AucmdExecutableType type
Definition: ex_cmds_defs.h:115
char * cmd
the name of the command (except for :make)
Definition: ex_cmds_defs.h:182
Callback cb
Definition: ex_cmds_defs.h:118
uint32_t cmd_argt
Relevant flags from the declared above.
Definition: ex_cmds_defs.h:130
int saved_emsg_silent
Definition: ex_cmds_defs.h:139
Definition: ex_cmds_defs.h:149
bool keepjumps
true when ":keepjumps" was used
Definition: ex_cmds_defs.h:257
char * arg
argument of the command
Definition: ex_cmds_defs.h:177
linenr_T do_ecmd_lnum
the line number in an edited file
Definition: ex_cmds_defs.h:194
void(WINAPI *pClosePseudoConsole)(HPCON)
Definition: ex_cmds_defs.h:114
@ ADDR_QUICKFIX_VALID
Definition: ex_cmds_defs.h:79
@ CSL_HAD_ENDLOOP
Definition: ex_cmds_defs.h:170
int LuaRef
Definition: types.h:23
@ CALLABLE_CB
Definition: ex_cmds_defs.h:110
Arguments used for Ex commands.
Definition: ex_cmds_defs.h:176
int skip
don't execute the command, only parse it
Definition: ex_cmds_defs.h:186
regmatch_T filter_regmatch
set by :filter /pat/
Definition: ex_cmds_defs.h:263
cmd_addr_T cmd_addr_type
Flag for address type.
Definition: ex_cmds_defs.h:131
AucmdExecutableType
Definition: ex_cmds_defs.h:107
int bad_char
BAD_KEEP, BAD_DROP or replacement byte.
Definition: ex_cmds_defs.h:203
int xp_col
Definition: ex_cmds_defs.h:237
int did_esilent
how many times emsg_silent was incremented
Definition: ex_cmds_defs.h:211
@ CSL_HAD_FINA
Definition: ex_cmds_defs.h:172
char * nextcmd
next command (NULL if none)
Definition: ex_cmds_defs.h:181
int amount
number of '>' or '<' for shift command
Definition: ex_cmds_defs.h:197
@ ADDR_NONE
Definition: ex_cmds_defs.h:83
bool keepalt
true when ":keepalt" was used
Definition: ex_cmds_defs.h:256
bool emsg_silent
Definition: ex_cmds_defs.h:270
LineGetter getline
Function used to get the next line.
Definition: ex_cmds_defs.h:206
@ CSL_HAD_CONT
Definition: ex_cmds_defs.h:171
@ CALLABLE_EX
Definition: ex_cmds_defs.h:109
size_t * arglens
length of command arguments
Definition: ex_cmds_defs.h:179
Definition: ex_cmds_defs.h:138
bool noautocmd
Definition: ex_cmds_defs.h:272
int usefilter
TRUE with ":w !command" and ":r!command".
Definition: ex_cmds_defs.h:196
long verbose_save
saved value of p_verbose
Definition: ex_cmds_defs.h:209
cmdidx_T cmdidx
the index for the command
Definition: ex_cmds_defs.h:184
int force_bin
0, FORCE_BIN or FORCE_NOBIN
Definition: ex_cmds_defs.h:199
char ** args
starting position of command arguments
Definition: ex_cmds_defs.h:178
bool browse
true to invoke file dialog
Definition: ex_cmds_defs.h:253
int regname
register name (NUL if none)
Definition: ex_cmds_defs.h:198
char * xp_pattern
Definition: ex_cmds_defs.h:225
bool sandbox
Definition: ex_cmds_defs.h:271
cmd_addr_T
Definition: ex_cmds_defs.h:71
cmd_addr_T addr_type
type of the count/range
Definition: ex_cmds_defs.h:191
@ CSTACK_LEN
Definition: ex_cmds_defs.h:146
char * errmsg
returned error message
Definition: ex_cmds_defs.h:205
void * cookie
argument for getline()
Definition: ex_cmds_defs.h:207
int forceit
TRUE if ! present.
Definition: ex_cmds_defs.h:187
linenr_T line1
the first line number
Definition: ex_cmds_defs.h:189
cstack_T * cstack
condition stack for ":if" etc.
Definition: ex_cmds_defs.h:208
bool confirm
true to invoke yes/no dialog
Definition: ex_cmds_defs.h:254
char * xp_line
Definition: ex_cmds_defs.h:239
ex_func_T cmd_func
Function with implementation of this command.
Definition: ex_cmds_defs.h:129
int cs_looplevel
Definition: ex_cmds_defs.h:159
int force_ff
++ff= argument (first char of argument)
Definition: ex_cmds_defs.h:201
cmdmod_T cmdmod
Definition: ex_cmds_defs.h:274
int xp_numfiles
Definition: ex_cmds_defs.h:236
size_t xp_pattern_len
Definition: ex_cmds_defs.h:227
size_t argc
number of command arguments
Definition: ex_cmds_defs.h:180
uint32_t argt
flags for the command
Definition: ex_cmds_defs.h:185
int xp_context
Definition: ex_cmds_defs.h:226
char ** cmdlinep
pointer to pointer of allocated cmdline
Definition: ex_cmds_defs.h:183
bool lockmarks
true when ":lockmarks" was used
Definition: ex_cmds_defs.h:260
char * do_ecmd_cmd
+command arg to be used in edited file
Definition: ex_cmds_defs.h:193
Definition: ex_cmds_defs.h:250
@ ADDR_ARGUMENTS
Definition: ex_cmds_defs.h:74
int save_msg_silent
saved value of msg_silent
Definition: ex_cmds_defs.h:210
bool silent
Definition: ex_cmds_defs.h:269
int addr_count
the number of addresses given
Definition: ex_cmds_defs.h:188
#define bool
Definition: conv.h:18
char * xp_arg
Definition: ex_cmds_defs.h:228
char ** xp_files
Definition: ex_cmds_defs.h:238
int append
TRUE with ":w >>file" command.
Definition: ex_cmds_defs.h:195
int split
flags for win_split()
Definition: ex_cmds_defs.h:251
char * cmd
Definition: ex_cmds_defs.h:117
@ ADDR_QUICKFIX
Definition: ex_cmds_defs.h:80
int cs_idx
Definition: ex_cmds_defs.h:158
char * save_ei
saved value of 'eventignore'
Definition: ex_cmds_defs.h:262
int tab
0 when ":tab" was used
Definition: ex_cmds_defs.h:252
int xp_shell
Definition: ex_cmds_defs.h:233
int cs_trylevel
Definition: ex_cmds_defs.h:160
Definition: regexp_defs.h:142
eslist_T * next
Definition: ex_cmds_defs.h:140
bool filter_force
set for :filter!
Definition: ex_cmds_defs.h:264
long linenr_T
Line number type.
Definition: pos.h:5
Stores command modifier info used by nvim_parse_cmd
Definition: ex_cmds_defs.h:268
union aucmd_executable_t::@36 callable
void(* ex_func_T)(exarg_T *eap)
Definition: ex_cmds_defs.h:93
@ ADDR_OTHER
Definition: ex_cmds_defs.h:82
@ ADDR_LOADED_BUFFERS
Definition: ex_cmds_defs.h:75