Features powered by Command
Command enables streamlined experiences for a few common operations.
Above functions and classes, Windsurf renders code lenses, which are small, clickable text labels that invoke Windsurf’s AI capabilities on the labeled item.
✕
to the right of the code lens text.The Refactor
and Docstring
code lenses in particular will invoke Command.
Refactor
, Windsurf will prompt you with a dropdown of selectable, pre-populated
instructions that you can choose from. You can also write your own. This is equivalent to highlighting the function and invoking Command.Docstring
, Windsurf will generate a docstring for you above the function header.
(In Python, the docstring will be correctly generated underneath the function header.)Encouraging readable and maintainable code, one docstring at a time.
This feature allows you to copy code and paste it into a file in your IDE written in a different programming language.
Use ⌘+⌥+V
(Mac) or Ctrl+Alt+V
(Windows/Linux) to invoke Smart Paste.
Behind the scenes, Windsurf will detect the language of the destination file and use Command to translate the code in your clipboard.
Windsurf’s context awareness will try to write it to fit in your code, for example by referencing proper variable names.
Some possible use cases:
Features powered by Command
Command enables streamlined experiences for a few common operations.
Above functions and classes, Windsurf renders code lenses, which are small, clickable text labels that invoke Windsurf’s AI capabilities on the labeled item.
✕
to the right of the code lens text.The Refactor
and Docstring
code lenses in particular will invoke Command.
Refactor
, Windsurf will prompt you with a dropdown of selectable, pre-populated
instructions that you can choose from. You can also write your own. This is equivalent to highlighting the function and invoking Command.Docstring
, Windsurf will generate a docstring for you above the function header.
(In Python, the docstring will be correctly generated underneath the function header.)Encouraging readable and maintainable code, one docstring at a time.
This feature allows you to copy code and paste it into a file in your IDE written in a different programming language.
Use ⌘+⌥+V
(Mac) or Ctrl+Alt+V
(Windows/Linux) to invoke Smart Paste.
Behind the scenes, Windsurf will detect the language of the destination file and use Command to translate the code in your clipboard.
Windsurf’s context awareness will try to write it to fit in your code, for example by referencing proper variable names.
Some possible use cases: