view mcabber/CodingStyle.txt @ 2304:fa8365fb6ac2

[PATCH 1/3] New option: vi_mode If the new vi_mode option is set to 1, let MCabber's non-chat mode accept a few commands loosely based on those available in vi(1)'s normal mode, e.g.: A Call "/roster unread_first". a Call "/roster unread_next". F Call "/roster group_prev". f Call "/roster group_next". G Call "/roster bottom". gg Call "/roster top". i Enter chat mode. [<n>]j Call "/roster down [<n>]". [<n>]k Call "/roster up [<n>]". n Repeat the previous search (if any). O Call "/roster unread_first" and open chat window. o Call "/roster unread_next" and open chat window. ZZ Call "/quit". zM Call "/group fold" for all groups. zR Call "/group unfold" for all groups. <Space> Call "/group toggle" for the current group. '' Call "/roster alternate". ! Toggle attention flag for current buddy. # Toggle unread messages flag for current buddy. /<str> Call "/roster search <str>". :q Call "/quit". :wq Call "/quit". :x Call "/quit". :<n> Jump to line <n> in the roster. :<cmd> Call "/<cmd>" (unless <cmd> matches one of the above commands).
author Holger Weiß <holger@zedat.fu-berlin.de>
date Wed, 22 Jul 2015 19:25:22 +0200
parents 189ffdd944b4
children ffd0e57e9563
line wrap: on
line source

This document describes the preferred coding style for the mcabber project.

If you intend to patch and contribute to mcabber, please try to use the
existing style, and read the following points.

- Do not use tabs, use space characters;
- Avoid trailing whitespace;
- Avoid lines longer than 80 characters;
- Indentation is 2 spaces (ok, maybe it isn't a good idea but it's the
  current style);
- Put a space after non-functions statements (e.g. if, while...)
- Put the opening brace last on the same line, and put the closing brace first
  except for functions, where the opening brace should be alone on a new line.

  Example:

    void example(void)
    {
      if (cond1) {
        do_a();
      } else if (cond2) {
        do_b();
      } else {
        do_c();
      }

      if (error)
        exit(0);
    }

 - Look at existing code for rules not mentioned here.

Mikael