Skip to content

Commit

Permalink
Add ci vimdoc auto-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
backdround committed Oct 26, 2023
1 parent 23aad22 commit eb75dc1
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: docs

on:
push:
pull_request:
branches:
- docs-ci-test

jobs:
docs:
runs-on: ubuntu-latest
container: alpine:latest
permissions:
contents: write
steps:
- name: Prepare container
run: apk update && apk add git sed

- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare README.md
run: sed -i -r "s/#(#+)/\1/g" ./README.md

- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: improved-search.nvim

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: docs/*.txt
commit_message: Auto-generate vimdoc
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
It's a Neovim plugin that improves the search experience.

It provides:
- **stable jump** to next / previous search pattern (regardless of the last
- **stable** **jump** to next / previous search pattern (regardless of the last
search direction)
- search the **word under the cursor** without moving (like `*` or `#`)
- search the **word** under the **cursor** without moving (like `*` or `#`)
- search operator:
- search text selected in **visual mode** (visual selection +
- search text selected in **visual** **mode** (visual selection +
operator)
- search text provided by **a motion** (operator + motion)
- search text provided by **a** **motion** (operator + motion)
- it all works for a **multiline** search.

<!-- panvimdoc-ignore-start -->

### Preview
#### Search selected text
![selection_search](https://github.com/backdround/improved-search.nvim/assets/17349169/5f94a5aa-f315-4e72-be15-37452b2016c8)
Expand All @@ -22,6 +24,9 @@ operator)
![2023-10-16_07-55](https://github.com/backdround/improved-search.nvim/assets/17349169/a3a4942d-5a67-4d22-8d78-d33c48375c92)

---

<!-- panvimdoc-ignore-end -->

### Configuration example
```lua
local search = require("improved-search")
Expand All @@ -43,7 +48,12 @@ vim.keymap.set("n", "|", search.in_place)
-- You can also use search.forward / search.backward for motion selection.
```

<!-- panvimdoc-ignore-start -->

---

<!-- panvimdoc-ignore-end -->

### Functions and operators
- `stable_next` / `stable_previous` - stable search motions (for "n/x/o" modes)

Expand All @@ -56,6 +66,11 @@ search operators (for "n/x/o" modes).
Functions with `_strict` postfix add word boundaries (`\<` and `\>`) for all
search patterns.

<!-- panvimdoc-ignore-start -->

---

<!-- panvimdoc-ignore-end -->

### Limitations:
- Search text that is selected by **visual block mode** isn't work as expected.
Empty file added doc/improved-search.nvim.txt
Empty file.

0 comments on commit eb75dc1

Please sign in to comment.