Metadata-Version: 2.4
Name: femto-editor
Version: 0.0.5
Summary: Femto - a tiny nano-style terminal text editor in pure Python
Author: Femto Contributors
License: MIT License
        
        Copyright (c) 2024 Femto Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/codewithzaqar/femto
Keywords: editor,terminal,curses,nano,text-editor,tui
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console :: Curses
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Editors :: Text Processing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: windows-curses; sys_platform == "win32"
Dynamic: license-file

# Femto v0.0.4

Femto is a tiny, nano-style terminal text editor written in **pure Python**.
It ships with zero runtime dependencies on POSIX system (standard-library `curses` only) and automatically pulls `windows-curses` on Windows.

Femto supports multi-buffer editing, soft line wrapping, syntax highlighting, regex search & replace, mouse support, and is fully Unicode (CJK/Emoji) aware.

<p align="center">
    <img src="assets/femto-demo.png" alt="Femto v0.0.3 Terminal Editor Demo" width="800">
    <br>
    <em>Femto v0.0.3: Featuring the F1 help screen, stateful Python docstring highlighting, word-boundary wrapping, and multi-match search overlays.</em>
</p>

## Install

```bash
# From PyPI (Recommended)
pipx install femto-editor
# or
pip install femto-editor

# From source
git clone https://github.com/codewithzaqar/femto.git
cd femto
pip install .
```

After installation, the `femto` command is available globally.

## Usage
```bash
femto [file ...]        # open one or multiple files
femto a.py x.py         # open two buffers
```

## Keybindings

See the [complete keybinding reference](docs/KEYBINDINGS.md) for shortcuts by
mode, selection and search commands, and terminal compatibility notes.

| Key | Action in normal editing mode |
| --- | --- |
| Ctrl+S | Save; open Save As for an unnamed buffer. |
| Ctrl+X | Exit; modified buffers require confirmation. **Confirming quits without saving.** |
| Ctrl+P / Ctrl+U | Copy / paste. |
| Ctrl+W | Search. |
| Ctrl+F / Ctrl+L | Next / previous buffer. |
| F1 / F2 | Open help / the file-tree browser. |

Save changes with Ctrl+S before confirming exit. In help, use Up/Down or
PgUp/PgDn to scroll and Esc or q to return to editing.

## Configuration

Femto reads the first existing file: `~/.femtorc`, then `./.femtorc`.
The files are not merged. Restart the editor after changing settings.

```ini
# Put comments on their own lines, and do not quote values.
tab_size = 4
show_line_numbers = true
theme = default
make_backup = true
final_newline = true
```

See the [configuration reference](docs/CONFIGURATION.md) for all 22 options,
defaults, parsing rules, themes, EditorConfig support, and a customization
example. It also identifies settings that are parsed but not yet connected
to the running editor.

## Running the tests

Femto includes a comprehensive `unittest` regression suite that runs headlessely (no terminal required).

```bash
python -m unittest discover -s tests -v
```

## Building a release

```bash
pip install build twine
python -m build          # creates dist/femto_editor-0.0.1-*.whl
python -m twine upload dist/* # publish to PyPI
```

## Star History

<a href="https://www.star-history.com/?repos=codewithzaqar%2Ffemto&type=date&legend=top-left">
 <picture>
   <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=codewithzaqar/femto&type=date&theme=dark&legend=top-left" />
   <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=codewithzaqar/femto&type=date&legend=top-left" />
   <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=codewithzaqar/femto&type=date&legend=top-left" />
 </picture>
</a>

## License

MIT - see [LICENSE](LICENSE).
