Skip to content

Commit

Permalink
chore: fix various typos
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 4, 2024
1 parent eaa2eba commit c61c374
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Bundle of more than 30 new textobjects for Neovim.
| `visibleInWindow` | all lines visible in the current window | \- | \- | `gw` | all |
| `restOfWindow` | from the cursorline to the last line in the window | \- | \- | `gW` | all |
| `lastChange` | Last non-deletion-change, yank, or paste.[^2] | \- | \- | `g;` | all |
| `mdlink` | markdown link like `[title](url)` | inner is only the link title (between the `[]`) | small | `il`/`al` | markdown, toml |
| `mdLink` | markdown link like `[title](url)` | inner is only the link title (between the `[]`) | small | `il`/`al` | markdown, toml |
| `mdEmphasis` | markdown text enclosed by `*`, `**`, `_`, `__`, `~~`, or `==` | inner is only the emphasis content | small | `ie`/`ae` | markdown |
| `mdFencedCodeBlock` | markdown fenced code (enclosed by three backticks) | outer includes the enclosing backticks | big | `iC`/`aC` | markdown |
| `cssSelector` | class in CSS like `.my-class` | outer includes trailing comma and space | small | `ic`/`ac` | css, scss |
Expand Down
2 changes: 1 addition & 1 deletion lua/various-textobjs/default-keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local oneMaps = {
lastChange = "g;", -- consistent with g; movement
}
local ftMaps = {
{ map = { mdlink = "l" }, fts = { "markdown", "toml" } },
{ map = { mdLink = "l" }, fts = { "markdown", "toml" } },
{ map = { mdEmphasis = "e" }, fts = { "markdown" } },
{ map = { pyTripleQuotes = "y" }, fts = { "python" } },
{ map = { mdFencedCodeBlock = "C" }, fts = { "markdown" } },
Expand Down
9 changes: 6 additions & 3 deletions lua/various-textobjs/textobjs/charwise.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local function selectFromCursorTo(endPos, notFoundMsg)
end
--------------------------------------------------------------------------------

-- INFO The following function are exposed for creation of custom textobjs, but
-- INFO The following functions are exposed for creation of custom textobjs, but
-- subject to change without notice.

---Seek and select characterwise a text object based on one pattern.
Expand Down Expand Up @@ -261,7 +261,7 @@ function M.nearEoL()
selectFromCursorTo({ row, endCol }, config.forwardLooking.small)
end

---current line (but characterwise)
---current line, but characterwise
---@param scope "inner"|"outer" outer includes indentation and trailing spaces
function M.lineCharacterwise(scope)
-- FIX being on NUL, see #108 and #109
Expand Down Expand Up @@ -389,11 +389,14 @@ end
-- FILETYPE SPECIFIC TEXTOBJS

---@param scope "inner"|"outer" inner link only includes the link title, outer link includes link, url, and the four brackets.
function M.mdlink(scope)
function M.mdLink(scope)
local pattern = "(%[)[^%]]-(%]%b())"
M.selectClosestTextobj(pattern, scope, config.forwardLooking.small)
end

-- DEPRECATION (2024-12-04), changed for consistency with other objects
function M.mdlink() u.warn("`.mdlink()` is deprecated. Use `.mdLink()` instead (uses capital L).") end

---@param scope "inner"|"outer" inner selector only includes the content, outer selector includes the type.
function M.mdEmphasis(scope)
-- CAVEAT this still has a few edge cases with escaped markup, will need a
Expand Down

0 comments on commit c61c374

Please sign in to comment.