Skip to content
Alex Lementuev edited this page Jul 25, 2015 · 2 revisions

Config Files

Config files can store any number of custom commands (variables, bindings, aliases, etc) as a plain text.

Special Config Files

  • default.cfg - stores config variables, aliases and bindings. Created automatically and should not be edited.
  • autoexec.cfg - executed automatically when plugin starts.
  • playmode.cfg - executed automatically when plugin starts in play mode.

Creating Configs

Lunar automatically creates default.cfg when you change variable, alias or binding from the command line.
You can manually create a new config with writeconfig command

> writeconfig myconfig.cfg

As a result, you will have a new config file with the contents of default.cfg

Viewing and Editing Configs

You can view and edit existing configs with cat command:

> cat default.cfg
  // bindings
  bind [ prev
  bind ] next
  bind r restart

You can open existing config with system default text editor passing -e or --edit option:

> cat -e default.cfg

Executing Configs

You can execute existing config file with exec command:

> exec default.cfg

Tab Autocomplete

Single and double Tab autocomplete is fully supported with all config-specific commands.