Skip to content

Commit

Permalink
fix: correct use of api
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero committed Jun 4, 2024
1 parent 7592b6e commit 0c41d35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ visual mode, and it will take a screenshot of the selected lines.
### Keymaps

```lua
vim.keymap.set("n", "<leader>fz", require("freeze-code.api").freeze)
local fz_api = require("freeze-code.utils.api")
vim.keymap.set("n", "<leader>fz", fz_api.freeze)
vim.keymap.set("v", "<leader>fz", function()
require("freeze-code.api").freeze(vim.fn.line("'<"), vim.fn.line("'>"))
fz_api.freeze(vim.fn.line("'<"), vim.fn.line("'>"))
end)
-- or using `<cmd>Freeze<cr>`
vim.keymap.set("n", "<leader>fl", require("freeze-code.api").freeze_line)
vim.keymap.set("n", "<leader>fl",fz.freeze_line)
-- or using `<cmd>FreezeLine<cr>`
```

Expand Down

0 comments on commit 0c41d35

Please sign in to comment.