Skip to content

Commit

Permalink
docs: adds recommended init.vim section for getting user input
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesimpson36 committed May 18, 2024
1 parent d7553b5 commit 0b7617d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ Plug 'jessesimpson36/whereami.nvim'

Then under your lua section in, add a mapping for it such as:
```
vim.keymap.set("n", "<leader>w", "<cmd>WhereAmI<CR>")
vim.keymap.set("n", "<leader>jw", "<cmd>WhereAmI<CR>")
function jumpy()
require("whereami").jumptopath(vim.fn.input("Where do you want to jump to?: "))
end
vim.keymap.set("n", "<leader>jj", jumpy)
```

Now whenever you hit `<leader>w`, it will call the WhereAmI function and you won't lose your way.

0 comments on commit 0b7617d

Please sign in to comment.