7. Let the function $y=\tan \omega x(\omega>0)$ intersect the line $y=a$ at points $A$ and $B$, and the minimum value of $|A B|$ is $\pi$. Then the monotonic increasing interval of the function
$$
f(x)=\sqrt{3} \sin \omega x-\cos \omega x
$$
is ( ).
(A) $\left[2 k \pi-\frac{\pi}{6}, 2 k \pi+\frac{\pi}{6}\right](k \in \mathbf{Z})$
(B) $\left[2 k \pi-\frac{\pi}{3}, 2 k \pi+\frac{2 \pi}{3}\right](k \in \mathbf{Z})$
(C) $\left[2 k \pi-\frac{2 \pi}{3}, 2 k \pi+\frac{\pi}{3}\right](k \in \mathbf{Z})$
(D) $\left[2 k \pi-\frac{\pi}{6}, 2 k \pi+\frac{5 \pi}{6}\right](k \in \mathbf{Z})$
7. B.

It is known that, $\frac{\pi}{\omega}=\pi \Rightarrow \omega=1$.
Then $f(x)=2 \sin \left(x-\frac{\pi}{6}\right)$
$$
\Rightarrow-\frac{\pi}{2}+2 k \pi \leqslant x-\frac{\pi}{6} \leqslant \frac{\pi}{2}+2 k \pi \text {. }
$$

Therefore, the monotonic increasing interval of $f(x)$ is
$$
\left[2 k \pi-\frac{\pi}{3}, 2 k \pi+\frac{2 \pi}{3}\right](k \in \mathbf{Z}) .
$$