Skip to content

bandithijo/orgmode.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orgmode.nvim (Beta)

Orgmode clone written in Lua for Neovim 0.5.

Installation

Use your favourite package manager:

Setup

require('orgmode').setup({
  org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'},
  org_default_notes_file = '~/Dropbox/org/refile.org',
})
  • Open agenda prompt: <Leader>oa
  • Open capture prompt: <Leader>oc
  • In any orgmode buffer press ? for help

Completion

If you use nvim-compe and want to enable autocompletion, add this to your compe config:

  require'compe'.setup({
    source = {
      orgmode = true
    }
  })

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

Gifs

Agenda

agenda

Org file

orgfile

Capturing and refiling

capture

Autocompletion

autocomplete

Features (TL;DR):

  • Agenda view
  • Search by tags/keyword
  • Repeatable dates, date and time ranges
  • Capturing to default notes file/destination
  • Archiving (archive file or ARCHIVE tag)
  • 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

Features (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):
  • 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
    • 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 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)

Link to detailed documentation: DOCS

Development

Tests

To run tests, plenary.nvim is necessary. Once installed, run:

make test

Documentation

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

Parser

Parser is written manually from scratch. It doesn't follow any parser writing patterns (AFAIK), because I don't have much experience with those. Any help on this topic is appreciated.

Plans

  • Support searching by properties
  • Improve checkbox hierarchy
  • Support todo keyword faces
  • Support clocking work time
  • Improve folding
  • Support exporting and publishing (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.
  • vim-orgmode for some parts of the code (mostly syntax)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 95.7%
  • Vim Script 4.2%
  • Makefile 0.1%