Code Monkey home page Code Monkey logo

orgmode's Introduction

A blend of the Neovim (shape) and Org-mode (colours) logos

nvim-orgmode

License Kofi Chat

Orgmode clone written in Lua for Neovim 0.9.2+

SetupDocsShowcaseTreesitterTroubleshootPluginsContributingKudos

Quickstart

Requirements

  • Neovim 0.9.2 or later

Installation

Use your favourite package manager:

lazy.nvim (recommended)
{
  'nvim-orgmode/orgmode',
  event = 'VeryLazy',
  ft = { 'org' },
  config = function()
    -- Setup orgmode
    require('orgmode').setup({
      org_agenda_files = '~/orgfiles/**/*',
      org_default_notes_file = '~/orgfiles/refile.org',
    })

    -- NOTE: If you are using nvim-treesitter with `ensure_installed = "all"` option
    -- add `org` to ignore_install
    -- require('nvim-treesitter.configs').setup({
    --   ensure_installed = 'all',
    --   ignore_install = { 'org' },
    -- })
  end,
}
packer.nvim
use {'nvim-orgmode/orgmode', config = function()
  require('orgmode').setup{}
end
}
vim-plug
Plug 'nvim-orgmode/orgmode'
dein.vim
call dein#add('nvim-orgmode/orgmode')

Setup

Note that this setup is not needed for lazy.nvim since instructions above covers full setup

-- init.lua

require('orgmode').setup({
  org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'},
  org_default_notes_file = '~/Dropbox/org/refile.org',
})

-- NOTE: If you are using nvim-treesitter with `ensure_installed = "all"` option
-- add `org` to ignore_install
-- require('nvim-treesitter.configs').setup({
--   ensure_installed = 'all',
--   ignore_install = { 'org' },
-- })

