Replies: 4 comments
-
Try using autocmd VimEnter *.md :ZenMode |
Beta Was this translation helpful? Give feedback.
-
in Neovim 0.7
|
Beta Was this translation helpful? Give feedback.
-
past |
Beta Was this translation helpful? Give feedback.
-
The layout will only be correct if I have this code in place: vim.cmd('autocmd VimEnter *.md,*.txt :ZenMode')
vim.api.nvim_create_autocmd(
{ "VimEnter", "BufReadPost" },
{
pattern = { "*.md", "*.txt", },
callback = function()
local zen_mode = require("zen-mode")
zen_mode.open()
end
}
) It'll then work when:
What I noticed:
Any idea why this could be the case? |
Beta Was this translation helpful? Give feedback.
-
Hi
I'd like to automatically start ZenMode everytime a markdown file is opened. To that end I wrote to my init.lua (neovim 0.6.1):
vim.cmd [[
au FileType markdown,mkd ZenMode
]]
When a markdown is opened the plugin starts but the buffer is limited to the first page, ie I am unable to scroll down the file.
How am I supposed to call ZenMode? How can I call it together with other plugins (like Pencil)?
This is my first init.lua, so hopefully the question does not sound too stupid.
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions