Implement preview and vim mode