From eb75dc1c47d246a0b747861c5fbc35ce6067bfe1 Mon Sep 17 00:00:00 2001 From: Vlad Chepaykyn Date: Thu, 26 Oct 2023 15:37:29 +0300 Subject: [PATCH] Add ci vimdoc auto-generation --- .github/workflows/docs.yaml | 37 ++++++++++++++++++++++++++++++++++++ README.md | 23 ++++++++++++++++++---- doc/improved-search.nvim.txt | 0 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/docs.yaml create mode 100644 doc/improved-search.nvim.txt diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..82e9831 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -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] diff --git a/README.md b/README.md index 66cb69a..4f0a9ef 100644 --- a/README.md +++ b/README.md @@ -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. + + ### Preview #### Search selected text ![selection_search](https://github.com/backdround/improved-search.nvim/assets/17349169/5f94a5aa-f315-4e72-be15-37452b2016c8) @@ -22,6 +24,9 @@ operator) ![2023-10-16_07-55](https://github.com/backdround/improved-search.nvim/assets/17349169/a3a4942d-5a67-4d22-8d78-d33c48375c92) --- + + + ### Configuration example ```lua local search = require("improved-search") @@ -43,7 +48,12 @@ vim.keymap.set("n", "|", search.in_place) -- You can also use search.forward / search.backward for motion selection. ``` + + --- + + + ### Functions and operators - `stable_next` / `stable_previous` - stable search motions (for "n/x/o" modes) @@ -56,6 +66,11 @@ search operators (for "n/x/o" modes). Functions with `_strict` postfix add word boundaries (`\<` and `\>`) for all search patterns. + + --- + + + ### Limitations: - Search text that is selected by **visual block mode** isn't work as expected. diff --git a/doc/improved-search.nvim.txt b/doc/improved-search.nvim.txt new file mode 100644 index 0000000..e69de29