Vanity of vanities. Figure of speech Polyptoton. Note also the Figure of speech Epanadiplosis (App-6), by which Ecc_1:2 begins and ends with the same word. These Figures are used for the greatest emphasis, and denote utter vanity.
all = the whole, or "the sum total". Not everything in the universe, but all the human labours of Ecc_1:3, Ecc_1:8.
vanity. Heb habal, used of that which soon vanishes.