Steal some vim things from @robgolding63