Skip to content

Commit 592a0eb

Browse files
committed
beginner sugg work
1 parent daa44ca commit 592a0eb

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

lua/motioncoach-nvim/episodes.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ local function on_cursor_moved()
272272
'$',
273273
'g',
274274
'G',
275+
'[',
276+
']',
275277
'\4', --??
276278
'\21', -- ??
277279
'\18', -- ??

lua/motioncoach-nvim/suggestions/beginner/beginner.lua

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ function M.suggest(episode, context)
6868
if absLineDelta == 0 and absColDelta >= 7 then
6969
if longMsg then
7070
return [[
71-
--Horizontal Jump--
72-
73-
For long horizontal moves:
71+
For long horizontal motions:
7472
7573
` w ` to next word
7674
` W ` to next word (ignoring special characters)
@@ -84,9 +82,8 @@ function M.suggest(episode, context)
8482
can prefix a "count" to any of the above ( eg. ` 16w ` )
8583
]]
8684
else
87-
return 'Try ` 0 ` to jump to start of line'
85+
return 'For long horizontal moves:\n ` w ` or ` b ` or ` e `\n ( ` W ` or ` B ` or ` E `\n Or Can prefix count (` 8h ` or ` 16l `)'
8886
end
89-
return 'For long horizontal moves, you can move by words with:\n ` w ` or ` b ` or ` e `\n ( ` W ` or ` B ` or ` E `\n Or Can prefix count (` 8h ` or ` 16l `)'
9087
end
9188

9289
-------------------- VERTICAL MOTIONS
@@ -103,8 +100,6 @@ function M.suggest(episode, context)
103100
end
104101
end
105102

106-
-- vim.notify(vim.inspect(recentKeys))
107-
108103
-- TODO: make user configurable 6 and 60
109104
if absLineDelta >= 6 and absLineDelta < 60 then
110105
local motion = (lineDelta > 0) and 'j' or 'k'
@@ -127,15 +122,13 @@ function M.suggest(episode, context)
127122
if absLineDelta >= 200 then
128123
local which = (lineDelta > 0) and '` / ` (search downward)' or '` ? ` (search upward)'
129124

130-
return ('Huge move: consider %s for your target text'):format(which)
125+
return ('Huge Vertical Motion: consider %s for your target text'):format(which)
131126
end
132127

133128
if absLineDelta >= vim.api.nvim_win_get_height(0) then
134-
-- FIX: if last keys{from keylogger} were NOT '<C-d>' or '<C-u>'
135-
-- NOTE: possibly handle this by finalizing episode on detection of '<C-d>' or '<C-u>'
136129
local scroll = (lineDelta > 0) and ' <C-d> ' or ' <C-u> '
137130

138-
return ('Big move: try `%s` to scroll'):format(scroll)
131+
return ('Paging Motion: try `%s` to scroll'):format(scroll)
139132
end
140133

141134
return nil

0 commit comments

Comments
 (0)