Skip to content

Txtmax is a fast, lightweight, and open-source text editor and IDE designed for Linux. It supports a wide range of programming languages, offers powerful features like syntax highlighting, file management, code compilation, debugging, and seamless integration with Git. Txtmax also includes unique tools like an interactive Python notebook and more

License

Notifications You must be signed in to change notification settings

Calestial2/Txtmax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image

Typing SVG

Build Status License Version Code Coverage Issues Pull Requests Last Commit GitHub Stars Forks Contributors Downloads

Txtmax

Txtmax is a modern, powerful, lightweight, fast, completely free, open-source advanced text editor designed for Linux. It features syntax highlighting and various file management capabilities. This program allows you to create, view, edit, delete, and get information about text files and more from the command line with ease.

Features

Typing SVG

  • Create Files: Create new text files and save them locally.
  • View Files: View the contents of text files with syntax highlighting for keywords, strings, and comments.
  • Edit Files: Edit specific lines in existing text files.
  • List Files: List all regular files in the current directory.
  • Delete Files: Delete specified text files.
  • Search Files: Search for files by name.
  • Get File Info: Retrieve detailed information about a file, including its name, extension, creation time, modification time, and version control.
  • Line Numbering and Jumping to Specific Lines: Navigate quickly through code with line numbers and jump to specific lines.
  • Search and Replace: Find and replace text within files.
  • Compiling and Running Code: Compile and execute code seamlessly.
  • Move Multiple Files to a Folder: Organize files by moving them to specified folders.
  • Copy Multiple Files to a Folder: Duplicate files and copy them to designated folders.
  • Pattern-Matching AI for Helping Users Use Txtmax: Utilize AI to assist with pattern matching.
  • Rename a File: Change the name of files easily.
  • Test and Fetch Data from RESTful APIs: Interact with APIs to test and retrieve data.
  • Debug and Warn C Files: Identify and resolve issues in C files.
  • Built-in Terminal: Access a terminal directly within the editor.
  • Edit LaTeX Files: Work with LaTeX documents.
  • Convert Files to Tarball: Archive files into tarball format.
  • Package and Dependencies Management: Handle packages and dependencies efficiently.
  • Build and Test a Project with Make: Automate the build and test process for projects using Make.
  • Build and Test a Java Project with Gradle: Manage Java projects with Gradle.
  • Automation: Automate repetitive tasks.
  • Support for .NET Framework: Develop and run .NET applications.
  • Run Flask and Python App on Web Server: Deploy Flask and Python applications on a web server.
  • Robust Error Handling: Improve error handling mechanisms.
  • Store your API Keys: Store your API Secrets
  • Notebook: An Interactive Notebook for Python
  • Auto Completion: An Auto Completion
  • Retrieve File Size: Retrieve your file size
  • Make an ignore file: Make an .gitignore file
  • SQLite Integration: Supports SQLite Database
  • OpenAI Integration: Integrates with OpenAI API Key
  • Tmux Integration: Integrates with Tmux
  • Benchmark: An Benchmark shows Execution Time CPU Usage and more
  • Security Features: Integration with AES and GPG
  • Robust Git Integration: Seamlessly integrate with Git for version control.

Commands

