Adding new 'option'

From Vifm Wiki
Jump to: navigation, search

Adding a global option[edit]

  1. Add it to config structure in cfg/config.h.
  2. Add it to init_config() function in cfg/config.c initializing with default value.
  3. Add it to write_options() function in cfg/info.c.
  4. Add it in opt_handlers to options array.
  5. Implement.
  6. Add it to vim/doc/app/vifm-app.txt (don't forget to update modification date).
  7. Add it to vifm.1 (don't forget to update modification date).
  8. Regenerate tags.c.
  9. Add it to vim/syntax/vifm.vim (don't forget to update modification date). For boolean options don't forget about highlighting no<option> and inv<option>.
  10. Remove from the TODO file.
  11. Add to the ChangeLog file.
  12. Update THANKS file if option was proposed by someone.

Adding a local option[edit]

  1. Add it to view_t structure in ui.h: <type> <name>, <name_g>;.
  2. Add it to init_view() or reset_view() function in filelist.c.
  3. Add it to write_options() function in cfg/info.c.
  4. Add it to options array in opt_handlers.c.
  5. Add it to reset_local_options(), load_view_options() and clone_local_options() functions in opt_handlers.c.
  6. Implement.
  7. Add it to vim/doc/vifm.txt (don't forget to update modification date).
  8. Add it to vifm.1 (don't forget to update modification date).
  9. Regenerate tags.c.
  10. add it to vim/syntax/vifm.vim (don't forget to update modification date). For boolean options don't forget about highlighting no<option> and inv<option>.
  11. Remove from the TODO file.
  12. Add to the ChangeLog file.
  13. Update THANKS file if option was proposed by someone.