Skip to content

Robbevanherpe1/lazyedit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

101 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

requirements

  • Chocolatey
  • pip
pip install lazyedit

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"

Optional lazyGit when u want to use git feature and didn't download

choco install lazygit

Optional lazyDocker when u want to use docker feature and didn't download

choco install lazydocker

If you don’t see the "default" context, set it manually:

docker context use default

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 : 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>

πŸ™ Docker Integration

lazydocker by Jesse Duffield : lazydocker LazyDocker includes LazyDocker for effortless docker management.

Launching LazyDocker

  • Switch to Docker Mode using Ctrl+d.
  • This opens LazyDocker in a separate floating window.
  • You can manage containers, images, volumes, merges, and networks from LazyDocker without leaving LazyEdit.

Common Docker Commands via LazyDocker

Action Command in LazyDocker
Navigate panels Press <Tab> or arrow keys
Select item Press <Enter>
View container logs Select container + Press <l>
Start container Select container + Press <s>
Stop container Select container + Press <S>
Restart container Select container + Press <r>
Remove container Select container + Press <d>
View container stats Select container + Press <e>
Attach to container Select container + Press <a>
Execute command in container Select container + Press <E>
View image details Select image + Press <i>
Remove image Select image + Press <d>
Pull image Select image + Press <p>
View volume details Select volume + Press <v>
Remove volume Select volume + Press <d>
Filter items Press <f>
Toggle view mode Press <m>
Quit LazyDocker 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
|       β”œβ”€β”€ lazydocker_screen.py # Lazydocker screen integration
|       β”œβ”€β”€ 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

About

When you're too lazy to open a full IDE, but too productive for Notepad. 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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages