Hi!

This is my IDA config with few tweaks that I found useful.
Both are located in ida_directory/cfg/

hexrays.cfg - Decompiler Config

BLOCK_INDENT = 4 default = 2

// OLD
if (statement)
  do_smth();

// NEW
if (statement)
    do_smth();


RIGHT_MARGIN = 80 default = 120, as above
MAX_NCOMMAS = 1 default = 8

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// OLD
if ( cond || ( x = *p, y = func(), x + y > 0 ) )
    body;

// NEW
if ( cond )
    goto LABEL;
x = *p;
y = func();
if ( x + y > 0 )
LABEL:
    body;


DEFAULT_RADIX = 16 default = 0

// OLD
if (var != 10)
    /* code */

// NEW
if (var != 0xA)
    /* code */


GENERATE_EMPTY_LINES = YES default = NO

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
// OLD
LABEL_23:
if (v19 >= enva || !*v19)
    break;
LABEL_25:
v13 = v19;

// NEW
LABEL_23:
if (v19 >= enva || !*v19)
    break;

LABEL_25:
v13 = v19;

#define HEXOPTONS = 0x831FF // Combination of HO_... bits
#define HO_KEEP_CURLIES 0x000200 // Keep curly braces for single-statement blocks

HEXOPTIONS = 0x833FF HEXOPTIONS | HO_KEEP_CURLIES

1
2
3
4
5
6
7
8
9
// OLD
if (state)
    return 1;

// NEW
if (state)
{
    return 1;
}

ida.cfg - IDA Config

OPCODE_BYTES = 16 default = 0
GRAPH_OPCODE_BYTES = 16 default = 0

; OLD
test    cl, cl
jz      short loc_4010FE
mov     dl, [eax+1]

; NEW
84 C9       test    cl, cl
74 16       jz      short loc_4010FE
8A 50 01    mov     dl, [eax+1]