Typing SVG

  • help: List all available commands.
  • man txtmax: Access the comprehensive manual for Txtmax.
  • create : Create a new file, write code in 80 languages, save and quit with :wq, type a commit message, branch, and version, and save it locally.
  • rename: Rename a file.
  • movef: Move multiple files to a folder.
  • copy: Copy multiple files to a folder.
  • files: List all files in the current directory.
  • view : View the contents of a file with syntax highlighting.
  • edit : Edit a specific line in the file.
  • delete : Delete a specified file.
  • search : Search for files by name.
  • info : Get detailed information about the file (name, extension, creation time, modification time, and version control such as commit message, branch, and version).
  • examples: Show examples of "Hello, World!" programs in various languages including C, Python, Java, JavaScript, C++, Rust, Ruby, Elixir, Kotlin, TypeScript, Dart, Objective-C, and Go.
  • sql: Display example queries for SQL databases, including SQL, PostgreSQL, and NoSQL (MongoDB).
  • run: Run your code quickly without exiting Txtmax using compilers and interpreters such as GCC, Clang, g++, Python, Lua, Ruby, nasm, tcl, and rustc, perl, go, Node.js. It will prompt for the file name and extension, followed by the compiler or interpreter name, and then prompts for an external library name if theres no then type "n" and then execute the code.
  • packages: Install packages by choosing a package manager (pip, npm, gem, go, yarn, composer, cargo, nuget, or apt), entering the package name, and installing it. (Requires prior installation of Python, Node.js, and other dependencies)
  • api: Test RESTful APIs directly in the editor by entering a URL to fetch data via curl.
  • axios: Fetch RESTful API data from a URL by entering a filename, writing code, quitting with :wq, and running it.
  • advance: Enter a file name with its extension to view its content, jump to specific lines, and perform search and replace operations.
  • debug: Debug and warn C files. Choose between debugging code or running code, then provide the project name and filename including its extension to see debug or warning messages.
  • latex: Edit LaTeX files.
  • dotnet: Support for .NET Framework. Choose a .NET component (currently supports .NET SDK and ASP.NET), enter a filename including its extension, write content, quit with :wq, and run the code. Use the packages command for nuget (requires prior installation of .NET).
  • tarball: Convert files to tarball format.
  • terminal: Access a built-in terminal to type commands directly in the editor.
  • localhost: Start a Python or Flask app on a web server. Choose between Flask or PythonHTTP, enter a filename including its extension, and run it on localhost:8080.
  • recycle: Recover deleted files by listing all deleted files and typing "recover ." to restore them.
  • environment: Store your API key secrets securely. You will be prompted to provide database credentials, the API name, and its secrets. You can type 'y' or 'n' for "Debug Mode," and then you will be asked for the server port. Based on your inputs, a .env file will be generated.
  • ignore: Create a .gitignore file. You will be prompted to choose from options such as "nodejs," "env," or "log." Based on your selection, a .gitignore file will be generated.
  • version: Although not included in manual and help, it creates a version.txtmax to see details like Name, Size, Maintainer
  • sqlite: Work with an SQLite database. You will be prompted to provide a filename, including its extension. Then, enter your SQLite code, and it will be saved locally and it will run it
  • openai: Integration with OpenAI prompts for a filename, including its extension. It then prompts for Pasting OpenAI API key, it prompts for the OpenAI model name. Based on the provided inputs, it generates an python code of using OpenAI API Key and executes that Python code.
  • size: Retrieve File Size, This prompts the user for a filename, including its extension, and then displays the file size.
  • benchmark: Shows Execution time and CPU Usage and Additional things like System CPU Time and Total CPU Time and Max Memory usage and Page Faults and Context Switches
  • exit: Exit the Txtmax editor.

Automation

Typing SVG

We have introduced an automation feature to simplify your tasks.

Commands:

  • make: Build and test a project with Make. Enter the project name and filename including its extension, and Txtmax will generate an Makefile based on inputs and run the code.
  • gradle: Build and test a Java project with Gradle. Provide the necessary inputs, and Txtmax will generate and run the code based on the inputs.

AI

Typing SVG

We Introduced an Pattern-Matching AI to help users use Txtmax Better it's had many Predefined Questions and increase your productivity.

