blob: 39c40f39ba3aed9be30800c5fcd973e9093c5c22 [file] [log] [blame]
Bram Moolenaardac13472019-09-16 21:06:21 +02001/* optionstr.c */
2void didset_string_options(void);
zeertzjq269aa2b2022-11-28 11:36:50 +00003void trigger_optionset_string(int opt_idx, int opt_flags, char_u *oldval, char_u *oldval_l, char_u *oldval_g, char_u *newval);
Bram Moolenaardac13472019-09-16 21:06:21 +02004void check_buf_options(buf_T *buf);
5void free_string_option(char_u *p);
6void clear_string_option(char_u **pp);
7void check_string_option(char_u **pp);
8void set_string_option_direct(char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
9void set_string_option_direct_in_win(win_T *wp, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
10void set_string_option_direct_in_buf(buf_T *buf, char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
Mike Williams620f0112023-12-05 15:36:06 +010011char *set_string_option(int opt_idx, char_u *value, int opt_flags, char *errbuf, size_t errbuflen);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000012char *did_set_ambiwidth(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010013int expand_set_ambiwidth(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000014char *did_set_background(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010015int expand_set_background(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000016char *did_set_backspace(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010017int expand_set_backspace(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000018char *did_set_backupcopy(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010019int expand_set_backupcopy(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000020char *did_set_backupext_or_patchmode(optset_T *args);
21char *did_set_belloff(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010022int expand_set_belloff(optexpand_T *args, int *numMatches, char_u ***matches);
zeertzjqeac3fdc2024-02-03 18:08:09 +010023char *did_set_breakat(optset_T *args);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000024char *did_set_breakindentopt(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010025int expand_set_breakindentopt(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000026char *did_set_browsedir(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010027int expand_set_browsedir(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000028char *did_set_bufhidden(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010029int expand_set_bufhidden(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000030char *did_set_buftype(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010031int expand_set_buftype(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000032char *did_set_casemap(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010033int expand_set_casemap(optexpand_T *args, int *numMatches, char_u ***matches);
34int expand_set_clipboard(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananc6ff21e2023-03-02 14:46:48 +000035char *did_set_chars_option(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010036int expand_set_chars_option(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000037char *did_set_cinoptions(optset_T *args);
38char *did_set_colorcolumn(optset_T *args);
39char *did_set_comments(optset_T *args);
40char *did_set_commentstring(optset_T *args);
41char *did_set_complete(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010042int expand_set_complete(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000043char *did_set_completeopt(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010044int expand_set_completeopt(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000045char *did_set_completepopup(optset_T *args);
46char *did_set_completeslash(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010047int expand_set_completeslash(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000048char *did_set_concealcursor(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010049int expand_set_concealcursor(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000050char *did_set_cpoptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010051int expand_set_cpoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000052char *did_set_cryptkey(optset_T *args);
53char *did_set_cryptmethod(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010054int expand_set_cryptmethod(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000055char *did_set_cscopequickfix(optset_T *args);
56char *did_set_cursorlineopt(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010057int expand_set_cursorlineopt(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000058char *did_set_debug(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010059int expand_set_debug(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000060char *did_set_diffopt(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010061int expand_set_diffopt(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000062char *did_set_display(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010063int expand_set_display(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000064char *did_set_eadirection(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010065int expand_set_eadirection(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananc727b192023-03-03 12:26:15 +000066char *did_set_encoding(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010067int expand_set_encoding(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000068char *did_set_eventignore(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010069int expand_set_eventignore(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000070char *did_set_fileformat(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010071int expand_set_fileformat(optexpand_T *args, int *numMatches, char_u ***matches);
72char_u *get_fileformat_name(expand_T *xp, int idx);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000073char *did_set_fileformats(optset_T *args);
74char *did_set_filetype_or_syntax(optset_T *args);
75char *did_set_foldclose(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010076int expand_set_foldclose(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000077char *did_set_foldexpr(optset_T *args);
78char *did_set_foldignore(optset_T *args);
79char *did_set_foldmarker(optset_T *args);
80char *did_set_foldmethod(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010081int expand_set_foldmethod(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000082char *did_set_foldopen(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010083int expand_set_foldopen(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000084char *did_set_formatoptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010085int expand_set_formatoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmanan6d611de2023-02-25 11:59:33 +000086char *did_set_guicursor(optset_T *args);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000087char *did_set_guifont(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010088int expand_set_guifont(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000089char *did_set_guifontset(optset_T *args);
90char *did_set_guifontwide(optset_T *args);
91char *did_set_guiligatures(optset_T *args);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000092char *did_set_guioptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010093int expand_set_guioptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +000094char *did_set_guitablabel(optset_T *args);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000095char *did_set_helpfile(optset_T *args);
96char *did_set_helplang(optset_T *args);
97char *did_set_highlight(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +010098int expand_set_highlight(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +000099char *did_set_iconstring(optset_T *args);
100char *did_set_imactivatekey(optset_T *args);
101char *did_set_isopt(optset_T *args);
Yegappan Lakshmanan87018252023-09-20 20:20:04 +0200102char *did_set_jumpoptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100103int expand_set_jumpoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000104char *did_set_keymap(optset_T *args);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000105char *did_set_keymodel(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100106int expand_set_keymodel(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000107char *did_set_keyprotocol(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100108int expand_set_keyprotocol(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000109char *did_set_lispoptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100110int expand_set_lispoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000111char *did_set_matchpairs(optset_T *args);
112char *did_set_mkspellmem(optset_T *args);
113char *did_set_mouse(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100114int expand_set_mouse(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000115char *did_set_mousemodel(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100116int expand_set_mousemodel(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000117char *did_set_mouseshape(optset_T *args);
118char *did_set_nrformats(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100119int expand_set_nrformats(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000120char *did_set_optexpr(optset_T *args);
121char *did_set_pastetoggle(optset_T *args);
122char *did_set_previewpopup(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100123int expand_set_popupoption(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000124char *did_set_printencoding(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100125int expand_set_printoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000126char *did_set_renderoptions(optset_T *args);
Yegappan Lakshmanan5da901b2023-02-27 12:47:47 +0000127char *did_set_rightleftcmd(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100128int expand_set_rightleftcmd(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000129char *did_set_rulerformat(optset_T *args);
130char *did_set_scrollopt(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100131int expand_set_scrollopt(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000132char *did_set_selection(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100133int expand_set_selection(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000134char *did_set_selectmode(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100135int expand_set_selectmode(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000136char *did_set_sessionoptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100137int expand_set_sessionoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000138char *did_set_shortmess(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100139int expand_set_shortmess(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000140char *did_set_showbreak(optset_T *args);
141char *did_set_showcmdloc(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100142int expand_set_showcmdloc(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000143char *did_set_signcolumn(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100144int expand_set_signcolumn(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000145char *did_set_spellcapcheck(optset_T *args);
146char *did_set_spellfile(optset_T *args);
147char *did_set_spelllang(optset_T *args);
148char *did_set_spelloptions(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100149int expand_set_spelloptions(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000150char *did_set_spellsuggest(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100151int expand_set_spellsuggest(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000152char *did_set_splitkeep(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100153int expand_set_splitkeep(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000154char *did_set_statusline(optset_T *args);
155char *did_set_swapsync(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100156int expand_set_swapsync(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000157char *did_set_switchbuf(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100158int expand_set_switchbuf(optexpand_T *args, int *numMatches, char_u ***matches);
LemonBoy5247b0b2024-07-12 19:30:58 +0200159int expand_set_tabclose(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000160char *did_set_tabline(optset_T *args);
161char *did_set_tagcase(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100162int expand_set_tagcase(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmanan5284b232023-03-04 19:57:32 +0000163char *did_set_term(optset_T *args);
Yegappan Lakshmananc727b192023-03-03 12:26:15 +0000164char *did_set_term_option(optset_T *args);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000165char *did_set_termwinkey(optset_T *args);
166char *did_set_termwinsize(optset_T *args);
Yegappan Lakshmanan8ad862a2023-02-23 15:05:22 +0000167char *did_set_termwintype(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100168int expand_set_termwintype(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000169char *did_set_titlestring(optset_T *args);
170char *did_set_toolbar(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100171int expand_set_toolbar(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000172char *did_set_toolbariconsize(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100173int expand_set_toolbariconsize(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000174char *did_set_ttymouse(optset_T *args);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100175int expand_set_ttymouse(optexpand_T *args, int *numMatches, char_u ***matches);
Yegappan Lakshmananaf936912023-02-20 12:16:39 +0000176char *did_set_varsofttabstop(optset_T *args);
177char *did_set_vartabstop(optset_T *args);
Yegappan Lakshmananad608982023-03-01 12:44:06 +0000178char *did_set_verbosefile(optset_T *args);
179char *did_set_viewoptions(optset_T *args);
180char *did_set_viminfo(optset_T *args);
181char *did_set_virtualedit(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200182int expand_set_virtualedit(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100183char *did_set_whichwrap(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200184int expand_set_whichwrap(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100185char *did_set_wildmode(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200186int expand_set_wildmode(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100187char *did_set_wildoptions(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200188int expand_set_wildoptions(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100189char *did_set_winaltkeys(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200190int expand_set_winaltkeys(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100191char *did_set_wincolor(optset_T *args);
Yee Cheng Chin900894b2023-09-29 20:42:32 +0200192int expand_set_wincolor(optexpand_T *args, int *numMatches, char_u ***matches);
Christian Brabandt6a950da2024-01-01 20:18:36 +0100193char *did_set_string_option(int opt_idx, char_u **varp, char_u *oldval, char_u *value, char *errbuf, size_t errbuflen, int opt_flags, set_op_T op, int *value_checked);
Bram Moolenaardac13472019-09-16 21:06:21 +0200194int check_ff_value(char_u *p);
Christian Brabandt9aee8ec2022-12-16 16:41:23 +0000195void save_clear_shm_value(void);
196void restore_shm_value(void);
Bram Moolenaardac13472019-09-16 21:06:21 +0200197/* vim: set ft=c : */