// Create a redis client
Writing that probably takes a longer time than just doing it with the IDE help in jetbrains, though?Press "r", press "." to autocomplete so it now says "redis.", then write "cC" and it suggests createClient (or write "create" or "client" if you're not sure what you're looking for). Now it says "redis.createClient()". Press ctrl+alt+v to extract a variable or write ".const" and press tab to apply the const live template. Ending up with your result in two seconds.
+1 for the variable extraction thing, I've been using their IDE for ages and it never occurred to me to look for such a thing.