Re:GitHub Copilot available for JetBrains and Neovim
by anigbrowl on Thursday October 28, 2021 @01:31AM
(#29022709)
The power of something like Copilot is in building out stuff you're not familiar with or don't have templates set up. It's probably not as helpful when you already have a clear idea of what you want to do and just need it rather than think about it.
+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.
Re:GitHub Copilot available for JetBrains and Neovim
by matsemann on Thursday October 28, 2021 @03:25AM
(#29023366)
I use it especially much when writing old school java. Instead of writing "MyClass myclass = new MyClass()", I just write "new MyClass()" and get the typing for free. Even better when you do longer expressions and don't want to think about the type up front. Like working with streams or so.
Re:GitHub Copilot available for JetBrains and Neovim
by anigbrowl on Thursday October 28, 2021 @05:02AM
(#29023923)
Yeah this would be quite helpful for me as I tend to just experiment with things in the console (cleaning up messy datasets and the like) and then copy or rewrite into something more structured later. I feel like I'm only using about 20% of what Pycharm can do.
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.