annotate README.md @ 52:586f857a98dd

Move unregistering of all views into a reusable function.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 02 Oct 2023 10:05:02 -0700
parents 8e8019698f16
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
1 # Remember File State
0
7975d7c73f8a Initial commit
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2
7975d7c73f8a Initial commit
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 This [Obsidian](https://obsidian.md) plugin remembers the editor state of files
47
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
4 as you switch between them. It restores the cursor position and scrolling
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
5 position. By default, it also remembers these states across sessions by saving
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
6 the data to disk.
0
7975d7c73f8a Initial commit
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7
47
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
8 This plugin doesn't do any polling and doesn't register any timers. It strives
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
9 to only do work when opening and closing files in order to not slow down the
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
10 editing experience.
0
7975d7c73f8a Initial commit
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11
32
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
12
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
13 ## Developer Quickstart
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
14
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
15 My own workflow for working on this plugin is the following:
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
16
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
17 1. Install the "_Remember File State_" plugin in a test vault. Don't forget to
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
18 enable it.
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
19 2. Clone the `obsidian-remember-file-state` repository.
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
20 3. Run the usual incantations, such as `npm install`.
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
21 4. Run the build process in watch mode so that it compiles the TypeScript code
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
22 and overwrites the test vault's plugin: `npm run dogfood
47
8e8019698f16 Update README
Ludovic Chabant <ludovic@chabant.com>
parents: 33
diff changeset
23 /path/to/vault/.obsidian/plugins/obsidian-remember-file-state`.
32
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
24 5. When making changes, trigger the "_Reload App Without Saving_" command to
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
25 reload Obsidian.
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
26 6. Optionally, hit `Ctrl-Shift-I` to open the developer console and see the
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
27 console log.
141f0a7d1986 Better error handling for npm dogfood command. Expand the README info.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
28