-
Hi ! Thanks for the time you spend working on portal and sharing this with the community. I was wondering...
So my question is: When jumping forward/backward, is there a way to filter/exclude jumps related to NvimTree filetype/bufname/etc ? I thought I could do this using builtin and filter but it seems I don't know what I'm doing ^^ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sure thing. You should be able to filter jumps by filtype: During setup Apply to all searches (edited for v0.5.0 release). require("portal").setup({
filter = function(v)
return vim.api.nvim_buf_get_option(v.buffer, "filetype") ~= "{ft}"
end
}) Function call Apply to a single search. require("portal.builtin").jumplist.tunnel_backward({
filter = function(v)
return vim.api.nvim_buf_get_option(v.buffer, "filetype") ~= "{ft}"
end
}) I'm not certain what the filetype for nvim-tree so I've left that as
|
Beta Was this translation helpful? Give feedback.
Sure thing. You should be able to filter jumps by filtype:
During setup
Apply to all searches (edited for v0.5.0 release).
Function call
Apply to a single search.
I'm not certain what the filetype for nvim-tree so I've left that as
{ft}
in the examples above. If should be listed in their docs, or you can simply run the following command while focused on an nvim-tree buffer: