nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.04k stars 134 forks source link

Default org template being used when trying to capture #4

Closed akinsho closed 3 years ago

akinsho commented 3 years ago

Describe the bug

Hi πŸ‘‹πŸΎ , thanks for working on this plugin. I'd been using dotoo for a bit but hitting different issues. I really love the effort and care you've put into this πŸ’― .

One issue I've hit since moving over is that when I try to capture a new todo as far as I can see there should be a default template, but that doesn't seem to appear when I use <leader>oc then hit T

Instead I enter an empty tmp buffer without any default text. The docs mention

    org_agenda_templates = { t = { description = "Task", template = "* TODO %?\n %u" } },

but that doesn't seem to be applied by default and adding that in to my config doesn't seem to work either.

To Reproduce Steps to reproduce the behavior:

Minimal init.lua

vim.cmd("packadd! orgmode.nvim")

require("orgmode").setup({
    org_agenda_files = { "~/Dropbox/org/*", "~/local-org/**/*" },
    org_default_notes_file = "~/Dropbox/org/refile.org",

})
  1. Open nvim -u ~/minimal.lua --noplugin
  2. Hit \oc then T
  3. Enter into empty temp buffer without a template

Expected behavior

The template should be present and ready to be filled in like the landing page GIFs

Emacs functionality If this functionality exists in Emacs Orgmode, explain how it works there.

Screenshots

Screen Shot 2021-06-28 at 11 01 47

System information:

Additional context Add any other context about the problem here.

kristijanhusak commented 3 years ago

Hi,

folding caused the issue, because search() doesn't jump to a match if code is folded. It works for me because i have set nofoldenable in my config. Let me know if it works now.

Thanks for the minimal init, it really helped. It would be much harder without it.

akinsho commented 3 years ago

Awesome that fixed it πŸš€ , thanks for the quick response.

EDIT: and yep it was fold related since I have foldlevelstart=3 in my config