Introducing the OpenAI Sublime Text Plugin
The OpenAI Sublime Text Plugin is a powerful extension designed to enhance coding efficiency with the use of AI assistance, directly within the Sublime Text editor. Compatible with a variety of OpenAI'ish APIs, including llama.cpp and Ollama, the plugin integrates AI capabilities smoothly into the coding environment.
Key Features
- Code Manipulation: Users can append, insert, and edit selected code using OpenAI models, making edits faster and more intuitive.
- Inline Responses with Phantoms: Through non-intrusive overlays known as "phantoms," users receive real-time responses from AI models directly within the editor.
- Chat Mode: Engage with various AI models of your choice in a dedicated chat mode, complete with support for gpt-o1.
- Compatibility: The plugin works with OpenAI'ish APIs, supporting llama.cpp's server, Ollama, and others.
- Project-Specific Settings: Customize chats and assistant configurations according to specific project requirements.
- Expanded Content Tools: Users can send entire files or sections as context to assist in AI processing.
- Live Server Streaming: Experience rapid responses without long delays, thanks to server-side streaming.
- Status Bar Information: Easily access model name, mode, and token statistics from the status bar.
- Proxy Support: Configure proxy settings to suit your network environment.
Using the Plugin
Setting Up
- Requirements: The plugin requires Sublime Text 4 and a valid OpenAI API key, llama.cpp, or Ollama.
- Installation Steps: Add the plugin through Sublime Text's Package Control for easy integration.
Functionality
- AI Assistance: Start by selecting text and invoking chat commands, allowing models to provide responses directly in the editor.
- Managing Chat History: Customize how chat histories are stored for different projects.
- Contextual Selections: Utilize multi-line or multi-file selections to enhance AI understanding in requests.
- Image Handling: Support for image processing with path or clipboard input, limited to png and jpg formats.
Advanced Features
- In-Buffer Use: Use phantoms for seamless in-line interaction without disrupting the editor's content.
- Open Source Models Support: Configure models to use public servers like llama.cpp by adjusting settings.
- Markdown and Multimarkdown Support: Enhanced syntax highlighting available through additional packages.
Important Notes
- Security Advisory: All referenced code is sent to OpenAI servers unless using a custom API provider. Ensure you have the necessary permissions.
- Key Bindings: Customize shortcuts to streamline operations within the Sublime Text environment.
- Known Issues: Address token-related connection problems with easy-to-implement workarounds detailed in the settings.
The OpenAI Sublime Text Plugin offers an innovative approach to coding by leveraging AI to simplify and expedite coding tasks. Whether you're editing code or managing chat interactions, this plugin brings a new level of efficiency and adaptability to your development workflow.