Wash sales only apply to losses, you can sell a security to take the gains and then pay the tax short or long term depending on your holding period, then immediately rebuy the same security and hold it with a higher cost basis. Vanguard should not have a problem with you doing this unless you have bought, sold and rebought within a very short timeframe like 30 days, each brokerage has their own time frame, they don't like rapid turnover in funds it causes overall tax inefficiency in the fund, you will have no issue doing this with ETF's however as they can be created on the fly (Creation Units).
Also your mutual fund company might not like it if you do this often, for the same tax reasons mentioned above, they might call you or send you a leter of warning, but you should be have no issues, if you are concerned just buy the ETF version of the mutual fund or vice versa and the issue will be nonexistent as they are not the same security even though it is the same basket of stocks being tracked in the same index.
This is tax gain harvesting, if you happen to have a loss in some other security that would offset the gain then you can avoid the taxes completely, but that is a separate issue.
-Mister FancyPants