Kite announces Intelligent Snippets for Python
We’re excited to share Intelligent Snippets with you, our latest feature designed to make your completions experience even more seamless. Kite’s Intelligent Snippets allow you to complete complex, multi-token statements with ease by generating context-relevant code snippets as you type. Whereas typical snippets must be manually defined in advance, Kite’s Intelligent Snippets are generated in real-time based on the code patterns Kite finds in your codebase.
- Intelligent Snippets are live in the latest version of Kite (20190905.0) for all of the editors we support: Atom, PyCharm/IntelliJ, Sublime Text, VS Code, and Vim.
- Global and local functions are supported.
- Users need half the keystrokes when calling functions with Intelligent Snippets.
- Visit Kite’s download page to install Kite.
Developers call billions of functions daily
Developers write approximately 1.5 billion function calls per day, many of which are repetitive. In the past, developers referenced docs or copy-pasted snippets in the event they didn’t remember a function’s signature. We recognized this was suboptimal, and built Kite’s Intelligent Snippets as a faster solution for calling functions in Python.
The problem with traditional snippets
Snippets are pieces of code that can be inserted into a code buffer and then edited immediately afterwards. Traditionally, snippets were manually defined ahead of time by developers. They were static and could not adapt to developers’ code as it changed. As a result, snippets have been limited to straightforward code patterns.
For example, the video below shows a developer using a snippet to insert the structure of a function definition and then subsequently filling in the rest of the function.
Kite’s Intelligent Snippets engine makes snippets more powerful by generating them on the fly based on the code you’re working with. Kite automatically detects common patterns used in your codebase and suggests relevant patterns while you are writing code.
Here’s an interactive playground showcasing our new feature. If you’re on a desktop computer, take over the demo loop by clicking “Let me try typing!” (Mobile users, you can see the loop, but you’ll have to move to desktop to test drive it.)
How we built Intelligent Snippets
Intelligent Snippets build on the code engine at the heart of Kite’s completions experience. Kite first indexes your codebase and learns how functions are commonly used. Then when you call a function, Kite suggests snippets for that function to easily complete it. Kite’s autocomplete still suggests completions for each argument, too.
Intelligent Snippets not only save you keystrokes; they also reduce the number of times you’ll need to look up docs for the call patterns you need.
Intelligent Snippets support global and local functions
The video below shows a developer using Intelligent Snippets to quickly call
Intelligent Snippets also work on functions that you have defined yourself, like in the video below:
The future of Intelligent Snippets
We believe Intelligent Snippets will be a cornerstone of how developers interact with the AI-powered coding tools of the future. We’ve begun by using Intelligent Snippets to help developers write function calls, but we see broader uses for them coming soon. Intelligent snippets could be useful for writing try/except blocks or unit test cases, for example. We’re looking forward to bringing this technology to more use cases imminently.
What to expect the rest of the year
We have many more exciting projects in the works: We’re taking advantage of the latest research to make our machine learning models smarter. We’re building new editor integrations. Plus there’s a few more projects we can’t tell you about quite yet. Make sure to sign up for updates below to ensure you get news when we release a big feature!