Another place in cursor where you can use this inline chat
is the terminal, because since this is, in the end, Visual Studio
Code, at least the base is Visual Studio Code, you have a terminal
integration. You can open an integrated terminal
here, like for example, git init if you wanted to do that or anything
else. Now, let's say I want to initialize a new git
repository here, but I wanna change the name of the user
also maybe tweak some upper settings, and I don't remember all the exact git
commands I need to execute for that.
Well, in the terminal, with the terminal selected, I can
also press the shortcut that's shown here, Command+K or
Control+K depending on the operating system, to open this inline chat in the
terminal. And then you can describe the command you
for example, "Init new git repo for user
with username max and email
max@example.com." Now, you could
press this shortcut or click this button here to ask a quick
and get an answer instead of creating a command.
If you hit Enter or press this button though, a command will be created
instead. So you see, it did now generate this command.
Now, of course, you should always carefully check these
commands, especially if they're about deleting or moving
files. You should not blindly trust the AI
but it's a quick way of getting some commands which you might not remember by
heart. Now, what's very important is that these commands
are created, they're not executed on your
behalf. You still have to press the Enter key
execute them, so you still have control over them
don't have to fear that some unintended command
why you should carefully read and check them.
This is, of course, especially useful if you, for example, want to find all
files that are from today and
end with .TXT or
.CSV. If you again execute this
here, you'll get a command you can execute on
find all these files based on the criteria you
defined. And this is definitely not a command I
to be honest.