<commit_before># cursor-history

Like browser's Go and Back button, like `ctrl-i`, `ctrl-o` in Vim.
You can go/back to cursor position history.

![gif](https://raw.githubusercontent.com/t9md/t9md/3d4a0bd38ac9571510d5ba52aa5361897b123218/img/atom-cursor-history.gif)

# Keymap

No keymap by default.

* e.g.

```coffeescript
'atom-workspace':
  'ctrl-i':     'cursor-history:next'
  'ctrl-o':     'cursor-history:prev'
  'ctrl-cmd-i': 'cursor-history:next-within-editor'
  'ctrl-cmd-o': 'cursor-history:prev-within-editor'
```

# Features

* Can jump to prev/next point of closed Buffer(can configure exclude closed buffer).
* Flash cursor line on land. Can disable or customize flash color, duration and type(line, word, point).
* Vim like history concatnation(Never save same line per file. This allow you to jump specific line only once).
* Auto adjust cursor position to middle of screen if target was off-screen.

# Commands

Use following command or set Keymap.
* `cursor-history:next`: Go to next point in history.
* `cursor-history:prev`: Go to previous point in history.
* `cursor-history:next-within-editor`: Go to next point in history within current editor.
* `cursor-history:prev-within-editor`: Go to previous point in history within current editor.
* `cursor-history:clear`: Clear history.

# What condition cursor history will be kept?

In the following case save previous cursor location as history.

* when editor lost focus.
* when cursor position's row delta exceeds rows specified by `rowDeltaToRemember`(default 4).

# TODO
- [x] Don't use editor.onDidChangeCursorPosition, use atom.commands.onDidDispatch instead.
- [ ] Support serialization to support per-project cursor history.
- [x] Configuration option to exclude closed buffer.
- [x] Ensure not open un-existing file.
- [x] Flash cursor line when target is off-screen.<commit_msg>:memo:<commit_after># cursor-history [![Build Status](https://travis-ci.org/t9md/cursor-history.svg)](https://travis-ci.org/t9md/cursor-history)

Like browser's Go and Back button, like `ctrl-i`, `ctrl-o` in Vim.
You can go/back to cursor position history.

![gif](https://raw.githubusercontent.com/t9md/t9md/3d4a0bd38ac9571510d5ba52aa5361897b123218/img/atom-cursor-history.gif)

# Keymap

No keymap by default.

* e.g.

```coffeescript
'atom-workspace':
  'ctrl-i':     'cursor-history:next'
  'ctrl-o':     'cursor-history:prev'
  'ctrl-cmd-i': 'cursor-history:next-within-editor'
  'ctrl-cmd-o': 'cursor-history:prev-within-editor'
```

# Features

* Can jump to prev/next point of closed Buffer(can configure exclude closed buffer).
* Flash cursor line on land. Can disable or customize flash color, duration and type(line, word, point).
* Vim like history concatnation(Never save same line per file. This allow you to jump specific line only once).
* Auto adjust cursor position to middle of screen if target was off-screen.

# Commands

* `cursor-history:next`: Go to next point in history.
* `cursor-history:prev`: Go to previous point in history.
* `cursor-history:next-within-editor`: Go to next point in history within current editor.
* `cursor-history:prev-within-editor`: Go to previous point in history within current editor.
* `cursor-history:clear`: Clear history.

# When cursor history saved?

* when editor lost focus.
* when cursor position's row delta exceeds rows specified by `rowDeltaToRemember`(default 4).

# TODO
- [x] Spec
- [x] Don't use editor.onDidChangeCursorPosition, use atom.commands.onDidDispatch instead.
- [ ] Support serialization to support per-project cursor history.
- [x] Configuration option to exclude closed buffer.
- [x] Ensure not open un-existing file.
- [x] Flash cursor line when target is off-screen.
{'fraction_non_alphanumeric': 0.11135076840118631, 'fraction_numerical': 0.01725532488541386, 'mean_word_length': 4.455882352941177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '995098', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1130, 'n_words': 400}