Conversations:

  1. Running Code

    • Queries: "run my code", "how to run"
    • Response: Steps to run code in Txtmax:
      • Step 1: Type "run" in Txtmax, and it will ask for the filename including its extension.
      • Step 2: Choose a compiler or interpreter such as GCC, Clang, Python, Node, Ruby, etc.
      • Step 3: Txtmax will seamlessly run your code.
  2. Hello World Examples

    • Queries: "examples of hello world", "hello world example"
    • Response: Type "examples" command in Txtmax to get Hello World examples in various languages.
  3. Creating a File

    • Queries: "create a file", "how to create"
    • Response: To create a file in Txtmax, type "create ". Then write contents and save with :wq.
  4. Deleting a File

    • Queries: "delete a file", "remove file"
    • Response: To delete a file, type "delete ". This will remove the specified file.
  5. Searching for a File

    • Queries: "search a file", "find file"
    • Response: To search for a file, type "search ". It will locate files matching the given name.
  6. Listing All Files

    • Queries: "list all files", "view files in directory"
    • Response: To list all files in the current directory, type "files".
  7. Editing a File

    • Queries: "edit file", "modify file"
    • Response: To edit a file, type "edit ".
  8. Getting File Information

    • Queries: "get file info", "file details"
    • Response: To get file details, type "info ".
  9. Debugging C Files

    • Queries: "debug c files", "check c code errors"
    • Response: To debug C files, type "debug" and provide the project name and filename.
  10. Testing APIs

    • Queries: "test apis", "fetch restful api data"
    • Response: To test RESTful APIs, use "api" or "axios" command.
  11. Creating a Tarball

    • Queries: "convert file to tarball", "make tar file"
    • Response: To create a tarball file, type "tarball ".
  12. Installing Packages

    • Queries: "install package", "package manager"
    • Response: To install a package, use "packages" command and choose a package manager.
  13. Editing LaTeX Files

    • Queries: "latex files", "edit latex"
    • Response: To create and edit LaTeX files, use "latex .tex".
  14. Unrecognized Queries

    • Response: If the query is not understood, it will respond with "I'm sorry, I don't understand your query. Try asking something related to Txtmax commands!".

Txtmax Notebook

Typing SVG

Txtmax Notebook is an interactive notebook for Python developers written in C.

Features:

  • File Handling: You'll be prompted to enter a filename, including its extension.
  • Text-Based Cells: Write your Python code in text-based cells with syntax highlighting.
    • If-else statements are highlighted in green.
    • Int types are highlighted in blue.
    • Comments are highlighted in black.
    • Variables are highlighted in light blue.
    • Loops are highlighted in pink.
    • Print and input functions are highlighted in orange.
  • Automatic Execution: When you write your Python code, it will automatically execute.
  • Package Management: You can also install packages using pip.

Commands:

  • save: Creates a .txtmaxnb file, storing cells and their outputs.
  • exit: Exits the Txtmax Notebook.

In Txtmax, type the command notebook. It will go to system(), compile notebook.c, and run notebook.c, allowing you to use Txtmax Notebook.

Txtmax Auto Completion

Typing SVG

We introduced Txtmax Auto Completion to streamline the process of writing code, specifically C code. It's built from scratch to enhance your coding efficiency.

In Txtmax, you can use the command auto_completion to activate Txtmax Auto Completion.

Upon activation, it will prompt you for the filename, including its extension. You can then write the file's contents and exit with :wq.

Additionally, Txtmax offers syntax highlighting:

  • Keywords such as int, float, if, and return are highlighted in green.
  • Loops are highlighted in magenta.
  • Built-in functions (e.g., printf) are highlighted in red.
  • Comments are highlighted in blue.

As you type code, Txtmax will suggest relevant keywords to assist you.

Txtmax Tmux Intregration

Typing SVG

The Txtmax Tmux Integration enables efficient multi-task management within Txtmax through seamless integration with Tmux.

Getting Started: To begin using Txtmax Tmux Integration, type "multiplexer" within Txtmax.

How It Works:

  1. Session Initialization:
    • Prompts the user for a session name.
    • Creates a new Tmux session with the specified name.
    • Enters an interactive loop where the user can input commands to be sent to the Tmux session.
    • After the user types "exit," they are attached to the session to view the results of the executed commands.

