There are a couple of ways that you can remember things like this, I always did it by writing it out in different ways and seeing which one worked for me:
$$\int uv'=\int u\frac{dv}{dx}dx=\int udv$$
I know some people preferred different forms of the notation above (whether strictly correct or not) so I have included them all.
By writing out your know 'values' in matrix form you can work out what is left by seeing which diagonal has not been done, as I show below:
$$\begin{matrix}
u&v'\\
u'&v
\end{matrix}$$
The first integral (that we are trying to solve) is the horizontal at the top $uv'$. we now want to deal with the diagonal and the bottom horizontal, $uv$ and $u'v$. I'd remember that since $uv$ has no prime, we do not integrate, and since $u'v$ has a prime we do integrate. Now we minus the integral from the part that is not integrated.
My wording is not the best but if you write out the notation hopefully you will understand what I mean