Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LintaoAmons authored Oct 29, 2023
1 parent d3f22d9 commit b979226
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ using your favorate plugin manager, for example [lazy.nvim](https://github.com/f

## Configuration

No need to config at the very begining, just install and explore.

You can search commands with `Scratch` prefix by telescope or fzflua
No need to config at the very begining, just install and explore the commands start with `Scratch`.

<details>
<summary>Click to know more about config</summary>

The way to config this plugin is a little difference(simpler) with other nvim plugin.

You can use `ScratchEditConfig` to edit the config once some new type popup your mind and the config will take effect immediately

Here's default config after you inited the plugin
Expand Down Expand Up @@ -95,12 +98,6 @@ NOTE: you can't have comment in your config, since only plain json supported rig
}
```

<details>
<summary>Click to know more about config</summary>

The way to config this plugin is a little difference(simpler) with other nvim plugin.
You can use `ScratchEditConfig` to edit the config and the config will take effect immediately

### Init Configuration

- This is triggered automaticlly at the first time you try to use Scrach's commands, and can be manually called to change the configuration file path, and this allows you:
Expand Down Expand Up @@ -140,13 +137,6 @@ vim.keymap.set("n", "<M-C-n>", "<cmd>Scratch<cr>")
vim.keymap.set("n", "<M-C-o>", "<cmd>ScratchOpen<cr>")
```

Before `v0.6.2` you may need to map to the lua function. Checkout the specific git tag to check the README to the version you want. Here is one example to mapping lua function.

```lua
vim.keymap.set("n", "<M-C-n>", function() require("scratch").scratch() end)
vim.keymap.set("n", "<M-C-o>", function() require("scratch").openScratch() end)
```

### Scratch

This can create a new scratch file in your config's `scratch_file_dir`
Expand Down Expand Up @@ -175,7 +165,6 @@ Open the configuration file and you can edit it to fit your needs. Require resta

A file where you can continuously record information.


### Functions

functions can be required from scratch, check `./lua/scratch/init.lua` to get the functions you can use
Expand Down

0 comments on commit b979226

Please sign in to comment.