Skip to main content

A textual-based lazy editing tool

Project description

LazyEdit - The Effortless TUI Code Editor

PyPI - Version PyPI - Python Version

When you're too lazy to open a full IDE, but too productive for Notepad.

Code editing shouldn't be hard work. Be lazy. Be efficient.

LazyEdit is a lightweight, terminal-based code editor with an integrated PowerShell terminal designed for developers who want a streamlined editing experience without leaving the command line.

preview

โœจ Features

  • All-in-One Interface: File browser, text editor, and PowerShell terminal in a single window
  • Keyboard-Driven: Navigate and edit efficiently with intuitive keyboard shortcuts
  • Syntax Highlighting: Makes your code more readable and easier to understand
  • Integrated Terminal: Run commands without switching applications
  • Lightweight: Minimal resource usage compared to full IDEs
  • Windows-Optimized: Built specifically for Windows with PowerShell integration

๐Ÿ“‹ Table of Contents


๐Ÿš€ Installation

pip install lazyedit

Optional lazyGit when u want to use git feature

pip install lazygit

That's it! No complex setup or configuration required.

If it fails to run your Python Scripts folder might not be in the system PATH.

Run Temporary:

$env:Path += ";C:\Users\YourUserName\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts"

Run Permanent:

[System.Environment]::GetEnvironmentVariable("Path", "User") -split ";" | Out-File -FilePath "$env:TEMP\PathBackup.txt"
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "User")
$newPath = [System.Environment]::GetEnvironmentVariable("Path", "User") + ";C:\Users\YourUserName\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts"

Now try running lazyedit again.

๐Ÿƒโ€โ™‚๏ธ Quick Start

After installation, simply run:

lazyedit

You'll be greeted with a three-panel interface:

  • Left panel: File browser
  • Main panel: Text editor
  • Bottom panel: PowerShell terminal

๐Ÿ“– Usage Guide

File Navigation

  • Use Directory Mode (Ctrl+2) to browse files
  • Navigate with arrow keys to select a file
  • Press Space to open the selected file in the editor
  • Press Enter to create a new file
  • Press Backspace to delete a file

Editing Files

  • Switch to File Editing Mode (Ctrl+3) to edit the opened file
  • Use standard keyboard navigation (arrows, Home, End) to move around
  • Save your changes with Ctrl+S

Using the Terminal

  • Switch to Terminal Mode (Ctrl+5) to use the PowerShell terminal
  • Execute commands as you would in a normal PowerShell window
  • The terminal shows your current directory relative to where LazyEdit was launched

๐Ÿ™ Git Integration

lazyedit by Jesse Duffield's : lazygit LazyEdit includes LazyGit for effortless repository management.

Launching LazyGit

  • Switch to Git Mode using Ctrl+g.
  • This opens LazyGit in a separate floating window.
  • You can manage branches, commits, merges, and pull requests from LazyGit without leaving LazyEdit.

Common Git Commands via LazyGit

Action Command in LazyGit
Stage changes Select file + Press <Space>
Unstage changes Select file + Press <U>
Commit changes Press <C> and enter message
Push to remote Press <P>
Pull from remote Press <Shift+P>
Switch branches Press <B>
Create new branch Press <N>
Merge branches Press <M>
Stash changes Press <S>
View logs & history Press <L>
Quit LazyGit Press <Q>

โŒจ๏ธ Keyboard Shortcuts

General Shortcuts

Shortcut Action
Ctrl + Q Quit LazyEdit
Ctrl + 2 Switch to Directory Mode
Ctrl + 3 Switch to File Editing Mode
Ctrl + 5 Switch to Terminal Mode
Ctrl + g Switch to Git Mode

๐Ÿ“‚ Directory Mode

Shortcut Action
Enter Create a new file in the current directory
Backspace Delete the selected file
Space Open the selected file in the text editor
โ†‘ / โ†“ Navigate the file list

๐Ÿ“ File Editing Mode

Shortcut Action
Ctrl + S Save the currently open file
โ†‘ / โ†“ Move cursor line up/down
Home / End Move to start/end of the current line
Ctrl + A Select all text
Ctrl + X Cut selected text
Ctrl + C Copy selected text
Ctrl + V Paste copied text
Ctrl + Z Undo last action
Ctrl + Y Redo last undone action
Ctrl + โ† Move cursor one word left
Ctrl + โ†’ Move cursor one word right
Shift + โ† Select text left
Shift + โ†’ Select text right
Ctrl + Backspace Delete word left
Ctrl + Delete Delete word right
Ctrl + Shift + K Delete current line
f6 Select the current line
f7 Select all text in the document

๐Ÿ’ป Terminal Mode

Shortcut Action
Ctrl + C Send interrupt signal (in Terminal)
Ctrl + L Clear terminal screen

๐Ÿ’ป Development

Want to contribute or run from source? Follow these steps:

# Clone the repository
git clone https://github.com/Robbevanherpe1/lazyedit.git
cd lazyedit

# Create and activate development environment
hatch env create
hatch shell

# Install in development mode
pip install -e .

# Run LazyEdit
lazyedit

Project Structure

lazyedit/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ lazyedit/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ __about__.py
|       โ”œโ”€โ”€ lazygit_screen.py # Lazygit screen integration
โ”‚       โ”œโ”€โ”€ directory.py      # File browser functionality
โ”‚       โ”œโ”€โ”€ fileEditor.py     # Text editing functionality
โ”‚       โ”œโ”€โ”€ gui.py            # Main application interface
โ”‚       โ””โ”€โ”€ terminal.py       # PowerShell terminal integration
โ”œโ”€โ”€ tests/
โ”‚       โ”œโ”€โ”€ directory/
โ”‚       โ”œโ”€โ”€ fileEdit/
โ”‚       โ”œโ”€โ”€ terminal/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ test_basic.py
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE.txt

๐Ÿ“ License

LazyEdit is distributed under the terms of the EPL license.

Made with โค๏ธ by *Robbe

Inspiration by Jesse Duffield's lazygit and lazydocker

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazyedit-0.0.8.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazyedit-0.0.8-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file lazyedit-0.0.8.tar.gz.

File metadata

  • Download URL: lazyedit-0.0.8.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for lazyedit-0.0.8.tar.gz
Algorithm Hash digest
SHA256 6847b8b449a23698513875781af13308f87a0de56341e74123d05316fb99493a
MD5 59c2cc907d32516fd16423eeab0bb8bb
BLAKE2b-256 8cbfeb18300b31110d1e55b3331217e410fdfdc7830baf77eaad027456b6967f

See more details on using hashes here.

File details

Details for the file lazyedit-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: lazyedit-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for lazyedit-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9b00d183b721c3e1219a9cfb36daaa213b334cf34a9dee0d22d998ba55d7794b
MD5 6e79689682c9a9319bbc0a7a611f96dc
BLAKE2b-256 9bd265cbe39d3fcb120a6bcff9adf8047955254a73794518e75c817f5b652b74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page