Skip to content
Jean Guyomarc'h edited this page Jun 6, 2020 · 3 revisions

Hacking around

Eovim uses some environment variables that can influence its runtime. Some are directly inherited from the EFL framework, others are eovim-specific:

  • EINA_LOG_BACKTRACE set it to an integer to get run-time backtraces.
  • EINA_LOG_LEVELS set it to "eovim:INT" where INT is the log level.
  • EOVIM_IN_TREE set it to non-zero to load files from the build directory instead of the installation directory.

To develop/debug, a typical use is to run eovim like this (from the build directory):

env EOVIM_IN_TREE=1 EINA_LOG_BACKTRACE=0 EINA_LOG_LEVELS="eovim:3" ./eovim

Useful Links

Coding Style

The Linux Coding Style

The coding style used by Eovim follows the same guidelines than the Linux coding style. The rationale is quite simple:

  • It is already well-documented.
  • A clang-format file already exists.
  • I, personally, find it easier to read than the Google or LLVM coding styles.

80 columns are not enforced for the reasons motivated by Torvalds. The limit is arbitrarily set to 100. It is not following Linux just to follow Linux, but because it is easier to just adhere to something and settle with it... at least for something as subjective as a coding style.

Data types

For the same reasons than listed in the Linux coding style, try not to use typedef, prefer the explicit use of struct, enum and union.

Lint

Pull requests lint the code for violations of the coding style, by running clang-format on the whole code base. You can apply automatic formatting it yourself by running:

sh ./scripts/format.sh
Clone this wiki locally