Skip to content

Commit

Permalink
Merge pull request NixOS#8 from LamprosPitsillos/main
Browse files Browse the repository at this point in the history
Added support for v:count for C-a/C-x
  • Loading branch information
nat-418 authored Oct 19, 2022
2 parents e5ed555 + 9745f7a commit eac7ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require('boole').setup({
},
-- User defined loops
additions = {
{'Foo', 'Bar'}
{'Foo', 'Bar'},
{'tic', 'tac', 'toe'}
},
})
Expand Down
5 changes: 3 additions & 2 deletions lua/boole/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,10 @@ M.run = function(direction)
if match ~= nil then return vim.cmd(':normal ciw' .. match) end

-- <C-a> and <C-x> compatability
if direction == 'increment' then return vim.cmd(':normal!') end
if direction == 'decrement' then return vim.cmd(':normal!') end
if direction == 'increment' then return vim.cmd(':normal!'..vim.v.count..'') end
if direction == 'decrement' then return vim.cmd(':normal!'..vim.v.count..'') end

vim.api.nvim_cmd()
return false
end

Expand Down

0 comments on commit eac7ab7

Please sign in to comment.