File data/vim/syntax/vifm.vim changed (mode: 100644) (index f6b667a7b..79fb9165a) |
1 |
1 |
" vifm syntax file |
" vifm syntax file |
2 |
2 |
" Maintainer: xaizek <xaizek@posteo.net> |
" Maintainer: xaizek <xaizek@posteo.net> |
3 |
|
" Last Change: November 20, 2024 |
|
|
3 |
|
" Last Change: January 18, 2025 |
4 |
4 |
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr. |
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr. |
5 |
5 |
|
|
6 |
6 |
if exists('b:current_syntax') |
if exists('b:current_syntax') |
|
... |
... |
syntax keyword vifmOption contained aproposprg autocd autochpos caseoptions |
170 |
170 |
\ shell sh shellflagcmd shcf shortmess shm showtabline stal sizefmt slowfs |
\ shell sh shellflagcmd shcf shortmess shm showtabline stal sizefmt slowfs |
171 |
171 |
\ smartcase scs statusline stl suggestoptions syncregs syscalls tablabel |
\ smartcase scs statusline stl suggestoptions syncregs syscalls tablabel |
172 |
172 |
\ tabline tabprefix tabscope tabstop tabsuffix tal timefmt timeoutlen title |
\ tabline tabprefix tabscope tabstop tabsuffix tal timefmt timeoutlen title |
173 |
|
\ tm trash trashdir ts tuioptions to undolevels ul vicmd viewcolumns |
|
174 |
|
\ vifminfo vimhelp vixcmd wildinc wildmenu wmnu wildstyle wordchars wrap |
|
175 |
|
\ wrapscan ws |
|
|
173 |
|
\ tm trash trashdir ts tuioptions to uioptions undolevels ul vicmd |
|
174 |
|
\ viewcolumns vifminfo vimhelp vixcmd wildinc wildmenu wmnu wildstyle |
|
175 |
|
\ wordchars wrap wrapscan ws |
176 |
176 |
|
|
177 |
177 |
" Disabled boolean options |
" Disabled boolean options |
178 |
178 |
syntax keyword vifmOption contained noautocd noautochpos nocf nochaselinks |
syntax keyword vifmOption contained noautocd noautochpos nocf nochaselinks |
File src/cfg/info.c changed (mode: 100644) (index ffb6be4de..e63a04bad) |
... |
... |
store_global_options(JSON_Object *root) |
2326 |
2326 |
append_dstr(options, format_str("%strash", cfg.use_trash ? "" : "no")); |
append_dstr(options, format_str("%strash", cfg.use_trash ? "" : "no")); |
2327 |
2327 |
append_dstr(options, format_str("tuioptions=%s", |
append_dstr(options, format_str("tuioptions=%s", |
2328 |
2328 |
escape_spaces(vle_opts_get("tuioptions", OPT_GLOBAL)))); |
escape_spaces(vle_opts_get("tuioptions", OPT_GLOBAL)))); |
|
2329 |
|
append_dstr(options, format_str("uioptions=%s", |
|
2330 |
|
escape_spaces(vle_opts_get("uioptions", OPT_GLOBAL)))); |
2329 |
2331 |
append_dstr(options, format_str("undolevels=%d", cfg.undo_levels)); |
append_dstr(options, format_str("undolevels=%d", cfg.undo_levels)); |
2330 |
2332 |
append_dstr(options, format_str("vicmd=%s%s", escape_spaces(cfg.vi_command), |
append_dstr(options, format_str("vicmd=%s%s", escape_spaces(cfg.vi_command), |
2331 |
2333 |
cfg.vi_cmd_bg ? " &" : "")); |
cfg.vi_cmd_bg ? " &" : "")); |
File src/opt_handlers.c changed (mode: 100644) (index 7684b7ef5..16950fe2b) |
... |
... |
static void init_relativenumber(optval_t *val); |
108 |
108 |
static void init_sort(optval_t *val); |
static void init_sort(optval_t *val); |
109 |
109 |
static void init_sortorder(optval_t *val); |
static void init_sortorder(optval_t *val); |
110 |
110 |
static void init_tuioptions(optval_t *val); |
static void init_tuioptions(optval_t *val); |
|
111 |
|
static void init_uioptions(optval_t *val); |
111 |
112 |
static void init_wildinc(optval_t *val); |
static void init_wildinc(optval_t *val); |
112 |
113 |
static void init_wordchars(optval_t *val); |
static void init_wordchars(optval_t *val); |
113 |
114 |
static void load_options_defaults(void); |
static void load_options_defaults(void); |
|
... |
... |
static void title_handler(OPT_OP op, optval_t val); |
239 |
240 |
static void trash_handler(OPT_OP op, optval_t val); |
static void trash_handler(OPT_OP op, optval_t val); |
240 |
241 |
static void trashdir_handler(OPT_OP op, optval_t val); |
static void trashdir_handler(OPT_OP op, optval_t val); |
241 |
242 |
static void tuioptions_handler(OPT_OP op, optval_t val); |
static void tuioptions_handler(OPT_OP op, optval_t val); |
|
243 |
|
static void uioptions_handler(OPT_OP op, optval_t val); |
242 |
244 |
static void undolevels_handler(OPT_OP op, optval_t val); |
static void undolevels_handler(OPT_OP op, optval_t val); |
243 |
245 |
static void vicmd_handler(OPT_OP op, optval_t val); |
static void vicmd_handler(OPT_OP op, optval_t val); |
244 |
246 |
static void vixcmd_handler(OPT_OP op, optval_t val); |
static void vixcmd_handler(OPT_OP op, optval_t val); |
|
... |
... |
static const char *tuioptions_vals[][2] = { |
402 |
404 |
{ "v", "vary width of middle border to equalize view sizes" }, |
{ "v", "vary width of middle border to equalize view sizes" }, |
403 |
405 |
}; |
}; |
404 |
406 |
|
|
|
407 |
|
/* Possible flags of 'uioptions'. */ |
|
408 |
|
static const char *uioptions_vals[][2] = { |
|
409 |
|
{ "iodetails", "show I/O progress details dialog automatically" }, |
|
410 |
|
}; |
|
411 |
|
|
405 |
412 |
/* Possible values of 'dirsize' option. */ |
/* Possible values of 'dirsize' option. */ |
406 |
413 |
static const char *dirsize_enum[][2] = { |
static const char *dirsize_enum[][2] = { |
407 |
414 |
{ "size", "size of directory or its files" }, |
{ "size", "size of directory or its files" }, |
|
... |
... |
options[] = { |
869 |
876 |
&tuioptions_handler, NULL, |
&tuioptions_handler, NULL, |
870 |
877 |
{ .init = &init_tuioptions }, |
{ .init = &init_tuioptions }, |
871 |
878 |
}, |
}, |
|
879 |
|
{ "uioptions", "", "tweaks of UI behaviour", |
|
880 |
|
OPT_SET, ARRAY_LEN(uioptions_vals), uioptions_vals, |
|
881 |
|
&uioptions_handler, NULL, |
|
882 |
|
{ .init = &init_uioptions }, |
|
883 |
|
}, |
872 |
884 |
{ "undolevels", "ul", "number of file operations to remember", |
{ "undolevels", "ul", "number of file operations to remember", |
873 |
885 |
OPT_INT, 0, NULL, &undolevels_handler, NULL, |
OPT_INT, 0, NULL, &undolevels_handler, NULL, |
874 |
886 |
{ .ref.int_val = &cfg.undo_levels }, |
{ .ref.int_val = &cfg.undo_levels }, |
|
... |
... |
init_tuioptions(optval_t *val) |
1371 |
1383 |
val->str_val = buf; |
val->str_val = buf; |
1372 |
1384 |
} |
} |
1373 |
1385 |
|
|
|
1386 |
|
/* Composes initial value of 'uioptions' from current configuration. */ |
|
1387 |
|
static void |
|
1388 |
|
init_uioptions(optval_t *val) |
|
1389 |
|
{ |
|
1390 |
|
val->set_items = (cfg.always_show_io_details != 0) << 0; |
|
1391 |
|
} |
|
1392 |
|
|
1374 |
1393 |
/* Composes initial value of 'wildinc' from current configuration. */ |
/* Composes initial value of 'wildinc' from current configuration. */ |
1375 |
1394 |
static void |
static void |
1376 |
1395 |
init_wildinc(optval_t *val) |
init_wildinc(optval_t *val) |
|
... |
... |
tuioptions_handler(OPT_OP op, optval_t val) |
3906 |
3925 |
stats_redraw_later(); |
stats_redraw_later(); |
3907 |
3926 |
} |
} |
3908 |
3927 |
|
|
|
3928 |
|
/* Applies new value of 'uioptions' to configuration. */ |
|
3929 |
|
static void |
|
3930 |
|
uioptions_handler(OPT_OP op, optval_t val) |
|
3931 |
|
{ |
|
3932 |
|
cfg.always_show_io_details = ((val.set_items & 1) != 0); |
|
3933 |
|
} |
|
3934 |
|
|
3909 |
3935 |
static void |
static void |
3910 |
3936 |
undolevels_handler(OPT_OP op, optval_t val) |
undolevels_handler(OPT_OP op, optval_t val) |
3911 |
3937 |
{ |
{ |
File tests/misc/options.c changed (mode: 100644) (index 64e36475d..1bf2af050) |
... |
... |
TEARDOWN() |
62 |
62 |
columns_teardown(); |
columns_teardown(); |
63 |
63 |
} |
} |
64 |
64 |
|
|
65 |
|
static void |
|
66 |
|
print_func(const char buf[], int offset, AlignType align, |
|
67 |
|
const char full_column[], const format_info_t *info) |
|
68 |
|
{ |
|
69 |
|
ncols += (info->id != FILL_COLUMN_ID); |
|
70 |
|
} |
|
71 |
|
|
|
72 |
65 |
TEST(lsview_block_columns_update_on_sort_change) |
TEST(lsview_block_columns_update_on_sort_change) |
73 |
66 |
{ |
{ |
74 |
67 |
assert_success(cmds_dispatch("set viewcolumns=", curr_view, CIT_COMMAND)); |
assert_success(cmds_dispatch("set viewcolumns=", curr_view, CIT_COMMAND)); |
|
... |
... |
TEST(wildinc) |
801 |
794 |
assert_string_equal(" wildinc=*", ui_sb_last()); |
assert_string_equal(" wildinc=*", ui_sb_last()); |
802 |
795 |
} |
} |
803 |
796 |
|
|
|
797 |
|
TEST(uioptions) |
|
798 |
|
{ |
|
799 |
|
assert_success(cmds_dispatch("set uioptions=iodetails", &lwin, CIT_COMMAND)); |
|
800 |
|
assert_true(cfg.always_show_io_details); |
|
801 |
|
|
|
802 |
|
assert_success(cmds_dispatch("set uioptions=", &lwin, CIT_COMMAND)); |
|
803 |
|
assert_false(cfg.always_show_io_details); |
|
804 |
|
} |
|
805 |
|
|
|
806 |
|
static void |
|
807 |
|
print_func(const char buf[], int offset, AlignType align, |
|
808 |
|
const char full_column[], const format_info_t *info) |
|
809 |
|
{ |
|
810 |
|
ncols += (info->id != FILL_COLUMN_ID); |
|
811 |
|
} |
|
812 |
|
|
804 |
813 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
805 |
814 |
/* vim: set cinoptions+=t0 filetype=c : */ |
/* vim: set cinoptions+=t0 filetype=c : */ |