From 4340762d481402d3c2e44393ea7a84288b3f25be Mon Sep 17 00:00:00 2001 From: Alexander Lay-Calvert Date: Tue, 27 Sep 2022 16:03:55 -0400 Subject: [PATCH] Updated readme with visual toggle todo info --- README.md | 4 ++++ doc/telekasten.txt | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 70ac135..51a64b4 100644 --- a/README.md +++ b/README.md @@ -661,6 +661,10 @@ The plugin defines the following functions: - this function accepts a parameter `{i}`. If `true`, it will enter input mode by pressing the 'A' key. This is useful when being used in a simple `inoremap` key mapping like shown in [Bind it](#3-bind-it). - example: `toggle_todo({ i=true })` + - this function can also be used in `visual` mode to toggle the status of multiple lines. + - if using a keymapping to `toggle_todo` in visual mode, make sure to use `:Telekasten toggle_todo` + instead of `Telekasten toggle_todo` to avoid neovim sending the wrong visual selection to + telekasten. - `show_backlinks()` : opens a telescope search for notes that `[[link]]` back to the current note. - `find_friends()` : opens a telescope search for notes that also `[[link]]` to the link under the cursor. - `insert_img_link()` : opens a telescope search for all media (PDFs, images, videos (MP4, webm)) and places a markdown diff --git a/doc/telekasten.txt b/doc/telekasten.txt index 43038d6..701b0e1 100644 --- a/doc/telekasten.txt +++ b/doc/telekasten.txt @@ -649,6 +649,11 @@ telekasten.toggle_todo({opts})~ Turns a line into a `- [ ] ` todo line, or toggle between `- [ ]`, `- [x]`, and `-` . + This can also be used in visual mode to toggle the status of multiple lines. + If using a keymapping to `toggle_todo` in visual mode, make sure the `rhs` is + `:Telekasten` `toggle_todo` instead of `Telekasten` `toggle_todo` + to avoid neovim sending the wrong visual selection. + Valid keys for {opts} i:~