https://github.com/ctf0/vscode-remember-restore-cursor
https://github.com/ctf0/vscode-remember-restore-cursor
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ctf0/vscode-remember-restore-cursor
- Owner: ctf0
- License: gpl-3.0
- Created: 2021-01-03T18:13:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-24T17:57:17.000Z (over 3 years ago)
- Last Synced: 2024-10-11T12:18:57.610Z (over 1 year ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Remember or Restore Cursor
remember & restore cursor/s position with ease.
> what problem does this fix ?
i usually run one or more linter on file-save through trmnl/cli "not a big fan of editor plugins", which might move the cursor all the way to the end of the file.
so out of frustration of having to relocate the cursor everytime that happens, now we can remember the position b4 the trmnl/cli run and restore it back when all are done.
# Notes
- after restore, remembered positions are cleared.
- u can use the ext with something like [macros](https://marketplace.visualstudio.com/items?itemName=ctf0.macros) to automatically save & restore cursor position each time you save a file ex.
- settings
```jsonc
"saveFile": [
"src.remember",
"workbench.action.files.save",
{
"command": "$delay",
"args": {
"delay": 1000 // change accroding to your need
}
},
"src.restore"
],
```
- keybinding
```json
{
"key": "cmd+s",
"command": "macros.saveFile",
"when": "editorFocus"
},
```