Getting along with 気が合う
考え方や感じ方が通じ合う。
The way of thinking and feeling is understood by each other.
Goo Dictionary
気が合う means to get along with someone. Your 気 (spirit) does the action of 合う (to match). When your 気 matches someone else’s 気, the two of you get along. You are kindred spirits.
Examples
俺物語!! » Volume 3 » Page 170
Further Reading
- Garrison, Jeff et al. Kodansha's Dictionary of Basic Japanese Idioms, Kodansha, 2002, p. 206