Metadata-Version: 2.4
Name: spyder-excursion
Version: 0.1.0
Summary: Spyder plugin for toggling a saved editor excursion
Home-page: https://github.com/hruskamiro/spyder-excursion
Author: Miroslav Hruska
Author-email: hruska.miro@gmail.com
License: MIT
Project-URL: Source, https://github.com/hruskamiro/spyder-excursion
Project-URL: Issues, https://github.com/hruskamiro/spyder-excursion/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: spyder<7,>=5.4
Requires-Dist: qtpy
Dynamic: license-file

# spyder-excursion

Spyder plugin that saves the current editor location and returns to it on the next trigger.

Status: Alpha

Supports Spyder `>=5.4,<7`.

## Quick Start

Default shortcut: **`Ctrl+Alt+X`**

Install the latest released version:

```bash
pip install spyder-excursion
```

Then restart Spyder.

## Behavior

Press `Ctrl+Alt+X` once:
- Save the current live editor and tab
- Save the current file identity when available
- Save a `QTextCursor` snapshot from that editor
- Save the current scroll position

Press `Ctrl+Alt+X` again:
- Return focus to that same live editor, even after visiting another file
- Restore the saved cursor and selection
- Restore the scroll position

If that editor or document is no longer the same live object, the plugin clears the saved excursion and shows a status message instead of guessing.

This is intentionally narrower than Emacs. It does not try to preserve:
- Reopened buffers after close
- Window layout
- Multiple cursors
- Fold state
- Undo history
- Focus across non-editor panes

## Installation

Inside the same environment where Spyder runs:

Install the latest released version from PyPI:

```bash
pip install spyder-excursion
```

Or install directly from GitHub:

```bash
pip install "git+https://github.com/hruskamiro/spyder-excursion.git@main"
```

Then restart Spyder.

## Verify Plugin Is Loaded

In **Spyder Internal Console**:

```python
p = spy.window.get_plugin("spyder_excursion")
print(p)
```

If loaded, `p` is not `None`.
