Infrastructure and configuration management tools use text files to document desired configurations and required settings. Admis can manage configuration files statically on a per-system basis or integrated into a larger infrastructure as code environment.
IaC environments use various configuration file formats and languages that have different features, including the following:
- HCL. Human-readable, JSON-compatible, key-value pairs, hierarchical structure and focuses on Terraform (but usable with other products).
- INI. Human-readable, plain-text, section-based structure, key-value pairs and simple.
- JSON. Human-readable, key-value pairs and strict syntax.
- TOML. Human-readable, section-based structure, key-value pairs and simple.
- XML. Human and machine-readable, self-descriptive structure and platform independent.
- YAML. Human-readable, whitespace for indentation and key-value pairs.
Each language uses a discrete set of rules and format instructions. Straying from rules and formats can lead to configuration problems.
This article explores the top text editors for managing configuration files. Administrators can select one or more editors to use language and format-specific features. The author selected these tools as examples based on features crucial to configuration file management, personal experience, market adoption and industry recognition. Some of the following configuration file editors are OS-specific, while others work across all platforms:
1. AWS Cloud9
The AWS Cloud9 IDE offers extensive development features, supporting programming languages such as Python, JavaScript and C++. It includes collaboration tools like editing and chat, making it easier to work with remote administrators. It also integrates into other AWS deployment and management tools.
Cloud9 supports YAML, JSON and other standard configuration file types. Because it runs in a browser, access to Cloud9 is platform independent. It primarily serves as a tool in conjunction with AWS CloudFormation.
Cloud9 is free, but only for features in the free tier. Additional resources, such as EC2 and EBS, require payment that varies per use case.
2. BBEdit
BBEdit (Bare Bones Editor) is a macOS-specific tool for coding HTML and other text. It’s not free, but it is powerful and highly configurable. This editor includes the usual array of syntax checking and code completion capabilities.
BBEdit is free, but feature use is limited. BBEdit offers a one-time license purchase that enables users to access all features. Individual plans start at $59.99.
3. CotEditor
CotEditor is an open source macOS editor. This application offers syntax highlighting, split editor screens, and extensive find and replace options. It’s available for free and distributed under the Apache 2.0 license. Contributors add configuration scripts to enhance language support, though it handles JSON and similar file types out of the box.
CotEditor is free and offers in-app purchases.
4. GitHub Codespaces
GitHub Codespaces is cloud-based, enabling access from nearly any platform. It offers code editing across various configuration files and programming languages. It includes collaboration features and a high degree of customization. GitHub Codespaces recognizes the standard group of configuration file formats.
GitHub Codespaces is free with limited storage and core hours per month. GitHub Free for personal accounts provides 120 core hours and 15 GB of storage per month. GitHub Pro provides 180 core hours and 20 GB of storage per month. Additional fees vary for extensive use and needs.
5. Notepad++
Notepad++ is a universal code editor for Windows. This free tool supports a wide variety of languages. Windows administrators use Notepad++ to manage .ini files, handle scripting tasks and program basic applications.
Notepad++ is a powerful program on its own, but it is also supported by an extensive community that creates plugins. Many of these exist for JSON, XML and others, in addition to the built-in functionality of YAML.
Notepad++ is a free and open source editor.
6. Sublime Text
Sublime Text supports Linux, macOS and Windows. Sublime’s integration with Git and cross-platform support make it a popular editor. It has innovative new features and enhancements, like multiwindow views, GPU rendering and an updated syntax definition capability. Sublime Text is best for Terraform administrators working with HCL.
Sublime Text is free to download and evaluate, but it requires a subscription for full access. Individual subscriptions are $99 and come with three years of updates.
7. Vim
The Vim text editor is a standard in the Linux world and is available for macOS and Windows. Vim is a bit of an old-school approach, but it works well with its customization options and extensibility through plugins. Community-developed plugins exist for JSON, YAML and other common configuration file languages. Admins working with JSON or YAML in Vim should look at the following plugins:
- Jdaddy.vim.
- Jsonyaml.vim.
- Vim-json.
- Vim-yaml.
- Yaml-Revealer.
Vim is a free and open source editor.
8. Visual Studio Code
Microsoft Visual Studio Code offers broad language support and extensions for additional flexibility and improved features. It assists with PowerShell scripting needs and has AI coding support using GitHub Copilot and Git integration. Visual Studio Code effectively manages Azure and other cloud platforms.
Admins should check for extensions that integrate with their language preferences. Visual Studio Code is free and available for Linux, macOS, Windows and online.
Bonus: Whatever editor you have available
There’s nothing wrong with managing configuration files using an OS’ built-in text editor. These editors include Linux Nano, macOS TextEdit and Windows Notepad.
Always use a regular text editor. Avoid full word processors for coding projects, including configuration files. Tools like Microsoft Word hide additional formatting instructions and other components that interface with the plain-text requirements of configuration files.
Admins rely on text editors to author and update files. Many editors recognize the various file formats and provide basic functionality that manages configuration files in a large-scale IaC environment more easily. These features include the following:
- Code completion.
- Format enforcement.
- IaC tool integration.
- Linting and error detection.
- Syntax highlighting.
- Version control integration.
Damon Garn owns Cogspinner Coaction and provides freelance IT writing and editing services. He has written multiple CompTIA study guides, including the Linux+, Cloud Essentials+ and Server+ guides, and contributes extensively to Informa TechTarget, The New Stack and CompTIA Blogs.