Key Features:

  1. Session Management:

    • Creates a new detached Tmux session.
    • Validates successful session creation.
    • Handles session names cleanly.
  2. Command Execution:

    • Provides an interactive command prompt.
    • Executes commands within the Tmux session.
    • Supports multi-word commands.
    • Includes a built-in 'exit' command to terminate input.
  3. Safety Features:

    • Sanitizes input to prevent errors.
    • Performs error checking for system calls.
    • Prevents buffer overflow.
  4. User Experience:

    • Offers clear prompts and status messages.
    • Ensures a 1-second delay between commands for reliability.
    • Attaches the final session for direct user interaction.

Note: Tmux must be installed on the system. Tested on Linux systems with Tmux version 3.2+.

Txtmax Security

Typing SVG

Txtmax Security is a feature integrated with Txtmax. It integrates AES via OpenSSL and GPG.

To start using Txtmax Security, type "security" in Txtmax.

You will see:

Welcome to Txtmax's Security with AES and GPG Integration.

Enter command (type 'help' for options):

Commands:

  • aes-encrypt: Encrypts a file using AES-256-CBC. You will be prompted for the input file name and the encrypted output file name.
  • aes-decrypt: Decrypts an AES-encrypted file. You will be prompted for the encrypted file name, the decrypted output file name, and the decryption password.
  • gpg-export-key: Exports a GPG secret key. You will be asked for an email address and the private key filename.
  • gpg-delete-key: Deletes a GPG key. You will be asked for an email address.
  • gpg-import-key: Imports a GPG public key. You will be asked for the private key.
  • help: Displays this help message.
  • exit: Exits the program.

Features:

  1. Security Enhancements:

    • Password input hiding during entry.
    • Uses PBKDF2 for key derivation (modern security practice).
    • Suppresses error messages for OpenSSL commands.
  2. Robust Input Handling:

    • Proper input sanitization.
    • Filename quoting to handle spaces in paths.
    • Buffer overflow prevention.
  3. Advanced GPG Operations:

    • Complete key deletion (both secret and public).
    • Armored key export.
    • Batch mode operations for non-interactive execution.
  4. User Experience:

    • Clear command prompts.
    • Helpful command list.
    • Error handling for failed operations.

Note: This code requires OpenSSL and GPG to be installed on the system. The functionality has been tested on Linux systems and may require adjustments for other platforms.

UI

Terminal-based, feature-rich, user-friendly, and lightweight, it presents '~/txtmax' as the command prompt, enabling users to enter commands. Upon launching, it greets with: 'Welcome to txtmax! Type 'help' for a list of available commands.

Logo

Logo

Syntax Highlighting

Txtmax uses ANSI colors for syntax highlighting to enhance readability. The following colors are used:

  • Keywords: Green
  • Strings: Blue
  • Comments: Yellow

Installation and Usage

To get started with Txtmax, follow these steps:

  1. Install: Install it by running:
git clone https://github.com/Calestial2/Txtmax 
cd Txtmax
cd src
gcc txtmax.c -o txtmax
./txtmax
  1. Makefile: You can use Makefile:
git clone https://github.com/Calestial2/Txtmax
cd Txtmax
cd src
make
make clean
./txtmax

OS Compatibility

Available on Linux and Unix-like systems (macOS and BSD). For Other OS use Emulators like WSL and Cwgwin or MinGW

Performance

Extremely fast and lightweight, faster than GNU Nano and Vim because:

  • C is fast in itself.
  • It uses many standard libraries.

License

This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software under the terms of the license. See the LICENSE file for more information.

Contributing

Contributions are welcome! Here's how you can help:

  • Report bugs or request features using GitHub Issues
  • Submit pull requests with clear descriptions of changes.
  • Ensure your code follows the style and design of the project.

For detailed guidelines, see CONTRIBUTING.md.

Supported Languages

Our platform supports a vast array of popular programming languages, encompassing both low-level and high-level categories. This includes functional languages, legacy languages still in use today, game engine languages, educational languages, and many rare or less common languages.

