We present a nanolithography technique based on an atomic force microscopy (AFM). A thin resist layer on the sample surface is plastically indented by a vibrating tip. Controlling of the vibration amplitude and tip movement enables one to plow a narrow furrow along line segments of arbitrary length and direction. Different lines segments which form a complex pattern can be plowed at a low scan speed. The complex patterns can be transferred to two-dimension photonic crystal by wet chemical etching. We succeed in fabricating two-dimension photonic crystals of air holes on semiconductors. More interestingly, by a proper design the photoluminescence (PL) intensity of semiconductors with air holes can be enhanced. The interesting phenomenon can be explained by the presence of leaky resonant states created by the coherent scattering from the periodicity of photonic crystal.