Skip to content

Commit

Permalink
chore: improve comments & phrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 21, 2023
1 parent 1df4159 commit 846c556
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ require("spider").motion("w", {
customPatterns = { "%w%w%w+", "%p+" },
})

-- The motion stops only at hashes like `ef82a2`.
-- The motion stops only at hashes like `ef82a2`, avoiding repetition by using
-- `string.rep()`.
require("spider").motion("w", {
customPatterns = { "[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]+" },
customPatterns = { ("%x"):rep(6) .. "+" },
})

-- The motion stops at the next declaration of a variable in -- javascript.
Expand Down
6 changes: 3 additions & 3 deletions lua/spider/pattern-variants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ local M = {}
--------------------------------------------------------------------------------
---@alias patternList table<string, string>

-- INFO all patterns need to be symmetric to also work for backward motions
-- in case they are asymmetric, they need to be reversed. Currently, this is
-- only the case for the camelCase pattern
-- INFO Currently, all patterns need to be symmetric to also work for backward
-- motions. In case they are asymmetric, they need to be reversed. Currently,
-- this is only the case for the camelCase pattern.

---@type patternList
local subwordPatterns = {
Expand Down

0 comments on commit 846c556

Please sign in to comment.