Or if you are using `init.vim`, wrap the above snippet like so:
```vim
" init.vim
lua << EOF

require('orgmode').setup({
  org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'},
  org_default_notes_file = '~/Dropbox/org/refile.org',
})

EOF

Completion

nvim-cmp
require('cmp').setup({
  sources = {
    { name = 'orgmode' }
  }
})
completion-nvim
vim.g.completion_chain_complete_list = {
  org = {
    { mode = 'omni'},
  },
}
-- add additional keyword chars
vim.cmd[[autocmd FileType org setlocal iskeyword+=:,#,+]]

Or just use omnifunc via <C-x><C-o>

Usage

  • Open agenda prompt: <Leader>oa
  • Open capture prompt: <Leader>oc
  • In any orgmode buffer press g? for help

If you are new to Orgmode, see Getting started section in the Docs or a hands-on tutorial in our wiki.

Showcase

Agenda

agenda

Org file

orgfile

Capturing and refiling

capture

Autocompletion

autocomplete

Treesitter Info

The built-in treesitter parser is used for parsing the org files.

Known highlighting issues and limitations

  • LaTex is still highlighted through syntax file

Troubleshoot

Indentation is not working

Make sure you are not overriding indentexpr in Org buffers with nvim-treesitter indentation

I get treesitter/query.lua errors when opening agenda/capture prompt or org files

Tree-sitter parser might not be installed. Try running :lua require('orgmode.config'):reinstall_grammar() to reinstall it.

Dates are not in English

Dates are generated with Lua native date support, and it reads your current locale when creating them.
To use different locale you can add this to your init.lua:

vim.cmd('language en_US.utf8')

or init.vim

language en_US.utf8

Just make sure you have en_US locale installed on your system. To see what you have available on the system you can start the command :language and press <TAB> to autocomplete possible options.

Links are not concealed

Links are concealed with Vim's conceal feature (see :help conceal). To enable concealing, add this to your init.lua:

vim.opt.conceallevel = 2
vim.opt.concealcursor = 'nc'

Or if you are using init.vim:

set conceallevel=2
set concealcursor=nc

Jumping to file path is not working for paths with forward slash

If you are using Windows, paths are by default written with backslashes. To use forward slashes, you must enable shellslash option (see :help 'shellslash').

vim.opt.shellslash = true

Or if you are using init.vim:

set shellslash

More info on issue #281

Features

TL;DR

  • Agenda view
  • Search by tags/keyword
  • Clocking time
  • Repeatable dates, date and time ranges
  • Capturing to default notes file/destination
  • Archiving (archive file or ARCHIVE tag)
  • Exporting (via emacs, pandoc and custom export options)
  • Notifications (experimental, see Issue #49)
  • Calendar popup for easier navigation and date updates
  • Various org file mappings:
    • Promote/Demote
    • Change TODO state
    • Change dates
    • Insert/Move/Refile headlines
    • Change tags
    • Toggle checkbox state
  • Remote editing from agenda view
  • Repeatable mapping via vim-repeat

Detailed breakdown

  • Agenda prompt:
    • Agenda view (a):
      • Ability to show daily(vd)/weekly(vw)/monthly(vm)/yearly(vy) agenda
      • Support for various date settings:
        • DEADLINE: Warning settings - example: <2021-06-11 Fri 11:00 -1d>
        • SCHEDULED: Delay setting - example: <2021-06-11 Fri 11:00 -2d>
        • All dates - Repeater settings:
          • Cumulate type: <2021-06-11 Fri 11:00 +1w>
          • Catch-up type: <2021-06-11 Fri 11:00 ++1w>
          • Restart type: <2021-06-11 Fri 11:00 .+1w>
        • Time ranges - example: <2021-06-11 Fri 11:00-12:30>
        • Date ranges - example: <2021-06-11 Fri 11:00-12:30>--<2021-06-13 Sun 22:00>
      • Properly lists tasks according to defined dates (DEADLINE,SCHEDULED,Plain date)
      • Navigate forward (f)/backward(b) or jump to specific date (J)
      • Go to task under cursor in current window(<CR>) or other window(<TAB>)
      • Print category from ":CATEGORY:" property if defined
    • List tasks that have "TODO" state (t):
    • Find headlines matching tag(s) (m):
    • Search for headlines (and it's content) for a query (s):
    • Advanced search for tags/todo kewords/properties
    • Notifications (experimental, see Issue #49)
    • Clocking time
  • Capture:
    • Define custom templates
    • Fast capturing to default notes file via <C-c>
    • Capturing to specific destination <Leader>or
    • Abort capture with <Leader>ok
  • Org files
    • Clocking time
    • Refile to destination/headline: <Leader>or
    • Increase/Decrease date under cursor: <C-a>/<C-x>
    • Change date under cursor via calendar popup: cid
    • Change headline TODO state: forwardcit or backwardciT
    • Open hyperlink or date under cursor: <Leader>oo
    • Toggle checkbox: <C-space>
    • Toggle current line to headline and vice versa: <Leader>o*
    • Toggle folding of current headline: <TAB>
    • Toggle folding in whole file: <S-TAB>
    • Archive headline: <Leader>o$
    • Add archive tag: <Leader>oA
    • Change tags: <Leader>ot
    • Promote headline: <<
    • Demote headline: >>
    • Promote subtree: <s
    • Demote subtree: >s
    • Add headline/list item/checkbox: <Leader><CR>
    • Insert heading after current heading and it's content: <Leader>oih
    • Insert TODO heading after current line: <Leader>oiT
    • Insert TODO heading after current heading and it's content: <Leader>oit
    • Move headline up: <Leader>oK
    • Move headline down: <Leader>oJ
    • Highlighted code blocks (#+BEGIN_SRC filetype)
    • Exporting (via emacs, pandoc and custom export options)

Link to detailed documentation: DOCS

Plugins

See all available plugins on orgmode-nvim

If you built a plugin please add "orgmode-nvim" topic to it.

NOTE: None of the Emacs Orgmode plugins will be built into nvim-orgmode. Anything that's a separate plugin in Emacs Orgmode should be a separate plugin in here. The point of this plugin is to provide functionality that's built into Emacs Orgmode core, and a good foundation for external plugins.
If you want to build a plugin, post suggestions and improvements on Plugins infrastructure issue.

🔧 API

Documentation for our work-in-progress API can be found here

Contributing

See CONTRIBUTING.md

Documentation

If you are just starting out with orgmode, have a look at the Getting Started section in our wiki.

Vim documentation is auto generated from DOCS.md file with md2vim.

Hosted documentation is on: https://nvim-orgmode.github.io/

Roadmap

  • Support searching by properties
  • Improve checkbox hierarchy
  • Support todo keyword faces
  • Support clocking work time
  • Improve folding
  • Support exporting (via existing emacs tools)
  • Support archiving to specific headline
  • Support tables
  • Support diary format dates
  • Support evaluating code blocks

Thanks to

  • @dhruvasagar and his vim-dotoo plugin that got me started using orgmode. Without him this plugin would not happen.
  • @milisims for writing a treesitter parser for org
  • vim-orgmode for some parts of the code (mostly syntax)

orgmode's People

Contributors

bgerazov avatar cheif avatar chuck-flowers avatar chuwy avatar danilshvalov avatar dwdwdan avatar gerazov avatar gerritvreeman avatar gh-allee avatar grepinsight avatar jesse-bakker avatar jgollenz avatar joaomsa avatar joshpetit avatar jspmarc avatar kristijanhusak avatar levouh avatar lukas-reineke avatar massix avatar nathom avatar ourigen avatar paniash avatar pricehiller avatar ranjithshegde avatar rwmpelstilzchen avatar seflue avatar shaunsingh avatar shrimpram avatar travonted avatar troiganto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orgmode's Issues

Error opening help

Describe the bug
The help functionality fails with a lua error on my system with Invalid key 'border'.

To Reproduce
Steps to reproduce the behavior:

  1. Open an org buffer
  2. Hit ? to open help

Screenshots
tmp

System information:

 % nvim --version
NVIM v0.5.0-856-g7dfeadb0f
Build type: Debug
LuaJIT 2.1.0-beta3
Compilation: /usr/lib/ccache/cc -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=1 -I/home/james/src/neovim/build/config -I/home/james/src/neovim/src -I/home/james/src/neovim/.deps/usr/include -I/usr/include -I/home/james/src/neovim/build/src/nvim/auto -I/home/james/src/neovim/build/include
Compiled by james@slug

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/james/.local/share/nvim"

Run :checkhealth for more info

Option to load default org-files

Does this feature exist in Emacs orgmode?
N/A

Hello,

I'd like to ask if it would be possible - or maybe it is, but I couldn't find - to preload a set of defined org-files so that a simple oa would list those entries without opening those files manually.

Thx

Mistakes in documentation

The documentation for captures says the following: default value: { t = { description: 'Task', template: '* TODO %?\n %u' } }

Instead of the : the examples should use =. The same applies for some other examples.

Filetags

Describe the bug
Filetags aren't very functional. I found the following issues:

  • They don't autocomplete (in my case, using compe). Neither can I autocomplete them when I write filetags, nor will filetags show up as options when I write normal tags.
  • When opening the agenda while matching for a tag, tasks which should have inherited a tag from a filetag will not show up.

To Reproduce
Steps to reproduce the behavior:

  1. Write a filetag, no suggestions will show up

and

  1. Write a filetag
  2. Add a normal tag and press tab to complete
  3. Filetag will not show up

and

  1. Add a filetag to a file with a TODO entry
  2. Open agenda and match for tag
  3. TODO entry will not show up

Expected behavior
Filetags should be inherited and applied just like other tags

Emacs functionality
I have never used emacs orgmode, and I don't know how the functionality is there.

System information:

  • OS: Arch
  • Neovim version: latest 0.5 release

Use taskwarrior database format?

Does this feature exist in Emacs orgmode?

  • Yes
  • No

Because Org-mode wasn't available for a long time in vim, I guess people use taskwarrior. If orgmode.nvim can use taskwarrior under the hood, (using tasklib, and taskwarrior) then users can leverage the good side of both the worlds. For instance taskwarrior has a solid CLI interface, and web servers to sync the tasks across devices using services like https://inthe.am or https://freecinc.com.

As a sidenote, they also have a vim plugin taskwiki which is to generate different kind of view in vimwiki files of tasks.

Newline with o and enter creates list item

Hey @kristijanhusak, awesome work, I had to the chance to give orgmode.nvim a try and intending to switch to it soon.

Describe the bug
Pressing enter on a section create new indented list list.
Pressing enter on a todo section creates a indent line.

* Section<CR>
   * | 
* TODO Section<CR>
   |

I feel this intentional behavior and I wonder if I can disable it somehow or is there an alternative way to create sub item in normal and insert mode
To Reproduce
Steps to reproduce the behavior:

  1. create new heading
  2. press enter in insert mode or o in normal mode

Expected behavior

A normal enter/o should act as expected.

Emacs functionality
not sure

System information:

  • OS: mac
  • Neovim version/commit: [e.g. https://github.com/neovim/neovim/commit/bdf3df4027a5389a46b4c9a75b50aff5c0ecb351]

Additional context
Add any other context about the problem here.

Conceal headline asterisks

Does this feature exist in Emacs orgmode?
Yes

Link to the orgmode manual or any documentation related to the feature:

https://orgmode.org/org.html#Clean-View

Additional context

Would it be possible to define a custom highlight group for headline asterisks so that they can be concealed? For those of us that use a lot of headlines, changing all but the last asterisk to the background color would help the document look cleaner. Example:

* Top level headline             |    * Top level headline
** Second level                  |      * Second level
*** Third level                  |        * Third level
some text                        |          some text
*** Third level                  |        * Third level
more text                        |          more text
* Another top level headline     |    * Another top level headline

Trying to append to an existing todo from the capture buffer throws an error

Describe the bug
When trying to append a capture to an existing todo or heading from inside the capture window, after using <leader>or and selecting a sub heading, an error is thrown.

E5108: Error executing lua ...k/packer/start/orgmode.nvim/lua/orgmode/capture/init.lua:145: attempt to index local 'item' (a nil value)

To Reproduce
Steps to reproduce the behavior:

  1. Open the capture menu
  2. Add some details to the template
  3. hit <leader>or to move to a specific location
  4. try to complete a sub heading e.g. todo.org/some_heading
  5. See error

Expected behavior
The TODO item should be saved to the specific part/location within the org document

Emacs functionality
I presume this is how it would work in Emacs.

Screenshots
image

System information:

  • OS: Linux
  • Neovim version/commit: v.0.5

Additional context
Add any other context about the problem here.

Plugins infrastructure

Any suggestions how to improve infrastructure for building orgmode plugins should be posted here.

Scheduled and deadline-d TODOs still show up in the agenda when done

Describe the bug
When completing a todo that has a deadline or schedule, despite refreshing I still see the task in my agenda for the week, which gets noisy and confusing. I believe that normally in org these tasks would disappear (could be wrong).

To Reproduce
Steps to reproduce the behavior:

  1. Go to an incomplete todo with a deadline or scheduled date
  2. Click on complete the task
  3. Open agenda view
  4. See task still in the agenda

Expected behavior
If in a completed state, either done or a user defined state, a task should no longer appear in the agenda.

Emacs functionality
Based on the docs here I believe that when a todo item is completed the agenda should no longer flag it.

Screenshots
image
The cancelled and done task in the screenshot above are still visible under yesterday's heading

Option to switch to no-indent mode

Does this feature exist in Emacs orgmode?
Yes

If answer to first question is "Yes", please provide the link to the orgmode manual or any documentation related to the feature

https://orgmode.org/manual/Org-Indent-Mode.html

Additional context

In emacs orgmode indent is done (if I understand correctly, I have never used it) by adding virtual white space. That is, the plain text file does not contain any indent whitespace, but these are shown in emacs orgmode. This isn't (yet) possible in neovim though it is a goal for 0.6. In any case, orgmode.nvim currently simply adds real whitespace to the files. This leads to problems in some cases:

  1. tab to indent e.g. list items only works if the indent is an even number of whitespace. Thus if I'm in a subheading (**) then tab will increase indent only by one instead of two whitespaces.
  2. Compatability with emacs tools. In particular I have in mind the android orgzly application, which expects no (real) indent in the files.

I would like an option that toggles indent mode. As far as I can tell, in emacs orgmode indent is turned off by default.

Code block highlighting only activates after reloading file

Describe the bug
When using code-block functionality, I noticed I have to reopen the file for syntax highlighting to work.

To Reproduce
Steps to reproduce the behavior:

  1. Open org file
  2. Write #+BEGIN_SRC <lang>
  3. Write a line of code below it
  4. Make another new line and write #+END_SRC <lang>
  5. Observe highlighting is missing
  6. run :e <filename>
  7. Observe highlighting is working

Expected behavior
Code in code block to be highlighted before reloading the file

System information:

Org Bullets

Does this feature exist in Emacs orgmode?
No. But through a mode called orgmode-bullets

If answer to first question is "Yes", please provide the link to the orgmode manual or any documentation related to the feature

https://github.com/sabof/org-bullets

If answer to first question is "No", elaborate on how this feature is valuable and what problem does it solve.

It can be good for aesthetics

Default org template being used when trying to capture

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:

  • OS: macOS Big Sur & Linux Ubuntu 20.04
  • Neovim version/commit: NVIM v0.5.0-dev+nightly-818-g5aaa1a1c04

Additional context
Add any other context about the problem here.

Promoting/Demoting opens fold.

Describe the bug
Promoting/Demoting opens fold.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a closed fold headline
  2. Promote/demote subtree with ">s" in normal mode
  3. headline will get demoted but the fold will be opened.

Expected behavior
Fold stays closed

  • OS: Linux Ubuntu
  • Neovim version/commit: most recent as of 2021-07-16

Caldav support

Does this feature exist in Emacs orgmode?
Yes

If answer to first question is "Yes", please provide the link to the orgmode manual or any documentation related to the feature

https://github.com/dengste/org-caldav

Additional context
This is probably a massive ask. I dont know much about caldav other than that I managed to get it to work with calcurse and my owncloud. It would be wonderful to have the org agenda be in sync with caldav protocol as per the above emacs plugin

Strikethrough syntax isn't supported

Describe the bug
Org mode supports strike through text by surrounding the text with + symbols
e.g. +cancelled+ should appear as being struck through.

To Reproduce
Steps to reproduce the behavior:

  1. Go to and org file
  2. type +test+
  3. The text is not highlighted as strikethrough

Expected behavior
Text should appear as strikethrough which neovim supports using the gui=strikethrough argument to the highlight command.

Emacs functionality
Yes

Screenshots
Can't find any for the time being, but will paste some examples when I find them.

Agenda as a calendar view

Does this feature exist in Emacs orgmode?
N/A

Hi,

Would it be possible to switch the view after oa that the "Agenda for current week or day" could be consulted as a "calendar view" instead of a long list.

I hope you get what I mean.

Document date time abbreviations

This isn't really a bug per se but there was no other fitting issue type.

I saw in the GIF regarding autocompletion that :now: was being autocompleted to
a date time and didn't realise that this wasn't coming from compe and was confused as to why it wasn't working.

I eventually realised that it was an iabbrev command and that it only expands after you enter a space i.e. :now:<space> will expand but :now: won't. Which isn't necessarily an issue, I just wanted to suggest that this be documented somewhere since from the GIF it's not clear how this works or what is available e.g. is just now? can other words work?

Improve highlight group links for done state

Describe the bug

Currently the done state takes its highlighting from diffAdd with some fallbacks around the Diff highlight group. I guess this is because these are usually green across most colorschemes. The issue with this is that it isn't dependably a high enough contrast of green. In my case the green is quite muted so that it's easier to make out the added text, but this means that the green as a text highlight rather than background is hard to read.

Screen Shot 2021-06-30 at 10 55 43

Expected behavior
A more dependably green highlight might be String or tbh if the intent is that the colour should be green then you can alternatively use guifg={Green|LightGreen} etc which I believe also works for cterm. That way the colour will be green regardless of the users colorscheme.

I guess this could apply to in progress states as well. It might be that your intention is not to aim for a particular colour at all in which case an alternative or additional solution could be to surface the highlight groups to be overriden. Generally I'm fine with how most colours appear so am not looking to go down a highlight altering rabbit hole, so this is less about surfacing a bunch of highlights and more about a more predictable default.

Can't open help after closing using `:q`

Describe the bug
After closing the help menu with :q, trying to open it again will fail.

To Reproduce

  1. Open the help menu using <leader>o?
  2. Close it using :q
  3. Try opening the help menu again
  4. Observe error E5108: Error executing lua ...k/packer/start/orgmode.nvim/lua/orgmode/objects/help.lua:128: Vim:E95: Buffer with this name already exists

Optionally conceal orgmode syntax

When typing out orgmode syntax such as

=verbatim=
/italic/
_underline_

The markup for these styles remains visible in the buffer. Perusing various emacs org mode talks and videos, I can't tell if it allows these to be hidden or not really, but I know that vim supports concealing much like Markdown syntax files conceal things like backticks etc.

Perhaps this could be done in a way user can configure, as I'm sure some users will prefer to see the text at all times and some like myself would prefer for things to be concealed.

Does this feature exist in Emacs orgmode?
I'm not sure

If the answer is No, why do it? (sorry, removed the original heading by mistake)
Essentially, I think the additional text being visible constantly creates visual noise when you scan a buffer. I think that when reading the contents of the buffer if the words are already highlighted correctly i.e. already italicised or bold etc. then you don't need to see the special characters making that happen unless you are about to edit that piece of text.

A good example of this in practice is actually reading this issue, all the markup has been hidden for ease of reading 😄 .

Thoughts?

Text objects and motions for headings, subtrees and etc

Does this feature exist in Emacs orgmode?
N/A

If answer to first question is "No", elaborate on how this feature is valuable and what problem does it solve.

One cool feature of jceb/vim-orgmode is text objects for orgmode. It allows to combine power of orgmode and Vim ideas. Quotation:

Vim offers a mighty feature called |text-objects|. A text object is bound to
a certain character sequence that can be used in combination with all kinds
of editing and selection tasks.

vim-orgmode implements a number of text objects to make editing org files
easier:

  ih                    inner heading, referring to the current heading
                        excluding the heading level characters (*)
  ah                    a heading, referring to the current heading including
                        everything
  ir                    inner subtree, starting with the current heading
  ar                    a subtree, starting with the current heading
  Oh                    inner outer heading, referring to the parent
  Or                    inner outer heading, including subtree, referring to
                        the parent
  OH                    an outer heading
  OT                    an outer subtree

Motions can be used like text objects as well. See |orgguide-motion|.

I thinks it is a very good idea to use powerful Vim features to interact with Org content.

Additional context
P.S. Having motions should be also very useful.

Change TODO state on repeating task should maintain ordering

Currently changing the TODO state on a repeating task inserts the changed state on the second line. This means that they end up out of chronological order. Ideally the line should always be inserted just after the :END:, such that they are ordered in (descending) chronological order.

For example, below is the output of a current daily todo. As you can see the "State "DONE" from "TODO" lines are out of order. This is because currently these lines are inserted below the first line. Instead I'd suggest inserting updates below :END:, such that they stay in (descending) order.

Alternatively you could try to insert the after the last line, which would also maintain chronological order (ascending). Personally I prefer to have the most recent things at the top, but I have noticed that in general orgmode seems to prefer to have the last edits at the bottom (i.e. when refiling/capturing things).

* TODO Daily habit 1
  SCHEDULE: <2021-07-05 Mon ++1d>
  :PROPERTIES:
  :LAST_REPEAT: 2021 -07-04 Sun 07:27
  :END:
- State "DONE" from "TODO" [2021-07-02 Fri 06:30]
- State "DONE" from "TODO" [2021-07-04 Fri 06:35]
- State "DONE" from "TODO" [2021-07-03 Fri 07:20]

Dashboard cannot make changes

Describe the bug
When in the Dashboard buffer (glepnir/dashboard.nvim)
when you try to open up agenda or capture
you'll get

E21: Cannot make changes, 'modifiable' is off

To Reproduce
Steps to reproduce the behavior:

  1. Install the Dashboard plugin
  2. Make sure nvm opens up with the dashboard buffer
  3. on that buffer open up orgmode capture / agenda

Expected behavior
orgmode plugin opens up agenda and capture

System information:

  • OS: arch
  • Neovim version/commit: NVIM v0.6.0-dev+49-gc36df20ae

<C-A> to increase date will increase the year if cursor is not on the date

Hey, this is a really nice project and I'm happy to see such active development on this. It already looks promising!

Describe the bug
Using <C-a> when the cursor is not on the date will increment the year, and thereafter it'll work properly.

To Reproduce
Steps to reproduce the behavior:

  1. Write some text and then write :now: and exit insert mode.
  2. Go to the start of line (e.g. by typing 0 (zero) )
  3. Type <C-a>
  4. The year has increased to 2022. Next time I type <C-a> the day increases, as expected.

Expected behavior
The date should increase by one day when I type <C-a>, even if the cursor is not on the date object.

Screenshots

simplescreenrecorder-.37.mp4

System information:

  • OS: linux
  • Neovim version/commit: Nvim: NVIM v0.5.0-dev+1449-gbdf3df402
  • orgmode commit: 6b99d66

Additional context
<C-a> normally finds the closest number and increase it, so it makes sense that the first <C-a> increase the year (that's vim builtin behaviour). Subsequently the cursor is on the date object, and orgmode <C-a> functionality takes precedence and increase the day. However, I consider this a bug because the expected behaviour is that <C-a> should "do the right thing" and increase the date immediately.

I guess also <C-x> have the same issue.

Source blocks don't get highlighted correctly if indented

Describe the bug

The source blocks in org files lose their highlighting if they are indented
org_mode

I think maybe this section below insists that they must be at the start of the line, but perhaps should allow any amount of whitespace before it? Not sure if something like that can actually work in vim syntax highlighting.
https://github.com/kristijanhusak/orgmode.nvim/blob/c81e00ad057b7564e6facb5bc7542fbb1a3349ea/syntax/org.vim#L140-L142

To Reproduce
Steps to reproduce the behavior:

  1. Go to any org file
  2. Paste
#+BEGIN_SRC lua
local a = 5
local b = 5
#+END_SRC
  1. Highlight the region and indent it using >
  2. Watch highlighting disappear

Expected behavior
I'm actually not sure how org mode behaves, but I believe from screenshots I can find that you are allowed to have these blocks be indented

Emacs functionality
I believe it allows indentation, though I'll admit I'm not an expert and I'm not 100% sure but screenshots like this seem to indicate that it does

image

Agenda list of TODO's clears itself if I refresh the TODO list

Describe the bug
If I bring up the list of my TODO's, and then without saving the document or changing any TODO items, I refresh the TODO list, all the entries go away and I have to save my agenda file, close the TODO list window, and then re-open it in order to get my list of TODO's back

To Reproduce
Steps to reproduce the behavior:

  1. Open Agenda file with TODO's
  2. Open list of TODO's with < leader > oat
  3. refresh list with 'r' binding
  4. See error

Expected behavior
I don't expect the list of TODO's to clear itself if I refresh the list without making any changes to the existing TODO's

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

Screenshots
If applicable, add screenshots to help explain your problem.

System information:

  • OS: Windows 10
  • Neovim version/commit: nvim-qt v0.5.0

Additional context
Add any other context about the problem here.

Adding a new headline makes it get folded in the wrong level

Describe the bug

Adding a new headline makes it get folded in the wrong level

Steps to reproduce

  1. Open a file with the following content:
* headline 1
some content
  1. Add a headline such that the buffer looks like this:
* headline 1
some content
* headline 2
  1. Go to the line with headline 1 and close the fold (with zc in normal mode)
  2. You can observe that there's now just 1 fold, and headline 2 is hidden within that fold.

Expected behavior

Headline 1 including some content should get folded. Headline 2 should be separate from this (i. e. not vanish in the fold) because it is on the same level as headline 1.

OS / Distro

Ubuntu 20.04, alacritty

Neovim version/commit

latest HEAD on 2021-08-04

Additional context

If you open a file that already contains all the content (i.e. both headlines), the folding works as expected.

omni completion source does not work with coc-omni

Describe the bug

I haven't found the time to migrate over the nvim's built in lsp & nvim-compe and so I'm trying to use coc-omni with orgmode.nvim. However it doesn't work. Is the problem with this plugin or on coc-omni's side?

Steps to reproduce

  1. Have orgmode.nvim & coc.nvim w/ coc-omni installed
  2. Try to trigger completion from within an org file

Expected behavior

Omni func is callable & works?

Emacs functionality

No response

Screenshots and recordings

image

OS / Distro

Manjaro

Neovim version/commit

0.5

Additional context

No response

Feature request: Lazy load plugin

Does this feature exist in Emacs orgmode?

  • Yes
  • No
  • No idea

If answer to first question is "No", elaborate on how this feature is valuable and what problem does it solve.
This is probably a complicated ask, but is it possible to lazy load this plugin, for example with packer like this
use {"kristijanhusak/orgmode.nvim", ft = "org"}

The ft command I get is tricky as you set ftdetect from within the plugin. But perhaphs some otherway like a command like orgInit() that can be used to initialize/lazy-load?
...

Additional context
Add any other context or screenshots about the feature request here.

Support / docs / newbie question: Where does the require statement go?

Where does the require('orgmode').setup({ etc statement documented under Setup get placed?

Tried it in ~/.vimrc and got:

Error detected while processing /home/mlncn/Projects/mlncn/scripts/.vimrc:
line   78:
E492: Not an editor command: require('orgmode').setup({
line   79:
E492: Not an editor command:   org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs
/**/*'},
line   80:
E492: Not an editor command:   org_default_notes_file = '~/Dropbox/org/refile.or
g',
line   81:
E492: Not an editor command: })

Using the kristijanhusak/vim-packager installation approach.

Hmm, same for the chain completion too.

Error detected while processing /home/mlncn/Projects/mlncn/scripts/.vimrc:
line   78:
E220: Missing }.
"completion_chain_complete_list" [New]
Cannot open file "completion_chain_complete_list"

Thanks!

LaTeX Features (exporting, syntax highlighting, preview)

Does this feature exist in Emacs orgmode?
Yes

If answer to first question is "Yes", please provide the link to the orgmode manual or any documentation related to the feature

https://orgmode.org/manual/Embedded-LaTeX.html
https://orgmode.org/manual/Exporting.html

...

Additional context
Unlike some other languages that are meant to be wrapped in #+begin_src, emacs/org has latex embedded directly into org mode. This integration consists of

  1. Allowing you to write equations inline using $(equation)$, and multi-line equations using \begin{equation} or \begin{align}
  2. Highlighting inline latex
  3. Exporting org into multiple file formats, most notably a .tex file which is used to produce a .pdf file
  4. Allowing you to create inline-previews of latex as .svgs

NOTE Unlike emacs, neovim can't display images inline and lacks some other features. As such, you might be more interested in utilizing pandoc and grip to render org.

  1. An example of this is here:

image

Notice the \begin and $equation$ tags used to define latex. In emacs it looks like this:

image

  1. In the above example, if I expand the previewed latex, it looks highlighted like this:

image

Which is much easier to read than the white of orgmode.nvim
  1. Emacs allows you to export org files into various other filetypes:

image

Notably, html, markdown, and latex to pdf, which allows you to produce nice looking pdfs. The pdf export also takes some cues from org mode for packages, used, title, author, and the ToC:

image

  1. Previewing

As displayed in the first screenshot of emacs, you can preview latex fragments. Although you can't display inline images in neovim like you can with emacs, you might be able to utilize an external preview, powered through a web-renderer similar to grip (grip itself doesn't support math).

Editing fails for non-written files

To replicate this:

  1. nvim file.org
  2. Insert some text * Headline
  3. Try performing an orgmode operation (such as >>)

The following error popus up: E5108: Error executing lua ...k/packer/start/orgmode.nvim/lua/orgmode/parser/files.lua:91: attempt to index local 'file' (a nil value)

completion-nvim support

Does this feature exist in Emacs orgmode?

  • Yes
  • No
  • N/A

If answer to first question is "No", elaborate on how this feature is valuable and what problem does it solve.
Using completion-nvim for autocompletion. Either by add this as a custom completion sources (similar to vimtex) or a direct integration.

If you could add steps to do so as a wiki or in README
Thanks
...

Implement insert schedule/deadline for a task

Does this feature exist in Emacs orgmode core?

N/A

Orgmode link

No response

Feature value

No response

Additional context

In doom emacs(idk about vanilla) a task can be scheduled with SPC m d s keys or SPC m d d for deadlines

Can't rebind key for org_meta_return

Describe the bug
Not sure if this is intended or not, but for some reason I can't rebind the default keybind for org_meta_return.

The default bind is < leader > < CR > and I'm trying to bind it to Control + Enter which I would assume would be:

require('orgmode').setup({
org_meta_return = '< C-CR >',
})

but this doesn't work. Even after rebind it in my init.vim, the default behavior persists.

Am I just binding the key wrong?

Error in agenda view using keywords other than TODO

Describe the bug
When I set up other keywords with e.g. org_todo_keywords = {'TODO', 'WAITING', 'NEXT', '|', 'DONE', 'DELEGATED'} and use one of those new keywards (e.g. 'WAITING') in an entry, then I get the following error message on opening the agenda:

20210706_21h28m13s_grim

The list of tasks still opens, but the highlighting of keywords doesn't work as soon as the first new keyword appears.
20210706_21h32m41s_grim

To Reproduce
Steps to reproduce the behavior:

  1. Add the above settings to orgmode.nvim setup function
  2. Add an entry such as 'WAITING some task'
  3. Open the agenda
  4. See error

Expected behavior
No error

Emacs functionality
I don't know.

Screenshots
see above.

System information:

  • OS: Arch
  • Neovim version/commit: 0.5 release

Cancelling capture freezes neovim if UltiSnips tabstops are left untouched before cancellation

Thank you for your plugin Kristijan. It is great.

I found this issue so I'm reporting.

Describe the bug
In org capture, <leader>ok is used to cancel capture. Usually the cancellation is snappy, but if one uses UltiSnips snippets before cancelling containing tabstops, neovim freezes for a few seconds (~5) if the tabstops aren't touched.

To Reproduce
Install ultisnips and add following snippet to /path-to-Ultisnips/org.snippets

snippet test "Test" iA
Event  $1
endsnippet

As soon as you trigger test, escape and press <leader>ok or :q!, and neovim should freeze.
This can be avoided if the tabstops are touched. For example, Event 22 should quit fine.

This doesn't happen in other org buffers, nor in any other filetypes.

Expected behavior
The cancellation behaviour should be snappy as always - it should just simply drop whatever's in the buffer.

System information:

  • OS: Linux
  • Neovim version/commit: nvim-0.6 dev

Tests fails locally on date spec timestampss

Describe the bug
When running make test locally, the test are always failing in the date_spec file. Always giving a timestamp error.

To Reproduce
Steps to reproduce the behavior:
run make test

Screenshots
Here is a small part of the logs. In the end, 11 tests passes while 14 are failed.

========================================
Testing:        /home/pgrogan/workstation_setup/orgmode.nvim/tests/plenary/object/date_spec.lua
Fail    ||      Date object shoud parse date
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:14: Expected objects to be the same.
            Passed in:
            (number) 1623297600
            Expected:
            (number) 1623276000

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:14: in function <...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:4>

Fail    ||      Date object should parse date time
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:41: Expected objects to be the same.
            Passed in:
            (number) 1625490000
            Expected:
            (number) 1625468400

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:41: in function <...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:32>

Fail    ||      Date object should parse date time with dayname and warning adjustment
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:64: Expected objects to be the same.
            Passed in:
            (number) 1625058000
            Expected:
            (number) 1625036400

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:64: in function <...

System information:

  • OS: Linux Ubuntu 18.04
  • Neovim version/commit: [https://github.com/neovim/neovim/commit/bdf3df4027a5389a46b4c9a75b50aff5c0ecb351]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.