so you've got GitHub co-pilot congrats co-pilot can help you level up your skills as a developer in ways that you probably thought were not possible seriously but now that you've got it where do you start how does it work what do you need to learn we're going to answer all of that in this video and I think you'll find that once you know how and where to use co-pilot it is pretty simple to dramatically increase your speed and productivity almost immediately The Secret of GitHub co-pilot is that there isn't anything special that you need to
do to learn how to interact with it all you have to do to use GitHub co-pilot is code that's it just code like you normally would and watch the AI go to work this is called ghost text and it's automatically turned on when you install the extension and log in to GitHub co-pilot you can verify that co-pilot is active by checking for the GitHub co-pilot icon down here in your status bar and if you want to turn co-pilot off for a specific file or language click on this icon and you can disable it you can
also trigger ghost text by writing a comment expressing what you want to accept a ghost text completion press tab if you only want part of the ghost text you can just hold down the controller command keys and press the right arrow to accept as much or little of it as you want and you can hit Escape at any time to dismiss the ghost text you can do a lot with just ghost text and you'll find that co-pilot is remarkably good at anticipating your next move and doing a lot of the work for you for example
if I create a variable called nums co-pilot gives me what I probably want based on the name of the variable and the function in the file already an array of numbers and if I press in or below the function it assumes that I want to call the function and pass in the nums variable which is exactly what I want now ghost text may give you what you want or it may be a close and almost but a Miss in that that case you can see some alternative Suggestions by pressing the control or command and inner
keys this opens up a side panel where you can see more suggestions from the AI that you might like better the other way that you can use GitHub co-pilot right in your code is to chat with it directly right here using something that's called inline chat this can be triggered with the control or command and I Keys none of this code actually exists in your file until you accept it so if you hit Escape it will all just go away no harm no foul inl chat is great for iterating on your code right in line
so for instance here perhaps we want to return a static file at this route instead of what co-pilot gave us so we can highlight the block and iterate on that with inline chat and inline chat always gives you a diff view showing you what's been added and changed so that you can be sure that this is what you want before you accept it GitHub co-pilot also features a more traditional dedicated chat area in the sidebar that you can access by clicking on the chat icon if you've ever used another AI chat before this will feel
very familiar while ghost text and inlight chat are good for helping you code faster chat is good for helping you solve problems and make decisions quicker it is terrific for brainstorming and figuring out implementation details you can always customize where the chat appears in your editor so for instance if you'd like to see your code and your project files in the chat all at the same time you can click on the secondary sidebar icon and just drag the chat into that sidebar all of your chats are saved to a history that you can access at
any time with the history icon at the top of the chat there are a few other places that you'll find GitHub co-pilot and it can be quite useful one of them is when you have a problem in your code you'll find GitHub co-pilot here in the light bulb or quick suggestion menu where it can explain and often even fix your errors right in line co-pilot is extremely good at fixing silly mistakes and explaining compiler errors that otherwise make no sense you'll also find GitHub co-pilot anywhere that you see this sparkle icon this includes places like
the terminal and anywhere that GitHub co-pilot might be able to help you out all you have to do is keep your eye out for the Sparkle and when you see it give it a click and see what copilot can do for you right then and there and believe it or not that's it you now know the essentials of how to interact with GitHub co-pilot go forth and see how much better life can be as a developer and make sure you check out our other videos on GitHub co-pilot for all your AI coding needs happy coding