Supported Languages:

  1. C
  2. Python
  3. Java
  4. JavaScript (JS)
  5. C++
  6. Rust
  7. Ruby
  8. Elixir
  9. Kotlin
  10. Swift
  11. TypeScript
  12. Dart
  13. Go
  14. Haskell
  15. R
  16. PHP
  17. Lua
  18. Objective-C (ObjC)
  19. Groovy
  20. Erlang
  21. Bash
  22. Julia
  23. F# (F-sharp)
  24. C# (C-sharp)
  25. Scheme
  26. Clojure
  27. Fortran
  28. COBOL
  29. VHDL
  30. Lisp
  31. SQL
  32. MATLAB
  33. Perl
  34. Scala
  35. HTML
  36. PostgreSQL
  37. NoSQL
  38. ActionScript
  39. Ada
  40. Nim
  41. Crystal
  42. D
  43. PureScript
  44. Assembly
  45. Prolog
  46. Zig
  47. Brainfuck
  48. Algol
  49. LabVIEW
  50. Mercury
  51. Shellscript
  52. OCaml
  53. TXL
  54. Xojo
  55. Forth
  56. Verilog
  57. AWK
  58. Turing
  59. GDScript
  60. Fantom
  61. Zsh
  62. AutoHotKey
  63. Ceylon
  64. ChucK
  65. Natural
  66. Pike
  67. Oberon
  68. XML
  69. Yaml
  70. JSON
  71. Visual Basic
  72. HTML5
  73. CSS
  74. Babel
  75. Sass
  76. Babel
  77. SAS
  78. Pl SQL
  79. Graphql
  80. SQLite

Libraries

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <ctype.h>
#include <sys/stat.h>
#include <time.h>
#include <errno.h>
#include <regex.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
#include <sys/time.h>
#include <sys/resource.h>

Txtmax Source Code Files

  • README.md: The README file
  • LICENSE.md: The License file (GNU General Public License)
  • src/txtmax.c: The source code of Txtmax
  • src/notebook.c: The Source code of Txtmax Notebook
  • src/auto_completion.c: The source code of Txtmax Auto Completion
  • src/Makefile: Makefile to automate the process
  • src/security.c: Code of Txtmax Security
  • CHANGELOG.md: Document detailing changes
  • CONTRIBUTING.md: Comprehensive guidelines for contributing to Txtmax

Why Choose Txtmax?

  • Comprehensive File Management: Txtmax offers comprehensive file management, including creating, listing, viewing, searching files, deleting, and editing files and jumping to specific lines and Search And Replace.
  • Version Control and Git Integration: Supports robust Git integration and robust error handling for every command.
  • Open Source and Free: Fully open source and completely free (no hidden costs) under the GNU General Public License.
  • Syntax Highlighting and Multi-Language Support: Supports over 80 languages with extensive syntax highlighting.
  • Compiling and Running Code: Compile and run C, Python, JavaScript codes with compilers and interpreters such as GCC, Clang, Python, Node, Nasm, Tcl, Bash. without leaving Txtmax.
  • Package and Dependency Management: Install packages directly from the editor easily.
  • Rich Documentation: Detailed help and comprehensive manual for beginners and Had Examples of Hello world for various languages to get started
  • Extremely Fast and Easy to Use: Faster than GNU Nano and Vim, and very easy to use with commands that are easy to understand and use, offering a lower learning curve.
  • Terminal Integration: Supports typing Terminal Commands in the Editor
  • Frequent Major Updates: Frequent new major updates

About

Txtmax is a fast, lightweight, and open-source text editor and IDE designed for Linux. It supports a wide range of programming languages, offers powerful features like syntax highlighting, file management, code compilation, debugging, and seamless integration with Git. Txtmax also includes unique tools like an interactive Python notebook and more

Topics

Resources

License

Stars

Watchers

Forks