Showing preview only (645K chars total). Download the full file or copy to clipboard to get everything.
Repository: jceb/vim-orgmode
Branch: master
Commit: e9506ee5cb49
Files: 81
Total size: 617.0 KB
Directory structure:
gitextract_x59pk6e5/
├── .gitignore
├── .pylintrc
├── .travis.yml
├── CHANGELOG.org
├── LICENSE
├── Makefile
├── README.org
├── doc/
│ └── orgguide.txt
├── examples/
│ ├── mylife.org
│ └── plugins/
│ └── PluginExample.py
├── ftdetect/
│ └── org.vim
├── ftplugin/
│ ├── org.cnf
│ ├── org.vim
│ └── orgmode/
│ ├── __init__.py
│ ├── _vim.py
│ ├── docs/
│ │ ├── Makefile
│ │ ├── conf.py
│ │ ├── index.rst
│ │ ├── make.bat
│ │ ├── orgmode.liborgmode.rst
│ │ ├── orgmode.plugins.rst
│ │ ├── orgmode.py3compat.rst
│ │ └── orgmode.rst
│ ├── exceptions.py
│ ├── keybinding.py
│ ├── liborgmode/
│ │ ├── __init__.py
│ │ ├── agenda.py
│ │ ├── agendafilter.py
│ │ ├── base.py
│ │ ├── checkboxes.py
│ │ ├── documents.py
│ │ ├── dom_obj.py
│ │ ├── headings.py
│ │ └── orgdate.py
│ ├── menu.py
│ ├── plugins/
│ │ ├── Agenda.py
│ │ ├── Date.py
│ │ ├── EditCheckbox.py
│ │ ├── EditStructure.py
│ │ ├── Export.py
│ │ ├── Hyperlinks.py
│ │ ├── LoggingWork.py
│ │ ├── Misc.py
│ │ ├── Navigator.py
│ │ ├── ShowHide.py
│ │ ├── TagsProperties.py
│ │ ├── Todo.py
│ │ └── __init__.py
│ ├── py3compat/
│ │ ├── __init__.py
│ │ ├── encode_compatibility.py
│ │ ├── py_py3_string.py
│ │ ├── unicode_compatibility.py
│ │ └── xrange_compatibility.py
│ ├── settings.py
│ └── vimbuffer.py
├── indent/
│ └── org.vim
├── syntax/
│ ├── org.vim
│ ├── orgagenda.vim
│ └── orgtodo.vim
└── tests/
├── orgmode_testfile.org
├── run_tests.py
├── test_libagendafilter.py
├── test_libbase.py
├── test_libcheckbox.py
├── test_libheading.py
├── test_liborgdate.py
├── test_liborgdate_parsing.py
├── test_liborgdate_utf8.py
├── test_liborgdatetime.py
├── test_liborgtimerange.py
├── test_plugin_date.py
├── test_plugin_edit_checkbox.py
├── test_plugin_edit_structure.py
├── test_plugin_mappings.py
├── test_plugin_misc.py
├── test_plugin_navigator.py
├── test_plugin_show_hide.py
├── test_plugin_tags_properties.py
├── test_plugin_todo.py
├── test_vimbuffer.py
└── vim.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.pyc
*.swp
tags
.ropeproject
.cover*
cover*
================================================
FILE: .pylintrc
================================================
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
init-hook=sys.path.append(os.path.abspath('ftplugin'))
# Profiled execution.
profile=no
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=.git
# Pickle collected data for later comparisons.
persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
[MESSAGES CONTROL]
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
#disable=
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html
output-format=parseable
# Include message's id in output
include-ids=no
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no
# Tells whether to display a full report or only the messages
reports=yes
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Add a comment according to your evaluation note. This is used by the global
# evaluation report (RP0004).
comment=no
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
zope=no
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
generated-members=REQUEST,acl_users,aq_parent
[BASIC]
# Required attributes for module, separated by a comma
required-attributes=
# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,apply,input
# Regular expression which should only match correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression which should only match correct module level names
const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Regular expression which should only match correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct list comprehension /
# generator expression variable names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
# Regular expression which should only match functions or classes name which do
# not require a docstring
no-docstring-rgx=__.*__
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the beginning of the name of dummy variables
# (i.e. not used).
dummy-variables-rgx=_|dummy
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=800
# Maximum number of lines in a module
max-module-lines=1000
[CLASSES]
# List of interface methods to ignore, separated by a comma. This is used for
# instance to not check methods defines in Zope's Interface base class.
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
[DESIGN]
# Maximum number of arguments for function / method
max-args=5
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branchs=12
# Maximum number of statements in function / method body
max-statements=50
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
================================================
FILE: .travis.yml
================================================
language: python
before_install:
- sudo apt-get update && sudo apt-get --reinstall install -qq language-pack-pt
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
install:
- pip install coverage
- pip install codecov
script:
- cd tests
- nosetests --with-coverage .
after_success:
- codecov
================================================
FILE: CHANGELOG.org
================================================
* Changelog
All notable changes to this project will be documented in this file.
This log is kept according to the [[http://keepachangelog.com/][Keep a CHANGELOG]] manifesto
** 0.7.0 :unreleased:
*** Added
- Subtracting when entering dates (PR #276)
*** Fixed
- =ir= text object now works with most operations (PR #284, closes #273)
** 0.6.0 <2017-11-06 Mon> :released:
*** Added
- Introduced sphinx documentation to Python modules. (PR #237)
- Add =Python3= support. (PR #231, closes #226)
- Implementing agenda overview for current buffer. (PR #229)
- =g:org_aggressive_conceal=, if value =1=, will conceal all simple format
identifying characters, default =0=. (PR #188)
- (testing on `g:org_aggressive_conceal=1' mode) Add possibility to escape
format indicating characters from leading inline markup, by escaping with
"\".
- Add alternative behavior: refrain from entering insert mode after
heading/checkbox creation through keybindings. Activate by setting
=g:org_prefer_insert_mode= to 0. (closes #211)
- Add export as LaTeX beamer slides (PR #206)
- Keybinding to create plainlist item directly. (closes #190)
- Make % jump between < and >. (PR #251, closes #250)
*** Changed
- Changed default value for =g:org_indent= from =1= to =0=. (closes #243)
- Revamped TODO keyword cycling rules. (PR #237)
- In [[syntax/org.vim][syntax/org.vim]], changed `\@<=' with computational faster `\zs'
- Using =<localleader>c[n/N]= to create new plainlist item following
current plainlist item. Now these keybindings will unconditionally
create empty checkbox. (closes #190)
*** Deprecated
- Nothing
*** Removed
- Removed the requirement for TODO state keywords to be upper-case.
(PR #235)
*** Fixed
- Avoid duplicate =InsertLeave= handlers (PR #222, closes #223)
- Fix python3 compatibility issue with regexes
(PR #266, closes #263, #265)
- Fixed python3 compatible issue within =CalendarAction=.
(PR #242, closes #241)
- Tree promoting/demoting no longer destroy list and checkbox structure.
(closes #217)
- Fixed bug when promote/demote headings when it contain lists.
(PR #239, partly fixes #217)
- Silenced =W18= warning when non-ASCII coded TODO keywords are used.
(PR #236)
- Fix non-English locale support issue in OrgDate and Agenda. (PR #234,
closes #230)
- Fix =concealcursor= mis-setting. (from ="nc"= to =nc=)
- Fix duplicate =InsertLeave= autocmd for =tag_complete=. (closes #223)
- Fix utl error when =\= or white space is in the link by auto-escaping.
(closes #220)
- Fix typo vbm -> vmb (PR #219)
- Fix toggling checkboxes with plain embedded lists (PR #212, closes #209)
- Return to right window before setting todo (closes #202)
- Fix link to calendar-vim (closes #197)
- Fix =out of bound= issue when creating heading/checkbox after last
instance in document on NeoVim. (closes #213)
** 0.5.0 <2015-10-10 Sat> :released:
*** Added
- show link description in headings when folded, instead of the whole
link
- add simplified mappings to create new headings with
[<localleader>|<leader>]<CR>
- improve incrementing and decrementing of list items
- moved changelog information to its own file
- add tests for the tags plugin
- copy type and indentation when creating new list items
- increase/decrease ordered list when adding new items
- add support for alphanumeric ordered lists
- add test cases for overlapping mappings
- add three dots after folded text, like in orgmode
- improve highlighting of org-mode properties (closes issue #130)
- implement global visibility as it works in Emacs org-mode (closes issue
#119)
- improve detection of speeddating plugin (closes issue #121)
- add support for high speed searching of headings that use certain tags
(closes issue #58)
- make echo, echom and echoe split messages a line ends and execute a
single vim command for each line
- add export commands OrgExportToPDF and OrgExportToHTML (closes issue
#107)
- add variables for customizing the export via Emacs: g:org_export_emacs,
g:org_export_verbose, g:org_export_init_script (closes issue #107)
- switch to subprocess.Popen for Emcas export (closes issue #107)
- add defaults and examples for all variables
- add support for inserting new checkboxes with the same keybinging as
inserting new headings (thanks to Powen Tan)
- implemented support for markdown export (issue #185)
*** Deprecated
- Nothing
*** Removed
- Nothing
*** Fixed
- allow checkbox status to be toggled when there is no indicator present
([])
- improve installation instructions (related to issues #111 and #176)
- optimize checkbox regex to match also just the type without status and
title
- fix broken unordered lists
- set org_tag_column to textwidth
- change commentstring to "# %s"
- fix syntax highlighting of list items
- fix indentation of first checkbox of a heading
- fix indentation of first checkbox of a heading
- disable highlighting of non-printable characters in todo state
selection window
- fix highlighting of todo keywords that are followed by additional
characters, i.e. TODOs
- omit status when entering new checkbox item if current checkbox doesn't
have one
- fix broken indentation of checkboxes (closes issue #146)
- fix CalendarAction is undefined (closes issue #142)
- correct overlapping mappings in PluginDate
- fix cache problems when inserting a new heading, together with multi
line text (closes issue #116)
- rename plug to OrgTodoToggleNonInteractive (closes issue #114)
- fix jumping to the first character within the body of a heading
- use Ignore highlighting instead of NonText for shaded stars (closes
issues #173)
- fix broken buffer number (closes issue #177)
- make exports work with emacs 24.4 (closes issue #178)
- improve comments
- fix syntax for #+BEGIN_* blocks (issue #186)
** 0.4.0-0 <2011-10-16 Sun> :released:
- fix broken repeat settings for moving a heading
- improve performance when moving a heading upward or downward (closes
issue #108)
- improve performance when changing the level of a heading (related to
issue #108)
- extend liborgmode.headings.HeadingList to allow headings to not be
tainted when moving them around
- change heading tree text object to ir/ar... because of vim's it/at text
object (closes issue #106)
- improve performance when inserting a new heading below (closes issue
#105)
- remove duplicate tags (closes issue #104)
- improve performance in insert mode (closes issue #103)
- improve performance when opening larger org files (closes issue #103)
- replace org.txt by orgguide.txt (closes issue #77)
- replace g:org_leader by <LocalLeader> (closes issue #101)
To restore the previous behavior add the following line to your vimrc:
>
let maplocalleader = ','
<
- change normal command execution to not remap any key (related to issue
#85)
- fix regression timeout when opening folds (closes issue #100)
- vim-orgmode multistate documentation (closes issue #77)
- add support for @-signs in tags (closes issue #98)
- enable file completion for hyperlinks by default (closes issue #97)
- fix traceback when pressing <Esc> while editing a link (closes issue
#96)
- implement reverse visibility cycling using <S-Tab> (closes issue #95)
- change ,, and ,. to remap zr and zm. (closes issue #73)
- add .cnf files to the vimball archive (closes #93)
- integrate pylint code checker (closes issue #87)
- solve encoding issues in the agenda plugin (closes issue #86)
- add description for writing test cases
- add coverage report target (closes issue #74)
- add support for plain lists, thanks to Aleksandar Dimitrov (closes issue
#81)
- add agenda view, many thanks to Stefan Otte (closes issue #34)
- move cursor to the current todo state when selecting the todo state
interactively (closes issue #61)
- add parameter scope to method settings.get
- add method settings.unset
- fix cursor positioning when selecting todo states
- improve date plugin
- update vba targets to its new name vmb
- demoting a newly created second level heading doesn't cause all children
to
be deleted anymore (closes issue #65)
- add error message for missing dependencies (closes issue #59)
- rename tests directory
- change licensing of the documentation to GNU Free Documentation License
- integrate orgguide (closes issue #57)
- replace DIRECTION_* with an enum (closes issue #56 and issue #49)
** 0.3.1-0 <2011-08-14 Sun> :released:
- demoting a newly created second level heading doesn't cause all children
to be deleted anymore (closes issue #65)
- add error message for missing dependencies (closes issue #59)
** 0.3.0-0 <2011-08-09 Tue> :released:
- fix completion menu popup that disappeared because of the usage of
vim.command (closes issue #48)
- implement interactive todo state selection (closes issue #5)
- add orgmode group to au commands in TagProperties plugin (closes issue
#53)
- allow demotion of first level headings (closes issue #27)
- fix encoding issues in Date plugin
- add general support for multiple todo sequences (closes Issue #46)
- fix folded text for headings containing backslashes or double quotes
(closes issue #26)
- add Document.get_todo_states() and Document.get_all_todo_states()
- don't confuse upper case words at the beginning of a heading with a todo
state (closes issue #28)
- fix error in setting tags (issue #25)
- improve split of heading (issue #24)
- add variable g:org_improve_split_heading to enable/disable improve the
split of headings (issue #24)
- implement shortcut for moving to the partent's next sibling (g}) (issue
#22)
- fix duplication of children when inserting a new heading (issue #20)
- always start insert mode when adding a new heading (issue #21)
** 0.2.1-0 <2011-06-26 Sun> :released:
- fix encoding of todo states set by the Todo plugin (thanks to Daniel
Carl and kien for pointing out the issue)
- add documentation for remapping shortcuts
- add documentation for customizing syntax highlighting
** 0.2.0-0 <2011-06-25 Sat> :released:
- initial release
================================================
FILE: LICENSE
================================================
---------------------------------------------------------------------
All source code is licensed under the terms of the following license:
---------------------------------------------------------------------
Copyright (C) 2010,2011 Jan Christoph Ebersbach
http://www.e-jc.de/
All rights reserved.
The source code of this program is made available under the terms of the
GNU Affero General Public License version 3 (GNU AGPL V3) as published
by the Free Software Foundation.
Binary versions of this program provided by Univention to you as well as
other copyrighted, protected or trademarked materials like Logos,
graphics, fonts, specific documentations and configurations,
cryptographic keys etc. are subject to a license agreement between you
and Univention and not subject to the GNU AGPL V3.
In the case you use this program under the terms of the GNU AGPL V3, the
program is provided in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
You should have received a copy of the GNU Affero General Public License
with the Debian GNU/Linux or Univention distribution in file
/usr/share/common-licenses/AGPL-3; if not, see
<http://www.gnu.org/licenses/>.
--------------------------------------------------------------------
All documentation found in the directories doc and documentation are
licensed under the terms of the following license:
--------------------------------------------------------------------
doc/org.txt
Copyright (C) 2010,2011 Jan Christoph Ebersbach
doc/orgguide.txt
documentation/emacs_orgguide.org
documentation/emacs_orgguide.texi
Copyright (C) 2010 Free Software Foundation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being “A GNU Manual,” and
with the Back-Cover Texts as in (a) below. A copy of the license is
included in the section entitled “GNU Free Documentation License.”
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
modify this GNU manual. Buying copies from the FSF supports it in
developing GNU and promoting software freedom.”
This document is part of a collection distributed under the GNU Free
Documentation License. If you want to distribute this document
separately from the collection, you can do so by adding a copy of the
license to the document, as described in section 6 of the license.
================================================
FILE: Makefile
================================================
PLUGIN = orgmode
PREFIX = /usr/local
VIMDIR = $(PREFIX)/share/vim
all: build
build:
# install plugin at destination
install: doc indent ftdetect ftplugin syntax
for i in doc indent ftdetect ftplugin syntax; do \
find $$i -type f -name \*.txt -o -type f -name \*.cnf -o -type f -name \*.py -o -type f -name \*.vim | while read f; do \
install -m 0755 -d $(DESTDIR)$(VIMDIR)/$$(dirname "$$f"); \
install -m 0644 $$f $(DESTDIR)$(VIMDIR)/$$f; \
done; \
done
# cleanup
clean: documentation
@find . -name \*.pyc -o -name \*.py,cover -exec rm {} \;
@rm -rf ${PLUGIN}.vmb ${PLUGIN}.vmb.gz tmp files
cd $< && $(MAKE) $@
# generate the vim ball package
${PLUGIN}.vmb: check build_vmb.vim clean
$(MAKE) DESTDIR=$(PWD)/tmp VIMDIR= install
find tmp -type f | sed -e 's/^tmp\///' > files
cp build_vmb.vim tmp
cd tmp && vim --cmd 'let g:plugin_name="${PLUGIN}"' -s build_vmb.vim
[ -e tmp/${PLUGIN}.vba ] && mv tmp/${PLUGIN}.vba tmp/$@ || true
mv tmp/$@ .
${PLUGIN}.vmb.gz: ${PLUGIN}.vmb
@rm -f ${PLUGIN}.vmb.gz
gzip $<
vmb: ${PLUGIN}.vmb
vmb.gz: ${PLUGIN}.vmb.gz
${PLUGIN}.vba: ${PLUGIN}.vmb
mv $< $@
${PLUGIN}.vba.gz: ${PLUGIN}.vba
@rm -f ${PLUGIN}.vba.gz
gzip $<
vba: ${PLUGIN}.vba
vba.gz: ${PLUGIN}.vba.gz
# run unit tests
test: check
check: tests/run_tests.py
cd tests && python2 run_tests.py
# generate documentation
docs: documentation
cd $< && $(MAKE)
# generate a test coverage report for all python files
coverage:
@echo ">>> Coverage depends on the package python-nose and python-coverage, make sure they are installed!"
cd tests && nosetests2 --with-coverage --cover-html .
# run a static code checker
lint:
@echo ">>> Lint depends on the package pylint make sure it's installed!"
pylint --rcfile .pylintrc --disable=C0301,C0103,C0111,C0322,C0323,C0324,W0703,W0612,W0603 orgmode
lintall:
@echo ">>> Lint depends on the package pylint make sure it's installed!"
pylint --rcfile .pylintrc orgmode
# install vim-orgmode in the .vim/bundle directory for test purposes
VIMPLUGINDIR = $(HOME)/.vim/bundle/orgmode
installvmb: ${PLUGIN}.vmb install_vmb.vim
rm -rvf ${VIMPLUGINDIR}
mkdir -p "${VIMPLUGINDIR}"
vim --cmd "let g:installdir='${VIMPLUGINDIR}'" -s install_vmb.vim $<
@echo "Plugin was installed in ${VIMPLUGINDIR}. Make sure you are using a plugin loader like pathegon, otherwise the ${PLUGIN} might not work properly."
installvba: ${PLUGIN}.vba install_vba.vim
rm -rvf ${VIMPLUGINDIR}
mkdir -p "${VIMPLUGINDIR}"
vim --cmd "let g:installdir='${VIMPLUGINDIR}'" -s install_vba.vim $<
@echo "Plugin was installed in ${VIMPLUGINDIR}. Make sure you are using a plugin loader like pathegon, otherwise the ${PLUGIN} might not work properly."
.PHONY: all build test check install clean vmb vmb.gz docs installvmb
================================================
FILE: README.org
================================================
* Vim-OrgMode
#+ATTR_HTML: title="Join the chat at https://gitter.im/jceb/vim-orgmode"
[[https://gitter.im/jceb/vim-orgmode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge][file:https://badges.gitter.im/jceb/vim-orgmode.svg]]
[[https://travis-ci.org/jceb/vim-orgmode][file:https://travis-ci.org/jceb/vim-orgmode.svg]]
[[https://codecov.io/gh/jceb/vim-orgmode][file:https://codecov.io/gh/jceb/vim-orgmode/branch/master/graph/badge.svg]]
Text outlining and task management for Vim based on [[http://orgmode.org/][Emacs' Org-Mode]].
The idea for this plugin was born by listening to the
[[http://twit.tv/floss136][Floss Weekly podcast]] introducing Emacs Org-Mode.
Org-Mode has a lot of strong features like folding, views (sparse tree) and
scheduling of tasks. These are completed by hyperlinks, tags, todo states,
priorities aso.
vim-orgmode aims at providing the same functionality for Vim.
[[https://github.com/jceb/vim-orgmode/blob/master/examples/mylife.org][file:examples/mylife.gif]]
** Features
Currently vim-orgmode does not support all orgmode features but is quite
usable. Short list of the already supported features:
- Syntax highlighting
- Cycle visibility of headings (folding)
- Navigate between headings
- Edit the structure of the document: add, move, promote, denote headings
and more
- Hyperlinks within vim-orgmode and outside (files, webpages, etc.)
- TODO list management
- Tags for headings
- Lists in alphanumeric and bullet item notation and checkbox support
- Basic date handling
- Export to other formats (via Emacs' Org-Mode)
* Installation and Usage
Installation and usage instructions are found in the file [[doc/orgguide.txt][doc/orgguide.txt]].
* License
Information about the license is found in file [[LICENSE]].
* Changelog
All changes are found in file [[https://github.com/jceb/vim-orgmode/blob/master/CHANGELOG.org][CHANGELOG.org]]
================================================
FILE: doc/orgguide.txt
================================================
*orgguide.txt* For Vim version 7.3 Last change: 2019 December 13
_ _ ____ __ __ _____ ____ ___ __ __ _____ ____ ____
( \/ )(_ _)( \/ ) ( _ )( _ \ / __)( \/ )( _ )( _ \( ___)
\ / _)(_ ) ( )(_)( ) /( (_-. ) ( )(_)( )(_) ))__)
\/ (____)(_/\/\_) (_____)(_)\_) \___/(_/\/\_)(_____)(____/(____)
==============================================================================
TABLE OF CONTENTS *org* *org-toc* *orgguide* *orgguide-toc*
1. About vim-orgmode guide |orgguide-about|
2. Introduction |orgguide-introduction|
3. Installation |orgguide-installation|
4. Document structure |orgguide-docstructure|
5. Tables |orgguide-tables|
6. Hyperlinks |orgguide-hyperlinks|
7. Todo items |orgguide-todo|
8. Tags |orgguide-tags|
9. Properties |orgguide-properties|
10. Dates and Times |orgguide-dates|
11. Capture - Refile - Archive |orgguide-capture|
12. Agenda views |orgguide-agenda|
13. Export/Markup for rich export |orgguide-export|
14. Publishing |orgguide-publishing|
15. Working with source code |orgguide-source|
16. Miscellaneous |orgguide-misc|
17. MobileOrg |orgguide-mobileorg|
18. Customization |orgguide-customization|
19. Development |orgguide-development|
20. License vim-orgmode |orgguide-license|
21. Contributors |orgguide-contributors|
22. Changelog |orgguide-changelog|
23. Links |orgguide-links|
==============================================================================
ORG MODE GUIDE *orgguide-about*
Copyright © 2010 Free Software Foundation
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.3 or any later
version published by the Free Software Foundation; with no Invariant
Sections, with the Front-Cover texts being “A GNU Manual,” and with the
Back-Cover Texts as in (a) below. A copy of the license is included in the
section entitled “GNU Free Documentation License.”
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify
this GNU manual. Buying copies from the FSF supports it in developing GNU
and promoting software freedom.”
This document is part of a collection distributed under the GNU Free
Documentation License. If you want to distribute this document separately
from the collection, you can do so by adding a copy of the license to the
document, as described in section 6 of the license.
==============================================================================
INTRODUCTION *vim-orgmode* *orgguide-introduction*
Vim-orgmode: Text outlining and task management for Vim based on Emacs'
Org-Mode.
The idea for this plugin was born by listening to the Floss Weekly podcast
introducing Emacs' Org-Mode (http://twit.tv/floss136). Org-Mode has a lot of
strong features like folding, views (sparse tree) and scheduling of tasks.
These are completed by hyperlinks, tags, todo states, priorities also.
Vim-orgmode aims at providing the same functionality for Vim and for command
line tools*.
* WAITING for command line tools and other programs a library liborgmode is
provided. It encapsulates all functionality for parsing and modifying org
files.
------------------------------------------------------------------------------
Preface~
vim-orgmode is a file type plugin for keeping notes, maintaining TODO
lists, and doing project planning with a fast and effective plain-text
system. It is also an authoring and publishing system.
This document is a copy of the orgmode-guide for emacs
(http://orgmode.org/) with modifications for vim. It contains all basic
features and commands, along with important hints for customization.
To start create a new file with the extension ".org".
------------------------------------------------------------------------------
Features~
Currently vim-orgmode does not support all orgmode features but is quite
usable. Short list of the already supported features:
- Syntax highlighting
- Cycle visibility of headings (folding)
- Navigate between headings
- Edit the structure of the document: add, move, promote, denote headings
and more
- Hyperlinks within vim-orgmode and outside (files, webpages, etc.)
- TODO list management
- Tags for headings
- Lists in alphanumeric and bullet item notation and checkbox support
- Basic date handling
- Export to other formats (via emacs)
------------------------------------------------------------------------------
Default mappings~
*org-mappings*
Here is a short overview of the default mappings. They also can be invoked
via the 'Org' menu. Most are only usable in command mode.
Show/Hide:~
<TAB> - Cycle Visibility
Editing Structure:~
In GVIM:~
<C-S-CR> - insert heading above
<S-CR> - insert heading below, taking over children
<CR> - insert heading below, taking over children
<C-CR> - insert heading above, after children
In general Vim Versions:~
<localleader>hN - insert heading above
<localleader>hh - insert heading below, taking over children
<localleader>hn - insert heading above, after children
m} - move heading down
m{ - move heading up
m]] - move subtree down
m[[ - move subtree up
yah - yank heading
dah - delete heading
yar - yank subtree
dar - delete subtree
p - paste subtree
>> or >ah - demote heading
<< or <ah - promote heading
>ar - demote subtree
<ar - promote subtree
Hyperlinks:~
gl - goto link (vim built-in gx would work too)
gyl - yank link
gil - insert new link
gn - next link
go - previous link
TODO Lists:~
<localleader>d - select keyword
<S-Left> - previous keyword
<S-Right> - next keyword
<C-S-Left> - previous keyword set
<C-S-Right> - next keyword set
Plain List:~
<localleader>cl or <CR> - insert plainlist item below
<localleader>cL or <C-S-CR> - insert plainlist item above
Checkboxes:~
<localleader>cc - toggle status
<localleader>cn or <CR> - insert checkbox below
<localleader>cN or <C-S-CR> - insert checkbox above
TAGS and properties:~
<localleader>st - set tags
Dates:~
<localleader>sa - insert date
<localleader>si - insert inactive date
<localleader>pa - insert date by using calendar selection
<localleader>pi - insert inactive date by using calendar selection
Agenda:~
<localleader>caa - agenda for the week
<localleader>cat - agenda of all TODOs
<localleader>caA - agenda for the week for current buffer
<localleader>caT - agenda of all TODOs for current buffer
Not yet implemented in vim-orgmode~
<localleader>caL - timeline of current buffer
Export:~
<localleader>ep - export as PDF
<localleader>eb - export as Beamer PDF
<localleader>eh - export as HTML
<localleader>el - export as LaTeX
------------------------------------------------------------------------------
Inline markup~
We support org authoring markup as closely as possible
(we're adding two markdown-like variants for =code= and blockquotes).
Inline markup:
>
*bold*
/italic/
_underline_
+strike-through+
=code=
~verbatim~
<
Note:
- /italic/ is rendered as reverse in most terms (works fine in gVim, though)
- +strike-through+ doesn't work on Vim / GVim
- the non-standard `code' markup is also supported
- =code= and ~verbatim~ are also supported as block-level markup, see below.
Ref: http://orgmode.org/manual/Emphasis-and-monospace.html
------------------------------------------------------------------------------
INSTALLATION AND UPGRADE *orgguide-installation*
Installation can be done with plugin managers, e.g. vim-plug
(https://github.com/junegunn/vim-plug), dein.vim
(https://github.com/Shougo/dein.vim), pathogen.vim
(https://github.com/tpope/vim-pathogen) or if you're using Vim >= 8.0, you
can use the built-in plugin manager.
Add the following to your .vimrc, for *vim-plug* :
>
Plug 'jceb/vim-orgmode'
<
And for *dein.vim* :
>
call dein#add('jceb/vim-orgmode')
<
With pathogen, you need to run the following in your terminal:
>
cd ~/.vim/bundle && \
git clone https://github.com/jceb/vim-orgmode.git
<
With the package feature of Vim 8, it is a bit more involved. Run the
following in your terminal
>
mkdir -p ~/.vim/pack/git-plugins/start
cd ~/.vim/pack/git-plugins/start
git clone https://github.com/jceb/vim-orgmode
<
Then, add this to your ~/.vimrc:
>
packloadall
silent! helptags ALL
<
NOTE: For some functionality vim-orgmode relies on external plugins which
are mentioned in suggested plugins.
------------------------------------------------------------------------------
Suggested plugins~
Universal Text Linking~
(http://www.vim.org/scripts/script.php?script_id=293) general support for
text linking. The hyperlinks feature of vim-orgmode depends on this
plugin.
repeat~
(http://www.vim.org/scripts/script.php?script_id=2136)
Repeat actions that would not be repeatable otherwise. This plugin is
needed when you want to repeat the previous orgmode action.
taglist~
(http://www.vim.org/scripts/script.php?script_id=273)
Display tags for the currently edited file. Vim-orgmode ships with support
for displaying the heading structure and hyperlinks in the taglist plugin.
tagbar~
(http://www.vim.org/scripts/script.php?script_id=3465)
A new approach to displaying tags for the currently edited file.
Vim-orgmode ships with support for displaying the heading structure and
hyperlinks in the tagbar plugin.
speeddating~
(http://www.vim.org/scripts/script.php?script_id=2120)
In-/decrease dates the vim way: C-a and C-x. Dates and times in the
orgmode format can be in-/decreased if this plugins is installed.
Narrow Region~
(http://www.vim.org/scripts/script.php?script_id=3075)
Emulation of Emacs' Narrow Region feature. It might be useful when dealing
with large orgmode files.
pathogen~
(http://www.vim.org/scripts/script.php?script_id=2332)
Easy management of multiple vim plugins.
calendar~
(https://github.com/mattn/calendar-vim)
This plugin will create a calendar window for timestamp insertion.
SyntaxRange~
(http://www.vim.org/scripts/script.php?script_id=4168)
Use proper syntax highlighting for code blocks such as:
>
#+BEGIN_SRC cpp
int i = 1;
#+END_SRC
<
------------------------------------------------------------------------------
Feedback~
If you find problems with vim-orgmode, or if you have questions, remarks,
or ideas about it, please create a ticket on
https://github.com/jceb/vim-orgmode
==============================================================================
DOCUMENT STRUCTURE *orgguide-docstructure*
------------------------------------------------------------------------------
Outlines~
Outlines allow a document to be organized in a hierarchical structure, which
(at least for me) is the best representation of notes and thoughts. An
overview of this structure is achieved by folding (hiding) large parts of
the document to show only the general document structure and the parts
currently being worked on. vim-orgmode greatly simplifies the use of
outlines by compressing the entire show/hide functionality into a single
command, <Plug>OrgToggleFolding, which is bound to the <TAB> key.
------------------------------------------------------------------------------
Headlines~
Headlines define the structure of an outline tree. The headlines in
vim-orgmode start with one or more stars, on the left margin. For example:
>
* Top level headline
** Second level
*** 3rd level
some text
*** 3rd level
more text
* Another top level headline
<
Some people find the many stars too noisy and would prefer an outline
that has whitespace followed by a single star as headline starters.
|g:org_heading_shade_leading_stars| describes a setup to realize this.
Body text under headings is not indented by default, but you can control
this with the |g:org_indent| variable.
------------------------------------------------------------------------------
Text objects~
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|.
------------------------------------------------------------------------------
Visibility cycling~
Outlines make it possible to hide parts of the text in the buffer.
vim-orgmode uses just two commands, bound to <Tab> and <S-Tab> to change the
visibility in the buffer.
<Tab> or *orgguide-Tab* or *orgguide-S-Tab*
<S-Tab> Subtree cycling: Rotate current subtree among the
states
>
,-> FOLDED -> CHILDREN -> SUBTREE --.
'-----------------------------------'
<
When called with the shift key, global cycling is invoked.
<LocalLeader>, or *orgguide-<LocalLeader>,* or *orgguide-<LocalLeader>.*
<LocalLeader>. Global cycling: Rotate the entire buffer among the
states. The same can be achieved by using the
keybindings zm and zr.
>
,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
'--------------------------------------'
<
Vim-orgmode doesn't implement the following functionality, yet.~
When Emacs first visits an org file, the global state is set to
OVERVIEW, i.e. only the top level headlines are visible. This can be
configured through the variable =org-startup-folded=, or on a per-file
basis by adding a startup keyword =overview=, =content=, =showall=, like
this:
>
#+STARTUP: content
<
------------------------------------------------------------------------------
Motion~
*orgguide-motion*
The following commands jump to other headlines in the buffer.
} Next heading.
{ Previous heading.
]] Next heading same level.
[[ Previous heading same level.
g{ Backward to higher level heading.
g} Forward to higher level heading.
------------------------------------------------------------------------------
Structure editing~
*orgguide-S-CR*
<S-CR> Insert new heading with same level as current. If the
cursor is in a plain list item, a new item is created
(see section [[#Plain-lists][Plain lists]]). When this
command is used in the middle of a line, the line is
split and the rest of the line becomes the new
headline.
Not yet implemented in vim-orgmode~
M-S-<CR> Insert new TODO entry with same level as current
heading.
<Tab> or
<S-Tab> In a new entry with no text yet, <Tab> and <S-Tab>
will cycle through reasonable levels.
<< or *orgguide-<<* or *orgguide-CTRL-d*
<C-d> (insert mode) Promote current heading by one level.
>> or *orgguide->>* or *orgguide-CTRL-t*
<C-t> (insert mode) Demote current heading by one level.
*orgguide-<[[*
<[[ Promote the current subtree by one level.
*orgguide->]]*
>]] Demote the current subtree by one level.
*orgguide-m{*
m{ Move heading up (swap with previous/next subtree of
same level).
*orgguide-m}*
m} Move heading down (swap with previous/next subtree of
same level).
*orgguide-m[[*
m[[ Move subtree up (swap with previous/next subtree of
same level).
*orgguide-m]]*
m]] Move subtree down (swap with previous/next subtree of
same level).
Not yet implemented in vim-orgmode~
C-c C-w Refile entry or region to a different location. See
section [[#Refiling-notes][Refiling notes]].
*orgguide-<Leader>nr*
<Leader>nr Narrow buffer to current subtree / widen it again
(only if NarrowRegion plugin is installed)
When there is an active region (Transient Mark mode), promotion and demotion
work on all headlines in the region.
------------------------------------------------------------------------------
Sparse trees~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Plain lists~
*orgguide-plain-list*
Within an entry of the outline tree, hand-formatted lists can provide
additional structure.
They also provide a way to create lists of checkboxes (see section
|orgguide-checkboxes|).
vim-orgmode supports editing such lists, and the exporter (see section
|orgguide-export|) parses and formats them.
vim-orgmode knows ordered lists, unordered lists, and description lists:
- 'Unordered' list items start with ‘-’, ‘+’, or ‘*’ as bullets.
- 'Ordered' list items start with ‘1.’ or ‘1)’.
- 'Description' list use ‘ :: ’ to separate the 'term' from the
description.
Items belonging to the same list must have the same indentation on the
first line. An item ends before the next line that is indented like its
bullet/number, or less. A list ends when all items are closed, or before
two blank lines. An example:
>
** Lord of the Rings
My favorite scenes are (in this order)
1. The attack of the Rohirrim
2. Eowyn's fight with the witch king
+ this was already my favorite scene in the book
+ I really like Miranda Otto.
Important actors in this film are:
- Elijah Wood :: He plays Frodo
- Sean Austin :: He plays Sam, Frodo's friend.
<
------------------------------------------------------------------------------
Footnotes~
Not yet implemented in vim-orgmode~
==============================================================================
TABLES *orgguide-tables*
Not yet implemented in vim-orgmode~
==============================================================================
HYPERLINKS *orgguide-hyperlinks*
NOTE: The |utl| plugin is used for this feature and needs to be installed.
http://www.vim.org/scripts/script.php?script_id=293
Like HTML, vim-orgmode provides links inside a file, external links to other
files, Usenet articles, emails, and much more.
------------------------------------------------------------------------------
Link format~
*orgguide-linkformat*
vim-orgmode will recognize plain URL-like links and activate them as links.
The general link format, however, looks like this:
>
[[link][description]] or alternatively [[link]]
<
If vim was compiled with |+conceal|, vim-orgmode will shorten this format to
just display 'description' or 'link' once the link was completely entered
(that is, if all brackets are present) and you've left insert mode or
you're editing another line.
To edit the invisible ‘link’ part, go into insert mode, or call the
'Insert/edit Link' command by pressing 'gil'.
------------------------------------------------------------------------------
Internal links~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
External links~
|utl| supports links to files and websites. Others can be added by extending
utl (see |utl-smartSamples|). External links are URL-like locators. They
start with a short identifying string followed by a colon. There can be no
space after the colon. Here are some examples:
>
http://www.astro.uva.nl/~dominik on the web
file:/home/dominik/images/jupiter.jpg file, absolute path
/home/dominik/images/jupiter.jpg same as above
<
A link should be enclosed in double brackets and may contain a descriptive
text to be displayed instead of the URL (see section |orgguide-linkformat|),
for example:
>
[[http://www.vim.org/][VIM]]
<
------------------------------------------------------------------------------
Handling links~
vim-orgmode provides methods to create a link in the correct syntax, to
insert it into an org file, and to follow the link.
Not yet implemented in vim-orgmode~
C-c l Store a link to the current location. This is a
/global/ command (you must create the key binding
yourself) which can be used in any buffer to create a
link. The link will be stored for later insertion into
an org buffer (see below).
*orgguide-gil*
gil Insert a link. This prompts for a link to be inserted
into the buffer. You can just type a link, or use
history keys <Up> and <Down> to access stored links.
You will be prompted for the description part of the
link. File name completion is enabled to link to a
local file. In addition vim-orgmode provides the
command :OrgHyperlinkInsert to insert a link from
command line.
gil When the cursor is on an existing link, gil allows you
to edit the link and description parts of the link.
Not yet implemented in vim-orgmode~
C-c C-o or mouse-1 or mouse-2 Open link at point.
Not yet implemented in vim-orgmode~
C-c & Jump back to a recorded position. A position is
recorded by the commands following internal links, and
by C-c %. Using this command several times in direct
succession moves through a ring of previously recorded
positions.
------------------------------------------------------------------------------
Targeted links~
Not yet implemented in vim-orgmode~
==============================================================================
TODO ITEMS *orgguide-todo*
vim-orgmode does not maintain TODO lists as separate documents. Instead, TODO
items are an integral part of the notes file, because TODO items usually come
up while taking notes! With vim-orgmode, simply mark any entry in a tree as
being a TODO item. In this way, information is not duplicated, and the entire
context from which the TODO item emerged is always present.
Of course, this technique for managing TODO items scatters them throughout
your notes file. vim-orgmode compensates for this by providing methods to give
you an overview of all the things that you have to do.
------------------------------------------------------------------------------
Using TODO states~
Any headline becomes a TODO item when it starts with the word ‘TODO’,
for example:
>
*** TODO Write letter to Sam Fortune
<
The most important commands to work with TODO entries are:
<LocalLeader>ct Rotate the TODO state of the current item among. See
|orgguide-tags-settings|for more information.
>
,-> (unmarked) -> TODO -> DONE --.
'--------------------------------'
<
Not yet implemented in vim-orgmode~
The same rotation can also be done “remotely” from the timeline and
agenda buffers with the t command key (see section
|orgguide-agenda-commands|).
<S-right> or <S-left> Select the following/preceding TODO state, similar to
cycling.
Not yet implemented in vim-orgmode~
C-c / t View TODO items in a /sparse tree/ (see section
[[#Sparse-trees][Sparse trees]]). Folds the buffer,
but shows all TODO items and the headings hierarchy
above them.
<LocalLeader>cat Show the global TODO list. This collects the TODO
items from all agenda files (see section
|orgguide-agenda-views|) into a single buffer.
Not yet implemented in vim-orgmode~
S-M-<CR> Insert a new TODO entry below the current one.
------------------------------------------------------------------------------
Multi-state workflows~
You can use TODO keywords to indicate different 'sequential' states in
the process of working on an item, for example:
>
:let g:org_todo_keywords=['TODO', 'FEEDBACK', 'VERIFY', '|', 'DONE', 'DELEGATED']
<
The vertical bar separates the TODO keywords (states that 'need action')
from the DONE states (which need 'no further action'). If you don’t
provide the separator bar, the last state is used as the DONE state.
With this setup, the command <S-Right> will cycle an entry from TODO to
FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED.
Sometimes you may want to use different sets of TODO keywords in
parallel. For example, you may want to have the basic TODO/DONE, but
also a workflow for bug fixing, and a separate state indicating that an
item has been canceled (so it is not DONE, but also does not require
action). Your setup would then look like this:
>
:let g:org_todo_keywords = [['TODO(t)', '|', 'DONE(d)'],
\ ['REPORT(r)', 'BUG(b)', 'KNOWNCAUSE(k)', '|', 'FIXED(f)'],
\ ['CANCELED(c)']]
<
The keywords should all be different, this helps vim-orgmode to keep track
of which subsequence should be used for a given entry. The example also
shows how to define keys for fast access of a particular state, by
adding a letter in parenthesis after each keyword - you will be prompted
for the key after pressing <LocalLeader>d.
*orgguide-<LocalLeader>d*
<LocalLeader>d prompt for fast access of a todo state
Not yet implemented in vim-orgmode~
To define TODO keywords that are valid only in a single file, use the
following text anywhere in the file.
>
#+BEGIN_EXAMPLE
#+TODO: TODO(t) | DONE(d)
#+TODO: REPORT(r) BUG(b) KNOWNCAUSE(k) | FIXED(f)
#+TODO: | CANCELED(c)
#+END_EXAMPLE
<
After changing one of these lines, use C-c C-c with the cursor still in
the line to make the changes known to vim-orgmode.
------------------------------------------------------------------------------
Progress logging~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Priorities~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Breaking tasks down into subtasks~
Not fully implemented in vim-orgmode~
It is often advisable to break down large tasks into smaller, manageable
subtasks. You can do this by creating an outline tree below a TODO item,
with detailed subtasks on the tree. To keep the overview over the
fraction of subtasks that are already completed, insert either ‘[/]’ or
‘[%]’ anywhere in the headline. These cookies will be updated each time
the TODO status of a child changes, or when pressing C-c C-c on the
cookie. For example:
>
* Organize Party [33%]
** TODO Call people [1/2]
*** TODO Peter
*** DONE Sarah
** TODO Buy food
** DONE Talk to neighbor
<
<localleader>c# Update the checkboxes status of current heading. It
also update the heading status too.
------------------------------------------------------------------------------
Checkboxes~
*orgguide-checkboxes*
Every item in a plain list (see section |orgguide-plain-list|)
can be made into a checkbox by starting it with the string ‘[ ]’.
Checkboxes are not included into the global TODO list, so they are often
great to split a task into a number of simple steps. Here is an example
of a checkbox list.
>
* TODO Organize party [1/3]
- [-] call people [1/2]
- [ ] Peter
- [X] Sarah
- [X] order food
- [ ] think about what music to play
<
Checkboxes work hierarchically, so if a checkbox item has children that
are checkboxes, toggling one of the children checkboxes will make the
parent checkbox reflect if none, some, or all of the children are
checked.
The following commands work with checkboxes:
<localleader>cc Toggle checkbox status or (with prefix arg) checkbox
presence at point.
<localleader>cn or
<CR> or <S-CR> Insert a new checkbox below current line.
<localleader>cN or
<C-S-CR> Insert a new checkbox above current line.
==============================================================================
TAGS *orgguide-tags*
An excellent way to implement labels and contexts for cross-correlating
information is to assign 'tags' to headlines. vim-orgmode has extensive
support for tags.
Every headline can contain a list of tags; they occur at the end of the
headline. Tags are normal words containing letters, numbers, ‘_’, and
‘@’. Tags must be preceded and followed by a single colon, e.g.,
‘:work:’. Several tags can be specified, as in ‘:work:urgent:’. Tags
will by default be in bold face with the same color as the headline.
------------------------------------------------------------------------------
Tag inheritance~
*orgguide-tags-inheritance*
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Setting tags~
*orgguide-tags-settings*
Tags can simply be typed into the buffer at the end of a headline. After
a colon, <TAB> offers completion on tags. There is also a special
command for inserting tags:
*orgguide-<LocalLeader>st*
<LocalLeader>st Enter new tags for the current headline. vim-orgmode
will either offer completion or a special single-key
interface for setting tags, see below. After pressing
<CR>, the tags will be inserted and aligned to
'org_tags_column'.
*orgguide-<LocalLeader>ft*
<LocalLeader>ft Find tags in the current file.
vim-orgmode will support tag insertion based on a 'list of tags'. By default
this list is constructed dynamically, containing all tags currently used
in the buffer.
------------------------------------------------------------------------------
Tag searches~
*orgguide-tags-search*
Not yet implemented in vim-orgmode~
==============================================================================
PROPERTIES *orgguide-properties*
Not yet implemented in vim-orgmode~
==============================================================================
DATES AND TIMES *orgguide-dates*
To assist project planning, TODO items can be labeled with a date and/or
a time. The specially formatted string carrying the date and time
information is called a 'timestamp' in vim-orgmode.
------------------------------------------------------------------------------
Timestamps~
A timestamp is a specification of a date (possibly with a time or a range of
times) in a special format, either <2003-09-16 Tue> or <2003-09-16 Tue
09:39> or <2003-09-16 Tue 12:00-12:30>. A timestamp can appear anywhere in
the headline or body of an org tree entry. Its presence causes entries to
be shown on specific dates in the agenda (see section |orgguide-agenda|). We
distinguish:
Plain timestamp; Event; Appointment ~
A simple timestamp just assigns a date/time to an item. This is just like
writing down an appointment or event in a paper agenda.
>
* Meet Peter at the movies <2006-11-01 Wed 19:15>
* Discussion on climate change <2006-11-02 Thu 20:00-22:00>
<
Timestamp with repeater interval ~
Not yet implemented in vim-orgmode~
Diary-style sexp entries ~
Not yet implemented in vim-orgmode~
Time/Date range~
Two timestamps connected by ‘--’ denote a range.
>
** Meeting in Amsterdam
<2004-08-23 Mon>--<2004-08-26 Thu>
<
Inactive timestamp~
Just like a plain timestamp, but with square brackets instead of angular
ones. These timestamps are inactive in the sense that they do 'not'
trigger an entry to show up in the agenda.
>
* Gillian comes late for the fifth time [2006-11-01 Wed]
<
------------------------------------------------------------------------------
Creating timestamps~
For vim-orgmode to recognize timestamps, they need to be in the specific
format. All commands listed below produce timestamps in the correct format.
*orgmode-<LocalLeader>-sa*
<LocalLeader>sa Prompt for a date and insert a corresponding
timestamp.
Not yet implemented in vim-orgmode~
When the cursor is at an existing timestamp in the
buffer, the command is used to modify this timestamp
instead of inserting a new one.
Not yet implemented in vim-orgmode~
When this command is used twice in succession, a time
range is inserted. With a prefix, also add the current
time.
*orgmode-<LocalLeader>si*
<LocalLeader>si Like |orgmode-<LocalLeader>-sa|, but insert an inactive
timestamp that will not cause an agenda entry.
*orgmode-ctrl-a* or *orgmode-ctrl-x*
CTRL-A or CTRL-X Change the item under the cursor in a timestamp.
The cursor can be on a year, month, day, hour or
minute. NOTE: The plugin 'speeddating' should be
installed for this feature.
Not yet implemented in vim-orgmode~
When the timestamp contains a time range like
‘15:30-16:30’, modifying the first time will also
shift the second, shifting the time block with
constant length. To change the length, modify the
second time.
When vim-orgmode prompts for a date/time, it will accept any string
containing some date and/or time information, and intelligently interpret
the string, deriving defaults for unspecified information from the current
date and time.
Example~
If the current date is <2016-06-14 Tue>, entering +3 at the prompt will
insert the date <2016-06-17 Fri>, entering sat will insert date
<2016-06-18 Sat>
You can also select a date in the pop-up calendar.
NOTE: The plugin 'calendar' should be installed for this feature.
*orgmode-<LocalLeader>pa*
<LocalLeader>pa Open a calendar and prompt a user selected date, then
insert a corresponding timestamp.
*orgmode-<LocalLeader>pi*
<LocalLeader>pi Like |orgmode-<LocalLeader>-pa|, but insert an inactive
timestamp that will not cause an agenda entry.
------------------------------------------------------------------------------
Deadlines and scheduling~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Clocking work time~
Not yet implemented in vim-orgmode~
==============================================================================
CAPTURE - REFILE - ARCHIVE *orgguide-capture*
Not yet implemented in vim-orgmode~
==============================================================================
AGENDA VIEWS *orgguide-agenda*
Due to the way vim-orgmode works, TODO items, time-stamped items, and tagged
headlines can be scattered throughout a file or even a number of files. To get
an overview of open action items, or of events that are important for a
particular date, this information must be collected, sorted and displayed in
an organized way. There are several different views, see below.
The extracted information is displayed in a special agenda buffer. This
buffer is read-only.
Not yet implemented in vim-orgmode~
... but provides commands to visit the corresponding locations in the original
org files, and even to edit these files remotely. Remote editing from the
agenda buffer means, for example, that you can change the dates of deadlines
and appointments from the agenda buffer. The commands available in the Agenda
buffer are listed in |orgguide-agenda-commands|.
- |orgguide-agenda-files| Files being searched for agenda information
- |orgguide-agenda-dispatcher| Keyboard access to agenda views
- |orgguide-agenda-views| What is available out of the box?
- |orgguide-agenda-commands| Remote editing of org trees
- |orgguide-agenda-custom| Defining special searches and views
------------------------------------------------------------------------------
Agenda files~
*g:org_agenda_files* *orgguide-agenda-files*
Default: []
The information to be shown is normally collected from all 'agendafiles',
the files listed in the variable g:org_agenda_files.
You can change the list of agenda files like this:
>
let g:org_agenda_files = ['~/org/index.org', '~/org/project.org']
<
Also globbing is allowed. This makes it easy to use ALL *.org files in a
folder. Using all *.org files in ~/org/ is done like this:
>
let g:org_agenda_files = ['~/org/*.org']
<
WARNING: This might be slow if you have a lot of org files.
------------------------------------------------------------------------------
The agenda dispatcher ~
*orgguide-agenda-dispatcher*
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
The built-in agenda views ~
*orgguide-agenda-views*
The weekly/daily agenda~
The purpose of the weekly/daily 'agenda' is to act like a page of a
paper agenda, showing all the tasks for the current week or day.
*orgguide-<LocalLeader>caa*
<LocalLeader>caa Compile an agenda for the current week from a list of
org files. The agenda shows the entries for each day.
The global TODO list~
The global TODO list contains all unfinished TODO items formatted and
collected into a single place.
Not yet implemented in vim-orgmode~
Remote editing of TODO items lets you change the state of a TODO entry
with a single key press. The commands available in the TODO list are
described in |agenda-commands|
*orgguide-<LocalLeader>cat*
<LocalLeader>cat Show the global TODO list. This collects the TODO
items from all agenda files into a single buffer.
Not yet implemented in vim-orgmode~
*orgguide-<LocalLeader>caT*
<LocalLeader>caT Like the above, but allows selection of a specific
TODO keyword.
Matching tags and properties~
Not yet implemented in vim-orgmode~
Timeline for a single file~
The timeline summarizes all time-stamped items from a single vim-orgmode
file in a /time-sorted view/. The main purpose of this command is to
give an overview over events in a project.
*orgguide-<LocalLeader>caL*
<LocalLeader>caL Show a time-sorted view of the vim-orgmode, with all
time-stamped items.
Search view~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Commands in the agenda buffer~
*orgguide-agenda-commands*
Entries in the agenda buffer are linked back to the org file where they
originate. Commands are provided to show and jump to the
original entry location, and to edit the org files “remotely” from the
agenda buffer.
Not yet implemented in vim-orgmode~
only partly implemented
Motion~
Not yet implemented in vim-orgmode~
View/Go to org file~
*orgguide-agenda-Tab*
<Tab> Go to the original location of the item in an
alternative window.
*orgguide-agenda-CR*
<CR> Go to the original location of the item and stay in
the same/the agenda window.
*orgguide-agenda-S-CR*
<S-CR> Go to the original location of the item in a new split
window.
Not yet implemented in vim-orgmode~
Change display~
Not yet implemented in vim-orgmode~
------------------------------------------------------------------------------
Custom agenda views~
*orgguide-agenda-custom*
Not yet implemented in vim-orgmode~
==============================================================================
EXPORTING *orgguide-export*
NOTE: vim-orgmode relies on Emacs for this feature. Emacs _and_ Emacs'
org-mode need to be installed! For PDF export a Latex environment
is needed as well!
vim-orgmode documents can be exported into a variety of other formats:
ASCII export for inclusion into emails, HTML to publish on the web,
LaTeX/PDF for beautiful printed documents and DocBook to enter the world
of many other formats using DocBook tools. There is also export to
iCalendar format so that planning information can be incorporated into
desktop calendars.
Currently, the export to pdf, html, latex and markdown is supported via the
following commands and the 'export' menu:
>
:OrgExportToPDF
:OrgExportToBeamerPDF
:OrgExportToHTML
:OrgExportToLaTeX
:OrgExportToMarkdown
<
Make sure that you have configured your emacs accordingly, as for instance
the markdown exporter is not loaded by default. To load it, add
>
(eval-after-load "org"
'(require 'ox-md nil t))
<
to your init.el. Make also sure to specify your path by using the
|g:org_export_init_script| option.
*g:org_export_emacs*
Default: "/usr/bin/emacs"
Path to Emacs executable. Example:
>
:let g:org_export_emacs="~/bin/emacs"
<
*g:org_export_verbose*
Default: 0
If set, Emacs' export output is displayed.
>
:let g:org_export_verbose=1
<
*g:org_export_init_script*
Default: ""
For the export via Emacs a separate configuration file can be sourced to
determine Emacs' export behavior. Examples:
Source the ~/.emacs configuration file:
>
:let g:org_export_init_script="~/.emacs"
<
Or source a different file:
>
:let g:org_export_init_script="~/.emacs_org_init"
<
==============================================================================
PUBLISHING *orgguide-publishing*
Not yet implemented in vim-orgmode~
==============================================================================
WORKING WITH SOURCE CODE *orgguide-source*
Not yet implemented in vim-orgmode~
==============================================================================
MISCELLANEOUS *orgguide-misc*
Not yet implemented in vim-orgmode~
==============================================================================
MOBILEORG *orgguide-mobileorg*
Not yet implemented in vim-orgmode~
==============================================================================
CUSTOMIZATION *orgguide-customization*
------------------------------------------------------------------------------
Remapping shortcuts~
vim-orgmode provides an easy way for remapping the default keyboard
shortcuts. For this task it relies on vim's <Plug> mappings. All shortcuts
of vim-orgmode are accessible by <Plug>s.
To change a keyboard shortcut the name of the related <Plug> is needed.
First we need to look up the current mapping in the Org menu. The following
command reveals the <Plug>'s name:
>
:map <current_mapping>
<
The result should look something like this:
>
:map ,t
n ,t @<Plug>OrgSetTags
<
Now we can create an alternate mapping:
>
nmap <new_mapping> <the_plug>
<
To change the mapping for editing tags to <leader>t the vimrc entry would
look like this:
>
nmap <leader>t @<Plug>OrgSetTags
<
------------------------------------------------------------------------------
Alternate behavior~
vim-orgmode provides some variables for users to customize certain behaviors
of their orgmode if so desired.
*g:org_prefer_insert_mode*
Default: 1
Defines if vim-orgmode will automatically jump into Insert Mode after a new
heading/checkbox/plainlist instance is created through keyboard bindings. If
value is set to 0, orgmode will retain it's original mode.
Example:
>
let org_prefer_insert_mode = 1
<
------------------------------------------------------------------------------
syntax highlighting and indentation~
Syntax highlighting is customizable to fit nicely with the user's
colorscheme.
*g:org_aggressive_conceal*
Default: 0
Defines if format indicating characters for inline markups(bold, italic,
inline code, verbatims, in-file hyper-link, etc.) are displayed. Format
indicating characters will be concealed if value is `1`, rendering a much
cleaner view. However, since this feature is newly introduced(<2016-04-08>)
and still need further testing. It is inactive by default. Example:
>
let g:org_aggressive_conceal = 0
<
*g:org_heading_highlight_colors*
Default: ['Title', 'Constant', 'Identifier', 'Statement', 'PreProc', 'Type',
\ 'Special']
Define the highlighting colors/group names for headings. Example:
>
let g:org_heading_highlight_colors = ['Title', 'Constant', 'Identifier',
\ 'Statement', 'PreProc', 'Type', 'Special']
<
*g:org_heading_highlight_levels*
Default: len(g:org_heading_highlight_colors)
Define the number of levels of highlighting. If this number is bigger than
the list of colors defined in of g:org_heading_highlight_colors the colors
of g:org_heading_highlight_colors get repeated. Example:
>
let g:org_heading_highlight_levels = len(g:org_heading_highlight_colors)
<
*g:org_heading_shade_leading_stars*
Default: 1
Defines if leading stars are displayed in the color of the heading or if a
special NonText highlighting is used that hides them from user. Example:
>
let g:org_heading_shade_leading_stars = 1
<
*g:org_todo_keywords*
Default: ['TODO', '|', 'DONE']
Defines the keywords that are highlighted in headings. For more information
about this variable, please consult the org-mode documentation
(http://orgmode.org/org.html#index-org_002dtodo_002dkeywords-511). Example:
>
let g:org_todo_keywords = ['TODO', '|', 'DONE']
<
*g:org_todo_keyword_faces*
Default: []
Defines special faces (styles) for displaying g:org_todo_keywords. Please
refer to vim documentation (topic |attr-list|) for allowed values for
:weight, :slant, :decoration. Muliple colors can be separated by comma for
:foreground and :background faces to provide different colors for GUI and
terminal mode. Example:
>
let g:org_todo_keyword_faces = []
<
*g:org_indent*
Default: 0
Defines if body text is indented. By default, text is not indented according
to heading level (heading.level + 1). You can enable it by setting:
>
let g:org_indent = 1
<
Syntax Highlighting Examples~
Define an additionally keyword 'WAITING' and set the foreground color to
'cyan'. Define another keyword 'CANCELED' and set the foreground color to
red, background to black and the weight to normal, slant to italc and
decoration to underline:
>
let g:org_todo_keywords = [['TODO', 'WAITING', '|', 'DONE'],
\ ['|', 'CANCELED']]
let g:org_todo_keyword_faces = [['WAITING', 'cyan'], ['CANCELED',
\ [':foreground red', ':background black', ':weight bold',
\ ':slant italic', ':decoration underline']]]
<
==============================================================================
DEVELOPMENT *orgguide-development*
The development of vim-orgmode is coordinated via github:
https://github.com/jceb/vim-orgmode
If you like this project, have questions, suggestions or problems, simply drop
us a line and open an issue. Patches are very welcome!
Here is a quick start about the vim-orgmode development.
------------------------------------------------------------------------------
Structure and Source Code~
The majority of the source code is stored in folder ftplugin/orgmode. This
is where the actual functionality of the plugin is located.
I choose to implement vim-orgmode mainly in Python. I hope this will ease
the implementation especially with the functionality of the Python standard
library at hand.
Right below the directory ftplugin/orgmode the basic implementation of
vim-orgmode is found. This basic functionality provides everything for
higher level implementations that modify the buffer, provide a menu and
keybindings to the user and everything else that is needed.
Below the directory ftplugin/orgmode/plugins the plugins are located. Every
plugin must provide a class equal to its filename with the .py-extension.
An example for a plugin can be found in file
ftplugin/orgmode/plugins/Example.py.
*g:org_plugins*
Default: ['ShowHide', '|', 'Navigator', 'EditStructure', '|', 'Hyperlinks',
\ '|', 'Todo', 'TagsProperties', 'Date', 'Agenda', 'Misc', '|',
\ 'Export']
Every plugin must be enabled by the user by setting the g:org_plugins
variable. By default all shipped plugins are enabled. Example:
>
let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure']
<
Files and folders~
.
├── debian - files needed for building a Debian package
├── doc - vim documentation
├── documentation - development documentation
├── examples - example of aplugin
├── ftdetect - Filetype detection for orgmode files
├── ftplugin - Home of the main part of vim-orgmode
│ └── orgmode - Home for all Python code
│ ├── liborgmode - vim unrelated part of vim-orgmde. Contains
│ │ basic data structures and algorithms to
│ │ parse and edit orgfiles.
│ └── plugins - Home for all orgmode plugins
├── indent - Indentation for orgmode files
├── syntax - Syntax highlighting
├── tests - Tests to verify the consistency and
│ correctness of orgmode and the plugins
├── build_vmb.vim - Build file for creating a Vimball
├── install-vmb.vim - Local installation of vmb via make target
├── LICENSE - License Information
├── README.org - README :)
└── Makefile - make commands
------------------------------------------------------------------------------
Writing a plugin~
To write a plugin:
1. copy file ftplugin/orgmode/plugins/Example.py to
ftplugin/orgmode/plugins/YourPlugin.py
2. Change class name to "YourPlugin"
3. Set the menu name, it doesn't need to match the filename anymore, e.g.
"Your Plugin"
4. Prepare keybindings in function register by defining a proper action and
a key this action should be mapped to. For further information refer to
section Keybindings.
5. Register your plugin:
>
let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure',
\ 'YourPlugin']
<
6. Write unittests and implement YourPlugin.
------------------------------------------------------------------------------
Keybindings~
Keybindings alias mappings are described very well in the vim
documentation, see |map-modes|. vim-orgmode tries to make it easy for the
developer to register new keybindings, make them customizable and provide
menu entries so that the user can access the functionality like in original
orgmode.
This is done by providing three classes: Keybinding, Plug and ActionEntry
Keybinding~
This is the basic class that encapsulates a single keybinding consisting
of a key/mapping and an action. Several options can be set when creating
the object to specify the mode and all kinds of other things.
If a Plug is given instead of an action string the Plug is bound to the
key. All relevant data is read from the Plug, e.g. name, mode aso.
Example~
Map g{ to moving to parent heading in normal mode:
>
Keybinding('g{', \
':py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>', \
mode=MODE_NORMAL)
vim -> :nmap g{
\ :py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>
<
Map g{ to moving to parent heading in normal mode by using a Plug:
>
Keybinding('g{', Plug('OrgJumpToParentNormal', \
':py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>'))
vim -> :nnoremap <Plug>OrgJumpToParentNormal :py
\ ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>
vim -> :nmap g{ <Plug>OrgJumpToParentNormal
<
Plug~
A Plug is a unique keybinding that can not be executed by pressing
any key. This makes it a special Keybinding that takes a name and
an action to create an object. A plug normally goes together with a
regular Keybinding to bind the Plug to a key.
This special behavior is needed to ensure that keybindings are
customizable by the user. If the user creates a keybinding to a
Plug the Keybinding object makes sure that the users keybinding is
used and the keybinding specified by the plugin is not used.
Example~
Map g{ to moving to parent heading in normal mode by using a Plug:
>
Keybinding('g{', Plug('OrgJumpToParentNormal', \
':py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>'))
vim -> :nnoremap <Plug>OrgJumpToParentNormal
\ :py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>
vim -> :nmap g{ <Plug>OrgJumpToParentNormal
<
ActionEntry~
An ActionEntry makes Keybindings accessible by the vim menu. It takes a
description and a Keybinding object and builds a menu entry from this. The
resulting object can be added to a Submenu object by using the + operator.
Example~
Map g{ to moving to parent heading in normal mode by using a Plug:
>
k = Keybinding('g{', Plug('OrgJumpToParentNormal', \
':py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>'))
vim -> :nnoremap <Plug>OrgJumpToParentNormal
\ :py ORGMODE.plugins["Navigator"].parent(mode="normal")<CR>
vim -> :nmap g{ <Plug>OrgJumpToParentNormal
menu + ActionEntry('&Up', k)
vim -> :nmenu &Org.&Naviagte Headings.&Up<Tab>g{
\ <Plug>OrgJumpToParentNormal
>
------------------------------------------------------------------------------
Creating Tests Cases~
For every plugin it's important to write automated test cases. This is
important to ensure that little changes don't break things at the other end
of the project.
vim-orgmode relies on Pyunit (http://docs.python.org/library/unittest.html).
All tests are located in the tests directory. Run
>
make test
<
to run all tests. To create a new test the test should be added to the
corresponding test file.
In case a new plugin is created a new test file needs to be created as well.
The test needs to be added to the test suite located in the file
tests/run_tests.py.
Finally the
>
make coverage
<
should be run. The result shows the test coverage of all project files. One
hundred percent (100%) is of course the goal :-)
==============================================================================
LINKS *orgguide-links*
- Original org-mode for Emacs (http://orgmode.org)
- VimOrganizer, another vim port of Emacs org-mode
(http://www.vim.org/scripts/script.php?script_id=3342)
==============================================================================
CHANGELOG *orgguide-changelog*
Is found in file CHANGELOG.org
==============================================================================
CONTRIBUTORS *orgguide-contributors*
Thanks to all how contributed to vim-orgmode. All contributors are name here
in alphabetic order:
- Stefan Otte
- Aleksandar Dimitrov
==============================================================================
LICENSE VIM-ORGMODE *orgguide-license*
Copyright (C) 2010, 2011 Jan Christoph Ebersbach
http://www.e-jc.de/
All rights reserved.
The source code of this program is made available under the terms of the GNU
Affero General Public License version 3 (GNU AGPL V3) as published by the Free
Software Foundation.
Binary versions of this program provided by Univention to you as well as other
copyrighted, protected or trademarked materials like Logos, graphics, fonts,
specific documentations and configurations, cryptographic keys etc. are
subject to a license agreement between you and Univention and not subject to
the GNU AGPL V3.
In the case you use this program under the terms of the GNU AGPL V3, the
program is provided in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
You should have received a copy of the GNU Affero General Public License with
the Debian GNU/Linux or Univention distribution in file
/usr/share/common-licenses/AGPL-3; if not, see <http://www.gnu.org/licenses/>.
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:
================================================
FILE: examples/mylife.org
================================================
* My Life in plain text
- [X] birth
- [-] life [50%]
- [X] use vim
- [ ] get everything else done
* Write minutes of last meeting <2014-08-08 Fri> :work:
** DONE John said
this
** TODO Mary said
that
** WAITING What did Mark say?
[[http://example.com/here/is/the/recording][1st recording]]
[[http://example.com/here/is/the/recording][2nd recording]]
* Some folding headline 1 :one:
** Folded
*** Even more folded
* Some folding headline 2
** Folded :two:
*** Even more folded
* Some folding headline 3
** Folded
*** Even more folded :three:
* Some folding headline 4
** Folded
*** Even more folded
completely unfolded
================================================
FILE: examples/plugins/PluginExample.py
================================================
# -*- coding: utf-8 -*-
from orgmode import echo, echom, echoe, ORGMODE, apply_count, repeat
from orgmode.menu import Submenu, Separator, ActionEntry
from orgmode.keybinding import Keybinding, Plug, Command
import vim
class Example(object):
u"""
Example plugin.
TODO: Extend this doc!
"""
def __init__(self):
u""" Initialize plugin """
object.__init__(self)
# menu entries this plugin should create
self.menu = ORGMODE.orgmenu + Submenu(u'Example')
# key bindings for this plugin
# key bindings are also registered through the menu so only additional
# bindings should be put in this variable
self.keybindings = []
# commands for this plugin
self.commands = []
@classmethod
def action(cls):
u"""
Some kind of action.
:returns: TODO
"""
pass
def register(self):
u"""
Registration of the plugin.
Key bindings and other initialization should be done here.
"""
# an Action menu entry which binds "keybinding" to action ":action"
self.commands.append(Command(u'OrgActionCommand',
u':py ORGMODE.plugins["Example"].action()'))
self.keybindings.append(Keybinding(u'keybinding',
Plug(u'OrgAction', self.commands[-1])))
self.menu + ActionEntry(u'&Action', self.keybindings[-1])
================================================
FILE: ftdetect/org.vim
================================================
autocmd BufNewFile,BufRead *.org setfiletype org
"autocmd BufNewFile,BufReadPost org:todo* setfiletype orgtodo
================================================
FILE: ftplugin/org.cnf
================================================
--langdef=org
--langmap=org:.org
--regex-org=/^(\*+)[[:space:]]+(.*)([[:space:]]+:[^\t ]*:)?$/\1 \2/s,sections/
--regex-org=/\[\[([^][]+)\]\]/\1/h,hyperlinks/
--regex-org=/\[\[[^][]+\]\[([^][]+)\]\]/\1/h,hyperlinks/
================================================
FILE: ftplugin/org.vim
================================================
" org.vim -- Text outlining and task management for Vim based on Emacs' Org-Mode
" @Author : Jan Christoph Ebersbach (jceb@e-jc.de)
" @License : AGPL3 (see http://www.gnu.org/licenses/agpl.txt)
" @Created : 2010-10-03
" @Last Modified: Tue 13. Sep 2011 20:52:57 +0200 CEST
" @Revision : 0.4
" vi: ft=vim:tw=80:sw=4:ts=4:fdm=marker
if v:version > 702
if has('python3')
let s:py_version = 'python3 '
let s:py_env = 'python3 << EOF'
elseif has('python')
let s:py_version = 'python '
let s:py_env = 'python << EOF'
else
echoerr "Unable to start orgmode. Orgmode depends on Vim >= 7.3 with Python support complied in."
finish
endif
else
echoerr "Unable to start orgmode. Orgmode depends on Vim >= 7.3 with Python support complied in."
finish
endif
" Init buffer for file {{{1
if ! exists('b:did_ftplugin')
" default emacs settings
setlocal comments=fb:*,b:#,fb:-
setlocal commentstring=#\ %s
setlocal conceallevel=2 concealcursor=nc
" original emacs settings are: setlocal tabstop=6 shiftwidth=6, but because
" of checkbox indentation the following settings are used:
setlocal tabstop=6 shiftwidth=6
if exists('g:org_tag_column')
exe 'setlocal textwidth='.g:org_tag_column
else
setlocal textwidth=77
endif
" expand tab for counting level of checkbox
setlocal expandtab
" enable % for angle brackets < >
setlocal matchpairs+=<:>
" register keybindings if they don't have been registered before
if exists("g:loaded_org")
exe s:py_version . 'ORGMODE.register_keybindings()'
endif
endif
" Load orgmode just once {{{1
if &cp || exists("g:loaded_org")
finish
endif
let g:loaded_org = 1
" Default org plugins that will be loaded (in the given order) {{{2
if ! exists('g:org_plugins') && ! exists('b:org_plugins')
let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure', 'EditCheckbox', '|', 'Hyperlinks', '|', 'Todo', 'TagsProperties', 'Date', 'Agenda', 'Misc', '|', 'Export']
endif
" Default org plugin settings {{{2
" What does this do?
if ! exists('g:org_syntax_highlight_leading_stars') && ! exists('b:org_syntax_highlight_leading_stars')
let g:org_syntax_highlight_leading_stars = 1
endif
" setting to conceal aggressively
if ! exists('g:org_aggressive_conceal') && ! exists('b:org_aggressive_conceal')
let g:org_aggressive_conceal = 0
endif
" Defined in separate plugins
" Adding Behavior preference:
" 1: go into insert-mode when new heading/checkbox/plainlist added
" 0: retain original mode when new heading/checkbox/plainlist added
if ! exists('g:org_prefer_insert_mode') && ! exists('b:org_prefer_insert_mode')
let g:org_prefer_insert_mode = 1
endif
" Menu and document handling {{{1
function! <SID>OrgRegisterMenu()
exe s:py_version . 'ORGMODE.register_menu()'
endfunction
function! <SID>OrgUnregisterMenu()
exe s:py_version . 'ORGMODE.unregister_menu()'
endfunction
function! <SID>OrgDeleteUnusedDocument(bufnr)
exe s:py_env
b = int(vim.eval('a:bufnr'))
if b in ORGMODE._documents:
del ORGMODE._documents[b]
EOF
endfunction
" show and hide Org menu depending on the filetype
augroup orgmode
au BufEnter * :if &filetype == "org" | call <SID>OrgRegisterMenu() | endif
au BufLeave * :if &filetype == "org" | call <SID>OrgUnregisterMenu() | endif
au BufDelete * :call <SID>OrgDeleteUnusedDocument(expand('<abuf>'))
augroup END
" Start orgmode {{{1
" Expand our path
exec s:py_env
import glob, vim, os, sys
for p in vim.eval("&runtimepath").split(','):
dname = os.path.join(p, "ftplugin")
matches = glob.glob(dname)
for match in matches:
if os.path.exists(os.path.join(match, "orgmode")):
if match not in sys.path:
sys.path.append(match)
break
from orgmode._vim import ORGMODE, insert_at_cursor, get_user_input, date_to_str
ORGMODE.start()
import datetime
EOF
" 3rd Party Plugin Integration {{{1
" * Repeat {{{2
try
call repeat#set()
catch
endtry
" * Tagbar {{{2
let g:tagbar_type_org = {
\ 'ctagstype' : 'org',
\ 'kinds' : [
\ 's:sections',
\ 'h:hyperlinks',
\ ],
\ 'sort' : 0,
\ 'deffile' : expand('<sfile>:p:h') . '/org.cnf'
\ }
" * Taglist {{{2
if exists('g:Tlist_Ctags_Cmd')
" Pass parameters to taglist
let g:tlist_org_settings = 'org;s:section;h:hyperlinks'
let g:Tlist_Ctags_Cmd .= ' --options=' . expand('<sfile>:p:h') . '/org.cnf '
endif
" * Calendar.vim {{{2
fun CalendarAction(day, month, year, week, dir)
exe s:py_version . "selected_date = " . printf("datetime.date(%d, %d, %d)", a:year, a:month, a:day)
exe s:py_version . "org_timestamp = '" . g:org_timestamp_template . "' % date_to_str(selected_date)"
" get_user_input
exe s:py_version . "modifier = get_user_input(org_timestamp)"
" change date according to user input
exe s:py_version . "newdate = Date._modify_time(selected_date, modifier)"
exe s:py_version . "newdate = date_to_str(newdate)"
" close Calendar
exe "q"
" goto previous window
exe "wincmd p"
exe s:py_version . "timestamp = '" . g:org_timestamp_template . "' % newdate"
exe s:py_version . "if modifier != None: insert_at_cursor(timestamp)"
" restore calendar_action
let g:calendar_action = g:org_calendar_action_backup
endf
================================================
FILE: ftplugin/orgmode/__init__.py
================================================
# -*- coding: utf-8 -*-
================================================
FILE: ftplugin/orgmode/_vim.py
================================================
# -*- coding: utf-8 -*-
"""
VIM ORGMODE
~~~~~~~~~~~~
TODO
"""
try:
import importlib
USE_DEPRECATED_IMP=False
except:
import imp
USE_DEPRECATED_IMP=True
import re
import sys
import vim
from datetime import datetime
import orgmode.keybinding
import orgmode.menu
import orgmode.plugins
import orgmode.settings
from orgmode.exceptions import PluginError
from orgmode.vimbuffer import VimBuffer
from orgmode.liborgmode.agenda import AgendaManager
REPEAT_EXISTS = bool(int(vim.eval('exists("*repeat#set()")')))
TAGSPROPERTIES_EXISTS = False
cache_heading = None
from orgmode.py3compat.unicode_compatibility import *
from orgmode.py3compat.encode_compatibility import *
def realign_tags(f):
u"""
Update tag alignment, dependency to TagsProperties plugin!
"""
def r(*args, **kwargs):
global TAGSPROPERTIES_EXISTS
res = f(*args, **kwargs)
if not TAGSPROPERTIES_EXISTS and u'TagsProperties' in ORGMODE.plugins:
TAGSPROPERTIES_EXISTS = True
if TAGSPROPERTIES_EXISTS:
ORGMODE.plugins[u'TagsProperties'].realign_tags()
return res
return r
def repeat(f):
u"""
Integrate with the repeat plugin if available
The decorated function must return the name of the <Plug> command to
execute by the repeat plugin.
"""
def r(*args, **kwargs):
res = f(*args, **kwargs)
if REPEAT_EXISTS and isinstance(res, basestring):
vim.command(u_encode(u'silent! call repeat#set("\\<Plug>%s")' % res))
return res
return r
def apply_count(f):
u"""
Decorator which executes function v:count or v:prevount (not implemented,
yet) times. The decorated function must return a value that evaluates to
True otherwise the function is not repeated.
"""
def r(*args, **kwargs):
count = 0
try:
count = int(vim.eval(u_encode(u'v:count')))
# visual count is not implemented yet
#if not count:
# count = int(vim.eval(u'v:prevcount'.encode(u'utf-8')))
except BaseException as e:
pass
res = f(*args, **kwargs)
count -= 1
while res and count > 0:
f(*args, **kwargs)
count -= 1
return res
return r
def echo(message):
u"""
Print a regular message that will not be visible to the user when
multiple lines are printed
"""
for m in message.split(u'\n'):
vim.command(u_encode(u':echo "%s"' % m))
def echom(message):
u"""
Print a regular message that will be visible to the user, even when
multiple lines are printed
"""
# probably some escaping is needed here
for m in message.split(u'\n'):
vim.command(u_encode(u':echomsg "%s"' % m))
def echoe(message):
u"""
Print an error message. This should only be used for serious errors!
"""
# probably some escaping is needed here
for m in message.split(u'\n'):
vim.command(u_encode(u':echoerr "%s"' % m))
def insert_at_cursor(text, move=True, start_insertmode=False):
u"""Insert text at the position of the cursor.
If move==True move the cursor with the inserted text.
"""
d = ORGMODE.get_document(allow_dirty=True)
line, col = vim.current.window.cursor
_text = d._content[line - 1]
d._content[line - 1] = _text[:col + 1] + text + _text[col + 1:]
if move:
vim.current.window.cursor = (line, col + len(text))
if start_insertmode:
vim.command(u_encode(u'startinsert'))
def get_user_input(message):
u"""Print the message and take input from the user.
Return the input or None if there is no input.
"""
try:
vim.command(u_encode(u'call inputsave()'))
vim.command(u_encode(u"let user_input = input('" + message + u": ')"))
vim.command(u_encode(u'call inputrestore()'))
return u_decode(vim.eval(u_encode(u'user_input')))
except:
return None
def get_bufnumber(bufname):
"""
Return the number of the buffer for the given bufname if it exist;
else None.
"""
for b in vim.buffers:
if b.name == bufname:
return int(b.number)
def get_bufname(bufnr):
"""
Return the name of the buffer for the given bufnr if it exist; else None.
"""
for b in vim.buffers:
if b.number == bufnr:
return b.name
def indent_orgmode():
u""" Set the indent value for the current line in the variable
b:indent_level
Vim prerequisites:
:setlocal indentexpr=Method-which-calls-indent_orgmode
:returns: None
"""
line = int(vim.eval(u_encode(u'v:lnum')))
d = ORGMODE.get_document()
heading = d.current_heading(line - 1)
if heading and line != heading.start_vim:
heading.init_checkboxes()
checkbox = heading.current_checkbox()
level = heading.level + 1
if checkbox:
if line != checkbox.start_vim:
# indent body up to the beginning of the checkbox' text
# if checkbox isn't indented to the proper location, the body
# won't be indented either
level = checkbox.level + len(checkbox.type) + 1 + \
(4 if checkbox.status else 0)
vim.command(u_encode((u'let b:indent_level = %d' % level)))
def fold_text(allow_dirty=False):
u""" Set the fold text
:setlocal foldtext=Method-which-calls-foldtext
:allow_dirty: Perform a query without (re)building the DOM if True
:returns: None
"""
line = int(vim.eval(u_encode(u'v:foldstart')))
d = ORGMODE.get_document(allow_dirty=allow_dirty)
heading = None
if allow_dirty:
heading = d.find_current_heading(line - 1)
else:
heading = d.current_heading(line - 1)
if heading:
str_heading = unicode(heading)
# expand tabs
ts = int(vim.eval(u_encode(u'&ts')))
idx = str_heading.find(u'\t')
if idx != -1:
tabs, spaces = divmod(idx, ts)
str_heading = str_heading.replace(u'\t', u' ' * (ts - spaces), 1)
str_heading = str_heading.replace(u'\t', u' ' * ts)
# Workaround for vim.command seems to break the completion menu
vim.eval(u_encode(u'SetOrgFoldtext("%s...")' % (re.sub(r'\[\[([^[\]]*\]\[)?([^[\]]+)\]\]', r'\2',
str_heading).replace( u'\\', u'\\\\').replace(u'"', u'\\"'), )))
def fold_orgmode(allow_dirty=False):
u""" Set the fold expression/value for the current line in the variable
b:fold_expr
Vim prerequisites:
:setlocal foldmethod=expr
:setlocal foldexpr=Method-which-calls-fold_orgmode
:allow_dirty: Perform a query without (re)building the DOM if True
:returns: None
"""
line = int(vim.eval(u_encode(u'v:lnum')))
d = ORGMODE.get_document(allow_dirty=allow_dirty)
heading = None
if allow_dirty:
heading = d.find_current_heading(line - 1)
else:
heading = d.current_heading(line - 1)
# if cache_heading != heading:
# heading.init_checkboxes()
# checkbox = heading.current_checkbox()
# cache_heading = heading
if heading:
# if checkbox:
# vim.command((u'let b:fold_expr = ">%d"' % heading.level + checkbox.level).encode(u'utf-8'))
if 0:
pass
elif line == heading.start_vim:
vim.command(u_encode(u'let b:fold_expr = ">%d"' % heading.level))
#elif line == heading.end_vim:
# vim.command((u'let b:fold_expr = "<%d"' % heading.level).encode(u'utf-8'))
# end_of_last_child_vim is a performance junky and is actually not needed
#elif line == heading.end_of_last_child_vim:
# vim.command((u'let b:fold_expr = "<%d"' % heading.level).encode(u'utf-8'))
else:
vim.command(u_encode(u'let b:fold_expr = %d' % heading.level))
def date_to_str(date):
if isinstance(date, datetime):
date = date.strftime(u_decode(u_encode(u'%Y-%m-%d %a %H:%M')))
else:
date = date.strftime(u_decode(u_encode(u'%Y-%m-%d %a')))
return date
class OrgMode(object):
u""" Vim Buffer """
def __init__(self):
object.__init__(self)
self.debug = bool(int(orgmode.settings.get(u'org_debug', False)))
self.orgmenu = orgmode.menu.Submenu(u'&Org')
self._plugins = {}
# list of vim buffer objects
self._documents = {}
# agenda manager
self.agenda_manager = AgendaManager()
def get_document(self, bufnr=0, allow_dirty=False):
""" Retrieve instance of vim buffer document. This Document should be
used for manipulating the vim buffer.
:bufnr: Retrieve document with bufnr
:allow_dirty: Allow the retrieved document to be dirty
:returns: vim buffer instance
"""
if bufnr == 0:
bufnr = vim.current.buffer.number
if bufnr in self._documents:
if allow_dirty or self._documents[bufnr].is_insync:
return self._documents[bufnr]
self._documents[bufnr] = VimBuffer(bufnr).init_dom()
return self._documents[bufnr]
@property
def plugins(self):
return self._plugins.copy()
@orgmode.keybinding.register_keybindings
@orgmode.keybinding.register_commands
@orgmode.menu.register_menu
def register_plugin(self, plugin):
if not isinstance(plugin, basestring):
raise ValueError(u'Parameter plugin is not of type string')
if plugin == u'|':
self.orgmenu + orgmode.menu.Separator()
self.orgmenu.children[-1].create()
return
if plugin in self._plugins:
raise PluginError(u'Plugin %s has already been loaded')
# a python module
module = None
# actual plugin class
_class = None
if USE_DEPRECATED_IMP:
# locate module and initialize plugin class
try:
module = imp.find_module(plugin, orgmode.plugins.__path__)
except ImportError as e:
echom(u'Plugin not found: %s' % plugin)
if self.debug:
raise e
return
if not module:
echom(u'Plugin not found: %s' % plugin)
return
try:
if USE_DEPRECATED_IMP:
module = imp.load_module(plugin, *module)
else:
module = importlib.import_module(".plugins." + plugin, "orgmode")
if not hasattr(module, plugin):
echoe(u'Unable to find plugin: %s' % plugin)
if self.debug:
raise PluginError(u'Unable to find class %s' % plugin)
return
_class = getattr(module, plugin)
self._plugins[plugin] = _class()
self._plugins[plugin].register()
if self.debug:
echo(u'Plugin registered: %s' % plugin)
return self._plugins[plugin]
except BaseException as e:
echoe(u'Unable to activate plugin: %s' % plugin)
echoe(u"%s" % e)
if self.debug:
import traceback
echoe(traceback.format_exc())
def register_keybindings(self):
@orgmode.keybinding.register_keybindings
def dummy(plugin):
return plugin
if sys.version_info < (3, ):
for p in self.plugins.itervalues():
dummy(p)
else:
for p in self.plugins.values():
dummy(p)
def register_menu(self):
self.orgmenu.create()
def unregister_menu(self):
vim.command(u_encode(u'silent! aunmenu Org'))
def start(self):
u""" Start orgmode and load all requested plugins
"""
plugins = orgmode.settings.get(u"org_plugins")
if not plugins:
echom(u'orgmode: No plugins registered.')
if isinstance(plugins, basestring):
try:
self.register_plugin(plugins)
except BaseException as e:
import traceback
traceback.print_exc()
elif isinstance(plugins, list) or \
isinstance(plugins, tuple):
for p in plugins:
try:
self.register_plugin(p)
except BaseException as e:
echoe('Error in %s plugin:' % p)
import traceback
traceback.print_exc()
return plugins
ORGMODE = OrgMode()
================================================
FILE: ftplugin/orgmode/docs/Makefile
================================================
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/orgmode.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/orgmode.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/orgmode"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/orgmode"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3:
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."
================================================
FILE: ftplugin/orgmode/docs/conf.py
================================================
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# orgmode documentation build configuration file, created by
# sphinx-quickstart on Sat May 21 15:51:55 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import mock
# Mock vim
MOCK_MODULES = ['vim']
for m in MOCK_MODULES:
sys.modules[m] = mock.Mock()
import vim
vim.eval = mock.MagicMock(return_value=1)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
]
# Napoleon config
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_private_with_doc = True
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'orgmode'
copyright = '2016, Author'
author = 'Author'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = ''
# The full version, including alpha/beta/rc tags.
release = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
html_title = 'orgmode v0.5'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'orgmodedoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'orgmode.tex', 'orgmode Documentation',
'Author', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'orgmode', 'orgmode Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'orgmode', 'orgmode Documentation',
author, 'orgmode', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
#epub_basename = project
# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub
# output is usually not wise. This defaults to 'epub', a theme designed to save
# visual space.
#epub_theme = 'epub'
# The language of the text. It defaults to the language option
# or 'en' if the language is not set.
#epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
#epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#epub_identifier = ''
# A unique identification for the text.
#epub_uid = ''
# A tuple containing the cover image and cover page html template filenames.
#epub_cover = ()
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
#epub_guide = ()
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_post_files = []
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# The depth of the table of contents in toc.ncx.
#epub_tocdepth = 3
# Allow duplicate toc entries.
#epub_tocdup = True
# Choose between 'default' and 'includehidden'.
#epub_tocscope = 'default'
# Fix unsupported image types using the Pillow.
#epub_fix_images = False
# Scale large images.
#epub_max_image_width = 0
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#epub_show_urls = 'inline'
# If false, no index is generated.
#epub_use_index = True
================================================
FILE: ftplugin/orgmode/docs/index.rst
================================================
.. orgmode documentation master file, created by
sphinx-quickstart on Sat May 21 16:35:00 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to orgmode's documentation!
===================================
Contents:
.. toctree::
:maxdepth: 4
orgmode
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
================================================
FILE: ftplugin/orgmode/docs/make.bat
================================================
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. epub3 to make an epub3
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
echo. dummy to check syntax errors of document sources
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\orgmode.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\orgmode.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "epub3" (
%SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub3 file is in %BUILDDIR%/epub3.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
if "%1" == "dummy" (
%SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy
if errorlevel 1 exit /b 1
echo.
echo.Build finished. Dummy builder generates no files.
goto end
)
:end
================================================
FILE: ftplugin/orgmode/docs/orgmode.liborgmode.rst
================================================
orgmode.liborgmode package
==========================
Submodules
----------
orgmode.liborgmode.agenda module
--------------------------------
.. automodule:: orgmode.liborgmode.agenda
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.agendafilter module
--------------------------------------
.. automodule:: orgmode.liborgmode.agendafilter
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.base module
------------------------------
.. automodule:: orgmode.liborgmode.base
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.checkboxes module
------------------------------------
.. automodule:: orgmode.liborgmode.checkboxes
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.documents module
-----------------------------------
.. automodule:: orgmode.liborgmode.documents
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.dom_obj module
---------------------------------
.. automodule:: orgmode.liborgmode.dom_obj
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.headings module
----------------------------------
.. automodule:: orgmode.liborgmode.headings
:members:
:undoc-members:
:show-inheritance:
orgmode.liborgmode.orgdate module
---------------------------------
.. automodule:: orgmode.liborgmode.orgdate
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: orgmode.liborgmode
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: ftplugin/orgmode/docs/orgmode.plugins.rst
================================================
orgmode.plugins package
=======================
Submodules
----------
orgmode.plugins.Agenda module
-----------------------------
.. automodule:: orgmode.plugins.Agenda
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Date module
---------------------------
.. automodule:: orgmode.plugins.Date
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.EditCheckbox module
-----------------------------------
.. automodule:: orgmode.plugins.EditCheckbox
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.EditStructure module
------------------------------------
.. automodule:: orgmode.plugins.EditStructure
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Export module
-----------------------------
.. automodule:: orgmode.plugins.Export
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Hyperlinks module
---------------------------------
.. automodule:: orgmode.plugins.Hyperlinks
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.LoggingWork module
----------------------------------
.. automodule:: orgmode.plugins.LoggingWork
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Misc module
---------------------------
.. automodule:: orgmode.plugins.Misc
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Navigator module
--------------------------------
.. automodule:: orgmode.plugins.Navigator
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.ShowHide module
-------------------------------
.. automodule:: orgmode.plugins.ShowHide
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.TagsProperties module
-------------------------------------
.. automodule:: orgmode.plugins.TagsProperties
:members:
:undoc-members:
:show-inheritance:
orgmode.plugins.Todo module
---------------------------
.. automodule:: orgmode.plugins.Todo
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: orgmode.plugins
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: ftplugin/orgmode/docs/orgmode.py3compat.rst
================================================
orgmode.py3compat package
=========================
Submodules
----------
orgmode.py3compat.encode_compatibility module
---------------------------------------------
.. automodule:: orgmode.py3compat.encode_compatibility
:members:
:undoc-members:
:show-inheritance:
orgmode.py3compat.py_py3_string module
--------------------------------------
.. automodule:: orgmode.py3compat.py_py3_string
:members:
:undoc-members:
:show-inheritance:
orgmode.py3compat.unicode_compatibility module
----------------------------------------------
.. automodule:: orgmode.py3compat.unicode_compatibility
:members:
:undoc-members:
:show-inheritance:
orgmode.py3compat.xrange_compatibility module
---------------------------------------------
.. automodule:: orgmode.py3compat.xrange_compatibility
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: orgmode.py3compat
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: ftplugin/orgmode/docs/orgmode.rst
================================================
orgmode package
===============
Subpackages
-----------
.. toctree::
orgmode.liborgmode
orgmode.plugins
orgmode.py3compat
Submodules
----------
orgmode._vim module
-------------------
.. automodule:: orgmode._vim
:members:
:undoc-members:
:show-inheritance:
orgmode.exceptions module
-------------------------
.. automodule:: orgmode.exceptions
:members:
:undoc-members:
:show-inheritance:
orgmode.keybinding module
-------------------------
.. automodule:: orgmode.keybinding
:members:
:undoc-members:
:show-inheritance:
orgmode.menu module
-------------------
.. automodule:: orgmode.menu
:members:
:undoc-members:
:show-inheritance:
orgmode.settings module
-----------------------
.. automodule:: orgmode.settings
:members:
:undoc-members:
:show-inheritance:
orgmode.vimbuffer module
------------------------
.. automodule:: orgmode.vimbuffer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: orgmode
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: ftplugin/orgmode/exceptions.py
================================================
# -*- coding: utf-8 -*-
class PluginError(BaseException):
def __init__(self, message):
BaseException.__init__(self, message)
class BufferNotFound(BaseException):
def __init__(self, message):
BaseException.__init__(self, message)
class BufferNotInSync(BaseException):
def __init__(self, message):
BaseException.__init__(self, message)
class HeadingDomError(BaseException):
def __init__(self, message):
BaseException.__init__(self, message)
================================================
FILE: ftplugin/orgmode/keybinding.py
================================================
# -*- coding: utf-8 -*-
import vim
MODE_ALL = u'a'
MODE_NORMAL = u'n'
MODE_VISUAL = u'v'
MODE_INSERT = u'i'
MODE_OPERATOR = u'o'
OPTION_BUFFER_ONLY = u'<buffer>'
OPTION_SLIENT = u'<silent>'
from orgmode.py3compat.encode_compatibility import *
def _register(f, name):
def r(*args, **kwargs):
p = f(*args, **kwargs)
if hasattr(p, name) and isinstance(getattr(p, name), list):
for i in getattr(p, name):
i.create()
return p
return r
def register_keybindings(f):
return _register(f, u'keybindings')
def register_commands(f):
return _register(f, u'commands')
class Command(object):
u""" A vim command """
def __init__(self, name, command, arguments=u'0', complete=None, overwrite_exisiting=False):
u"""
:name: The name of command, first character must be uppercase
:command: The actual command that is executed
:arguments: See :h :command-nargs, only the arguments need to be specified
:complete: See :h :command-completion, only the completion arguments need to be specified
"""
object.__init__(self)
self._name = name
self._command = command
self._arguments = arguments
self._complete = complete
self._overwrite_exisiting = overwrite_exisiting
def __unicode__(self):
return u':%s<CR>' % self.name
def __str__(self):
return u_encode(self.__unicode__())
@property
def name(self):
return self._name
@property
def command(self):
return self._command
@property
def arguments(self):
return self._arguments
@property
def complete(self):
return self._complete
@property
def overwrite_exisiting(self):
return self._overwrite_exisiting
def create(self):
u""" Register/create the command
"""
vim.command(u_encode(':command%(overwrite)s -nargs=%(arguments)s %(complete)s %(name)s %(command)s' %
{u'overwrite': '!' if self.overwrite_exisiting else '',
u'arguments': u_encode(self.arguments),
u'complete': '-complete=%s' % u_encode(self.complete) if self.complete else '',
u'name': self.name,
u'command': self.command}
))
class Plug(object):
u""" Represents a <Plug> to an abitrary command """
def __init__(self, name, command, mode=MODE_NORMAL):
u"""
:name: the name of the <Plug> should be ScriptnameCommandname
:command: the actual command
"""
object.__init__(self)
if mode not in (MODE_ALL, MODE_NORMAL, MODE_VISUAL, MODE_INSERT, MODE_OPERATOR):
raise ValueError(u'Parameter mode not in MODE_ALL, MODE_NORMAL, MODE_VISUAL, MODE_INSERT, MODE_OPERATOR')
self._mode = mode
self.name = name
self.command = command
self.created = False
def __unicode__(self):
return u'<Plug>%s' % self.name
def __str__(self):
return u_encode(self.__unicode__())
def create(self):
if not self.created:
self.created = True
cmd = self._mode
if cmd == MODE_ALL:
cmd = u''
vim.command(u_encode(u':%snoremap %s %s' % (cmd, str(self), self.command)))
@property
def mode(self):
return self._mode
class Keybinding(object):
u""" Representation of a single key binding """
def __init__(self, key, action, mode=None, options=None, remap=True, buffer_only=True, silent=True):
u"""
:key: the key(s) action is bound to
:action: the action triggered by key(s)
:mode: definition in which vim modes the key binding is valid. Should be one of MODE_*
:option: list of other options like <silent>, <buffer> ...
:repmap: allow or disallow nested mapping
:buffer_only: define the key binding only for the current buffer
"""
object.__init__(self)
self._key = key
self._action = action
# grab mode from plug if not set otherwise
if isinstance(self._action, Plug) and not mode:
mode = self._action.mode
if mode not in (MODE_ALL, MODE_NORMAL, MODE_VISUAL, MODE_INSERT, MODE_OPERATOR):
raise ValueError(u'Parameter mode not in MODE_ALL, MODE_NORMAL, MODE_VISUAL, MODE_INSERT, MODE_OPERATOR')
self._mode = mode
self._options = options
if self._options is None:
self._options = []
self._remap = remap
self._buffer_only = buffer_only
self._silent = silent
if self._buffer_only and OPTION_BUFFER_ONLY not in self._options:
self._options.append(OPTION_BUFFER_ONLY)
if self._silent and OPTION_SLIENT not in self._options:
self._options.append(OPTION_SLIENT)
@property
def key(self):
return self._key
@property
def action(self):
return str(self._action)
@property
def mode(self):
return self._mode
@property
def options(self):
return self._options[:]
@property
def remap(self):
return self._remap
@property
def buffer_only(self):
return self._buffer_only
@property
def silent(self):
return self._silent
def create(self):
from orgmode._vim import ORGMODE, echom
cmd = self._mode
if cmd == MODE_ALL:
cmd = u''
if not self._remap:
cmd += u'nore'
try:
create_mapping = True
if isinstance(self._action, Plug):
# create plug
self._action.create()
if int(vim.eval(u_encode(u'hasmapto("%s")' % (self._action, )))):
create_mapping = False
if isinstance(self._action, Command):
# create command
self._action.create()
if create_mapping:
vim.command(u_encode(u':%smap %s %s %s' % (cmd, u' '.join(self._options), self._key, self._action)))
except BaseException as e:
if ORGMODE.debug:
echom(u'Failed to register key binding %s %s' % (self._key, self._action))
================================================
FILE: ftplugin/orgmode/liborgmode/__init__.py
================================================
# -*- coding: utf-8 -*-
================================================
FILE: ftplugin/orgmode/liborgmode/agenda.py
================================================
# -*- coding: utf-8 -*-
u"""
Agenda
~~~~~~~~~~~~~~~~~~
The agenda is one of the main concepts of orgmode. It allows to
collect TODO items from multiple org documents in an agenda view.
Features:
* filtering
* sorting
"""
from orgmode.liborgmode.agendafilter import filter_items
from orgmode.liborgmode.agendafilter import is_within_week_and_active_todo
from orgmode.liborgmode.agendafilter import contains_active_todo
from orgmode.liborgmode.agendafilter import contains_active_date
from orgmode.liborgmode.orgdate import OrgDateTime, OrgTimeRange
import datetime
def agenda_sorting_key(heading):
orgtime = heading.active_date
if orgtime is None or isinstance(orgtime, OrgDateTime):
return orgtime
if isinstance(orgtime, OrgTimeRange):
return orgtime.start
# It is an OrgDate. OrgDate cannot be compared with datetime-based Org* values by
# default, so it will be converted in such a way that:
# * OrgDate value of _today_ will be displayed after today's passed events and before
# today's upcoming scheduled events.
# * OrgDate value of a past day will be displayed after all other items of the same
# day.
# * OrgDate value of a future day will be displayed before all other items of the same
# day.
now = datetime.datetime.now()
today = now.date()
time_to_add = now.time() if today == orgtime else datetime.time(0, 0) if today < orgtime else datetime.time(23, 59)
return datetime.datetime.combine(orgtime, time_to_add)
class AgendaManager(object):
u"""Simple parsing of Documents to create an agenda."""
# TODO Move filters in this file, they do the same thing
def __init__(self):
super(AgendaManager, self).__init__()
def get_todo(self, documents):
u"""
Get the todo agenda for the given documents (list of document).
"""
filtered = []
for document in iter(documents):
# filter and return headings
filtered.extend(filter_items(document.all_headings(),
[contains_active_todo]))
return sorted(filtered, key=agenda_sorting_key)
def get_next_week_and_active_todo(self, documents):
u"""
Get the agenda for next week for the given documents (list of
document).
"""
filtered = []
for document in iter(documents):
# filter and return headings
filtered.extend(filter_items(document.all_headings(),
[is_within_week_and_active_todo]))
return sorted(filtered, key=agenda_sorting_key)
def get_timestamped_items(self, documents):
u"""
Get all time-stamped items in a time-sorted way for the given
documents (list of document).
"""
filtered = []
for document in iter(documents):
# filter and return headings
filtered.extend(filter_items(document.all_headings(),
[contains_active_date]))
return sorted(filtered, key=agenda_sorting_key)
================================================
FILE: ftplugin/orgmode/liborgmode/agendafilter.py
================================================
# -*- coding: utf-8 -*-
u"""
agendafilter
~~~~~~~~~~~~~~~~
AgendaFilter contains all the filters that can be applied to create the
agenda.
All functions except filter_items() in the module are filters. Given a
heading they return if the heading meets the criteria of the filter.
The function filter_items() can combine different filters and only returns
the filtered headings.
"""
from datetime import datetime
from datetime import timedelta
try:
from itertools import ifilter as filter
except:
pass
def filter_items(headings, filters):
u""" Filter the given headings.
Args:
headings (list): Contains headings
filters (list): Filters that will be applied. All functions in
this module (except this function) are filters.
Returns:
filter iterator: Headings which were not filtered.
Examples:
>>> filtered = filter_items(headings, [contains_active_date,
contains_active_todo])
"""
filtered = headings
for f in filters:
filtered = filter(f, filtered)
return filtered
def is_within_week(heading):
u""" Test if headings date is within a week
Returns:
bool: True if the date in the deading is within a week in the future (or
older False otherwise.
"""
if contains_active_date(heading):
next_week = datetime.today() + timedelta(days=7)
if heading.active_date < next_week:
return True
def is_within_week_and_active_todo(heading):
u"""
Returns:
bool: True if heading contains an active TODO and the date is within a
week.
"""
return is_within_week(heading) and contains_active_todo(heading)
def contains_active_todo(heading):
u"""
Returns:
bool: True if heading contains an active TODO.
"""
# TODO make this more efficient by checking some val and not calling the
# function
# TODO why is this import failing at top level? circular dependency...
from orgmode._vim import ORGMODE
active = []
for act in ORGMODE.get_document().get_todo_states():
active.extend(act[0])
return heading.todo in active
def contains_active_date(heading):
u"""
Returns:
bool: True if heading contains an active date.
"""
return not(heading.active_date is None)
================================================
FILE: ftplugin/orgmode/liborgmode/base.py
================================================
# -*- coding: utf-8 -*-
"""
base
~~~~~~~~~~
Here are some really basic data structures that are used throughout
the liborgmode.
"""
try:
from collections import UserList
except:
from UserList import UserList
try:
from collections.abc import Iterable
except ImportError:
# preserve compatibility with python < 3.10
from collections import Iterable
import sys
from orgmode.py3compat.unicode_compatibility import *
def flatten_list(lst):
""" Flattens a list
Args:
lst (iterable): An iterable that will is non-flat
Returns:
list: Flat list
"""
# TODO write tests
def gen_lst(item):
if isinstance(item, basestring) or isinstance(item, bytes):
yield item
elif isinstance(item, Iterable):
# yield from would be so nice... but c'est la vie
for val in item:
for final in gen_lst(val):
yield final
else:
yield item
return [i for i in gen_lst(lst)]
class Direction():
u"""
Direction is used to indicate the direction of certain actions.
Example: it defines the direction headings get parted in.
"""
FORWARD = 1
BACKWARD = 2
class MultiPurposeList(UserList):
u"""
A Multi Purpose List is a list that calls a user defined hook on
change. The implementation is very basic - the hook is called without any
parameters. Otherwise the Multi Purpose List can be used like any other
list.
The member element "data" can be used to fill the list without causing the
list to be marked dirty. This should only be used during initialization!
"""
def __init__(self, initlist=None, on_change=None):
UserList.__init__(self, initlist)
self._on_change = on_change
def _changed(self):
u""" Call hook """
if callable(self._on_change):
self._on_change()
def __setitem__(self, i, item):
if sys.version_info < (3, ) and isinstance(i, slice):
start, stop, _ = i.indices(len(self))
UserList.__setslice__(self, start, stop, item)
else:
UserList.__setitem__(self, i, item)
self._changed()
def __delitem__(self, i):
if sys.version_info < (3, ) and isinstance(i, slice):
start, stop, _ = i.indices(len(self))
UserList.__delslice__(self, start, stop)
else:
UserList.__delitem__(self, i)
self._changed()
def __getitem__(self, i):
if sys.version_info < (3, ):
if isinstance(i, slice):
# TODO Return just a list. Why?
return [self[i] for i in range(*i.indices(len(self)))]
# return UserList([self[i] for i in range(*i.indices(len(self)))])
return UserList.__getitem__(self, i)
# NOTE: These wrappers are necessary because of python 2
def __setslice__(self, i, j, other):
self.__setitem__(slice(i, j), other)
def __delslice__(self, i, j):
self.__delitem__(slice(i, j))
def __getslice__(self, i, j):
return self.__getitem__(slice(i, j))
def __iadd__(self, other):
res = UserList.__iadd__(self, other)
self._changed()
return res
def __imul__(self, n):
res = UserList.__imul__(self, n)
self._changed()
return res
def append(self, item):
UserList.append(self, item)
self._changed()
def insert(self, i, item):
UserList.insert(self, i, item)
self._changed()
def pop(self, i=-1):
item = self[i]
del self[i]
return item
def remove(self, item):
self.__delitem__(self.index(item))
def reverse(self):
UserList.reverse(self)
self._changed()
def sort(self, *args, **kwds):
UserList.sort(self, *args, **kwds)
self._changed()
def extend(self, other):
UserList.extend(self, other)
self._changed()
def get_domobj_range(content=[], position=0, direction=Direction.FORWARD, identify_fun=None):
u"""
Get the start and end line number of the dom obj lines from content.
:content: String to be recognized dom obj
:position: Line number in content
:direction: Search direction
:identify_fun: A identify function to recognize dom obj(Heading, Checkbox) title string.
:return: Start and end line number for the recognized dom obj.
"""
len_cb = len(content)
if position < 0 or position > len_cb:
return (None, None)
tmp_line = position
start = None
end = None
if direction == Direction.FORWARD:
while tmp_line < len_cb:
if identify_fun(content[tmp_line]) is not None:
if start is None:
start = tmp_line
elif end is None:
end = tmp_line - 1
if start is not None and end is not None:
break
tmp_line += 1
else:
while tmp_line >= 0 and tmp_line < len_cb:
if identify_fun(content[tmp_line]) is not None:
if start is None:
start = tmp_line
elif end is None:
end = tmp_line - 1
if start is not None and end is not None:
break
tmp_line -= 1 if start is None else -1
return (start, end)
================================================
FILE: ftplugin/orgmode/liborgmode/checkboxes.py
================================================
# -*- coding: utf-8 -*-
"""
checkboxes
~~~~~~~~~~
TODO: explain this :)
"""
import re
try:
from collections import UserList
except:
from UserList import UserList
import vim
from orgmode.liborgmode.base import MultiPurposeList, flatten_list
from orgmode.liborgmode.orgdate import OrgTimeRange
from orgmode.liborgmode.orgdate import get_orgdate
from orgmode.liborgmode.dom_obj import DomObj, DomObjList, REGEX_SUBTASK, REGEX_SUBTASK_PERCENT, REGEX_HEADING, REGEX_CHECKBOX
from orgmode.py3compat.encode_compatibility import *
from orgmode.py3compat.unicode_compatibility import *
class Checkbox(DomObj):
u""" Structural checkbox object """
STATUS_ON = u'[X]'
STATUS_OFF = u'[ ]'
# intermediate status
STATUS_INT = u'[-]'
def __init__(self, level=1, type=u'-', title=u'', status=u'[ ]', body=None):
u"""
:level: Indent level of the checkbox
:type: Type of the checkbox list (-, +, *)
:title: Title of the checkbox
:status: Status of the checkbox ([ ], [X], [-])
:body: Body of the checkbox
"""
DomObj.__init__(self, level=level, title=title, body=body)
# heading
self._heading = None
self._children = CheckboxList(obj=self)
self._dirty_checkbox = False
# list type
self._type = u'-'
if type:
self.type = type
# status
self._status = Checkbox.STATUS_OFF
if status:
self.status = status
def __unicode__(self):
return u' ' * self.level + self.type + u' ' + \
(self.status + u' ' if self.status else u'') + self.title
def __str__(self):
return u_encode(self.__unicode__())
def __len__(self):
# 1 is for the heading's title
return 1 + len(self.body)
def copy(self, including_children=True, parent=None):
u"""
Create a copy of the current checkbox. The checkbox will be completely
detached and not even belong to a document anymore.
:including_children: If True a copy of all children is create as
well. If False the returned checkbox doesn't
have any children.
:parent: Don't use this parameter. It's set
automatically.
"""
checkbox = self.__class__(
level=self.level, title=self.title,
body=self.body[:])
if parent:
parent.children.append(checkbox)
if including_children and self.children:
for item in self.children:
item.copy(
including_children=including_children,
parent=checkbox)
checkbox._orig_start = self._orig_start
checkbox._orig_len = self._orig_len
checkbox._dirty_heading = self.is_dirty_checkbox
return checkbox
@classmethod
def parse_checkbox_from_data(cls, data, heading=None, orig_start=None):
u""" Construct a new checkbox from the provided data
:data: List of lines
:heading: The heading object this checkbox belongs to
:orig_start: The original start of the heading in case it was read
from a document. If orig_start is provided, the
resulting heading will not be marked dirty.
:returns: The newly created checkbox
"""
def parse_title(heading_line):
# checkbox is not heading
if REGEX_HEADING.match(heading_line) is not None:
return None
m = REGEX_CHECKBOX.match(heading_line)
if m:
r = m.groupdict()
return (len(r[u'level']), r[u'type'], r[u'status'], r[u'title'])
return None
if not data:
raise ValueError(u'Unable to create checkbox, no data provided.')
# create new checkbox
nc = cls()
nc.level, nc.type, nc.status, nc.title = parse_title(data[0])
nc.body = data[1:]
if orig_start is not None:
nc._dirty_heading = False
nc._dirty_body = False
nc._orig_start = orig_start
nc._orig_len = len(nc)
if heading:
nc._heading = heading
return nc
def update_subtasks(self, total=0, on=0):
if total != 0:
percent = (on * 100) / total
else:
percent = 0
count = "%d/%d" % (on, total)
self.title = REGEX_SUBTASK.sub("[%s]" % (count), self.title)
self.title = REGEX_SUBTASK_PERCENT.sub("[%d%%]" % (percent), self.title)
d = self._heading.document.write_checkbox(self, including_children=False)
@classmethod
def identify_checkbox(cls, line):
u""" Test if a certain line is a checkbox or not.
:line: the line to check
:returns: indent_level
"""
# checkbox is not heading
if REGEX_HEADING.match(line) is not None:
return None
m = REGEX_CHECKBOX.match(line)
if m:
r = m.groupdict()
return len(r[u'level'])
return None
@property
def is_dirty(self):
u""" Return True if the heading's body is marked dirty """
return self._dirty_checkbox or self._dirty_body
@property
def is_dirty_checkbox(self):
u""" Return True if the heading is marked dirty """
return self._dirty_checkbox
def get_index_in_parent_list(self):
""" Retrieve the index value of current checkbox in the parents list of
checkboxes. This works also for top level checkboxes.
:returns: Index value or None if heading doesn't have a
parent/document or is not in the list of checkboxes
"""
if self.parent:
return super(Checkbox, self).get_index_in_parent_list()
elif self.document:
l = self.get_parent_list()
if l:
return l.index(self)
def get_parent_list(self):
""" Retrieve the parents' list of headings. This works also for top
level headings.
:returns: List of headings or None if heading doesn't have a
parent/document or is not in the list of headings
"""
if self.parent:
return super(Checkbox, self).get_parent_list()
elif self.document:
if self in self.document.checkboxes:
return self.document.checkboxes
def set_dirty(self):
u""" Mark the heading and body dirty so that it will be rewritten when
saving the document """
self._dirty_checkbox = True
self._dirty_body = True
if self._document:
self._document.set_dirty_document()
def set_dirty_checkbox(self):
u""" Mark the checkbox dirty so that it will be rewritten when saving the
document """
self._dirty_checkbox = True
if self._document:
self._document.set_dirty_document()
@property
def previous_checkbox(self):
u""" Serialized access to the previous checkbox """
return super(Checkbox, self).previous_item
@property
def next_checkbox(self):
u""" Serialized access to the next checkbox """
return super(Checkbox, self).next_item
@property
def first_checkbox(self):
u""" Access to the first child heading or None if no children exist """
if self.children:
return self.children[0]
@property
def start(self):
u""" Access to the starting line of the checkbox """
return super(Checkbox, self).start
def toggle(self):
u""" Toggle status of this checkbox """
if self.status == Checkbox.STATUS_OFF or self.status is None:
self.status = Checkbox.STATUS_ON
else:
self.status = Checkbox.STATUS_OFF
self.set_dirty()
def all_siblings(self):
if not self.parent:
p = self._heading
else:
p = self.parent
if not p.children:
return
c = p.first_checkbox
while c:
yield c
c = c.next_sibling
return
def all_children(self):
if not self.children:
return
c = self.first_checkbox
while c:
yield c
for d in c.all_children():
yield d
c = c.next_sibling
return
def all_children_status(self):
u""" Return checkboxes status for current checkbox's all children
:return: (total, on)
total: total # of checkboxes
on: # of checkboxes which are on
"""
total, on = 0, 0
for c in self.all_children():
if c.status is not None:
total += 1
if c.status == Checkbox.STATUS_ON:
on += 1
return (total, on)
def all_siblings_status(self):
u""" Return checkboxes status for current checkbox's all siblings
:return: (total, on)
total: total # of checkboxes
on: # of checkboxes which are on
"""
total, on = 0, 0
for c in self.all_siblings():
if c.status is not None:
total += 1
if c.status == Checkbox.STATUS_ON:
on += 1
return (total, on)
def are_children_all(self, status):
u""" Check all children checkboxes status """
clen = len(self.children)
for i in range(clen):
if self.children[i].status != status:
return False
# recursively check children's status
if not self.children[i].are_children_all(status):
return False
return True
def is_child_one(self, status):
u""" Return true, if there is one child with given status """
clen = len(self.children)
for i in range(clen):
if self.children[i].status == status:
return True
return False
def are_siblings_all(self, status):
u""" Check all sibling checkboxes status """
for c in self.all_siblings():
if c.status != status:
return False
return True
@DomObj.level.setter
def level(self, value):
u""" Set the checkbox level and mark the checkbox and the document
dirty """
self._level = int(value)
self.set_dirty_checkbox()
@DomObj.title.setter
def title(self, value):
u""" Set the title and mark the document and the checkbox dirty """
if type(value) not in (unicode, str):
raise ValueError(u'Title must be a string.')
v = value
if type(v) == str:
v = u_decode(v)
self._title = v.strip()
self.set_dirty_checkbox()
@property
def status(self):
u""" status of current checkbox """
return self._status
@status.setter
def status(self, value):
self._status = value
self.set_dirty()
@status.deleter
def status(self):
self._status = u''
@property
def type(self):
u""" type of current checkbox list type """
return self._type
@type.setter
def type(self, value):
self._type = value
@type.deleter
def type(self):
self._type = u''
class CheckboxList(DomObjList):
u"""
Checkbox List
"""
def __init__(self, initlist=None, obj=None):
"""
:initlist: Initial data
:obj: Link to a concrete Checkbox or Document object
"""
# it's not necessary to register a on_change hook because the heading
# list will itself take care of marking headings dirty or adding
# headings to the deleted headings list
DomObjList.__init__(self, initlist, obj)
@classmethod
def is_checkbox(cls, obj):
return CheckboxList.is_domobj(obj)
def _get_heading(self):
if self.__class__.is_checkbox(self._obj):
return self._obj._document
return self._obj
================================================
FILE: ftplugin/orgmode/liborgmode/documents.py
================================================
# -*- coding: utf-8 -*-
"""
documents
~~~~~~~~~
TODO: explain this :)
"""
try:
from collections import UserList
except:
from UserList import UserList
from orgmode.liborgmode.base import MultiPurposeList, flatten_list, Direction, get_domobj_range
from orgmode.liborgmode.headings import Heading, HeadingList
from orgmode.py3compat.encode_compatibility import *
from orgmode.py3compat.unicode_compatibility import *
class Document(object):
u"""
Representation of a whole org-mode document.
A Document consists basically of headings (see Headings) and some metadata.
TODO: explain the 'dirty' mechanism
"""
def __init__(self):
u"""
Don't call this constructor directly but use one of the concrete
implementations.
TODO: what are the concrete implementatiions?
"""
object.__init__(self)
# is a list - only the Document methods should work on this list!
self._content = None
self._dirty_meta_information = False
self._dirty_document = False
self._meta_information = MultiPurposeList(
on_change=self.set_dirty_meta_information)
self._orig_meta_information_len = None
self._headings = HeadingList(obj=self)
self._deleted_headings = []
# settings needed to align tags properly
self._tabstop = 8
self._tag_column = 77
# TODO this doesn't differentiate between ACTIVE and FINISHED todo's
self.todo_states = [u'TODO', u'DONE']
def __unicode__(self):
if self.meta_information is None:
return u'\n'.join(self.all_headings())
return u'\n'.join(self.meta_information) + u'\n' + u'\n'.join([u'\n'.join([unicode(i)] + i.body) for i in self.all_headings()])
def __str__(self):
return u_encode(self.__unicode__())
def get_all_todo_states(self):
u""" Convenience function that returns all todo and done states and
sequences in one big list.
Returns:
list: [all todo/done states]
"""
# TODO This is not necessary remove
return flatten_list(self.get_todo_states())
def get_todo_states(self):
u""" Returns a list containing a tuple of two lists of allowed todo
states split by todo and done states. Multiple todo-done state
sequences can be defined.
Returns:
list: [([todo states], [done states]), ..]
"""
# TODO this should be made into property so todo states can be set like
# this too.. or there was also some todo property around... oh well..
# TODO there is the same method in vimbuffer
return self.todo_states
@property
def tabstop(self):
u""" Tabstop for this document """
return self._tabstop
@tabstop.setter
def tabstop(self, value):
self._tabstop = value
@property
def tag_column(self):
u""" The column all tags are right-aligned to """
return self._tag_column
@tag_column.setter
def tag_column(self, value):
self._tag_column = value
def init_dom(self, heading=Heading):
u""" Initialize all headings in document - build DOM. This method
should be call prior to accessing the document.
Returns:
self
"""
def init_heading(_h):
u"""
:returns the initialized heading
"""
start = _h.end + 1
prev_heading = None
while True:
new_heading = self.find_heading(start, heading=heading)
# * Heading 1 <- heading
# * Heading 1 <- sibling
# or
# * Heading 2 <- heading
# * Heading 1 <- parent's sibling
if not new_heading or \
new_heading.level <= _h.level:
break
# * Heading 1 <- heading
# * Heading 2 <- first child
# * Heading 2 <- another child
new_heading._parent = _h
if prev_heading:
prev_heading._next_sibling = new_heading
new_heading._previous_sibling = prev_heading
_h.children.data.append(new_heading)
# the start and end computation is only
# possible when the new heading was properly
# added to the document structure
init_heading(new_heading)
if new_heading.children:
# skip children
start = new_heading.end_of_last_child + 1
else:
start = new_heading.end + 1
prev_heading = new_heading
return _h
h = self.find_heading(heading=heading)
# initialize meta information
if h:
self._meta_information.data.extend(self._content[:h._orig_start])
else:
self._meta_information.data.extend(self._content[:])
self._orig_meta_information_len = len(self.meta_information)
# initialize dom tree
prev_h = None
while h:
if prev_h:
prev_h._next_sibling = h
h._previous_sibling = prev_h
self.headings.data.append(h)
init_heading(h)
prev_h = h
h = self.find_heading(h.end_of_last_child + 1, heading=heading)
return self
@property
def meta_information(self):
u""" Meta information is text that precedes all headings in an org-mode
document. It might contain additional information about the document,
e.g. author
"""
return self._meta_information
@meta_information.setter
def meta_information(self, value):
if self._orig_meta_information_len is None:
self._orig_meta_information_len = len(self.meta_information)
if type(value) in (list, tuple) or isinstance(value, UserList):
self._meta_information[:] = flatten_list(value)
elif type(value) in (str, ):
self._meta_information[:] = u_decode(value).split(u'\n')
elif type(value) in (unicode, ):
self._meta_information[:] = value.split(u'\n')
self.set_dirty_meta_information()
@meta_information.deleter
def meta_information(self):
self.meta_information = u''
@property
def headings(self):
u""" List of top level headings """
return self._headings
@headings.setter
def headings(self, value):
self._headings[:] = value
@headings.deleter
def headings(self):
del self.headings[:]
def write(self):
u""" Write the document
Returns:
bool: True if something was written, otherwise False
"""
raise NotImplementedError(u'Abstract method, please use concrete implementation!')
def set_dirty_meta_information(self):
u""" Mark the meta information dirty.
Note:
Causes meta information to be rewritten when saving the document
"""
self._dirty_meta_information = True
def set_dirty_document(self):
u""" Mark the whole document dirty.
Note:
When changing a heading this method must be executed in order to
changed computation of start and end positions from a static to a
dynamic computation
"""
self._dirty_document = True
@property
def is_dirty(self):
u""" Return information about unsaved changes for the document and all
related headings.
Returns:
bool: True if document contains unsaved changes.
"""
if self.is_dirty_meta_information:
return True
if self.is_dirty_document:
return True
if self._deleted_headings:
return True
return False
@property
def is_dirty_meta_information(self):
u""" Return True if the meta information is marked dirty """
return self._dirty_meta_information
@property
def is_dirty_document(self):
u""" Return True if the document is marked dirty """
return self._dirty_document
def all_headings(self):
u""" Iterate over all headings of the current document in serialized
order
:returns: Returns an iterator object which returns all headings of
the current file in serialized order
"""
if not self.headings:
return
h = self.headings[0]
while h:
yield h
h = h.next_heading
return
def find_heading(
self, position=0, direction=Direction.FORWARD, heading=Heading,
connect_with_document=True):
u""" Find heading in the given direction
Args:
position (int): starting line, counting from 0 (in vim you start
counting from 1, don't forget)
direction: downwards == Direction.FORWARD,
upwards == Direction.BACKWARD
heading: Heading class from which new heading objects will be
instantiated
connect_with_document: if True, the newly created heading will be
connected with the document, otherwise not
Returns:
heading or None: New heading
"""
start, end = get_domobj_range(
content=self._content, position=position, direction=direction,
identify_fun=heading.identify_heading)
if start is None:
return None
if end is None:
end = len(self._content) - 1
document = self if connect_with_document else None
return heading.parse_heading_from_data(
self._content[start:end + 1], self.get_all_todo_states(),
document=document, orig_start=start)
================================================
FILE: ftplugin/orgmode/liborgmode/dom_obj.py
================================================
# -*- coding: utf-8 -*-
"""
dom object
~~~~~~~~~~
TODO: explain this :)
"""
import re
from orgmode.liborgmode.base import MultiPurposeList, flatten_list
from orgmode.py3compat.encode_compatibility import *
from orgmode.py3compat.unicode_compatibility import *
try:
from collections import UserList
except:
from UserList import UserList
# breaking down tasks regex
REGEX_SUBTASK = re.compile(r'\[(\d*)/(\d*)\]')
REGEX_SUBTASK_PERCENT = re.compile(r'\[(\d*)%\]')
# heading regex
REGEX_HEADING = re.compile(
r'^(?P<level>\*+)(\s+(?P<title>.*?))?\s*(\s(?P<tags>:[\w_:@]+:))?$',
flags=re.U)
REGEX_TAG = re.compile(
r'^\s*((?P<title>[^\s]*?)\s+)?(?P<tags>:[\w_:@]+:)$',
flags=re.U)
REGEX_TODO = re.compile(r'^[^\s]*$')
# checkbox regex:
# - [ ] checkbox item
# - [X] checkbox item
# - [ ]
# - no status checkbox
UnOrderListType = [u'-', u'+', u'*']
OrderListType = [u'.', u')']
REGEX_CHECKBOX = re.compile(
r'^(?P<level>\s*)(?P<type>[%s]|([a-zA-Z]|[\d]+)[%s])(\s+(?P<status>\[.\]))?\s*(?P<title>.*)$'
% (''.join(UnOrderListType), ''.join(OrderListType)), flags=re.U)
class DomObj(object):
u"""
A DomObj is DOM structure element, like Heading and Checkbox.
Its purpose is to abstract the same parts of Heading and Checkbox objects,
and make code reusable.
All methods and properties are extracted from Heading object.
Heading and Checkbox objects inherit from DomObj, and override some specific
methods in their own objects.
Normally, we don't intend to use DomObj directly. However, we can add some more
DOM structure element based on this class to make code more concise.
"""
# TODO should this and DomObj_list be abstract methods? If so use ABC to
# force abstract methods
def __init__(self, level=1, title=u'', body=None):
u"""
:level: Level of the dom object
:title: Title of the dom object
:body: Body of the dom object
"""
object.__init__(self)
self._document = None
self._parent = None
self._previous_sibling = None
self._next_sibling = None
self._children = MultiPurposeList()
self._orig_start = None
self._orig_len = 0
self._level = level
# title
self._title = u''
if title:
self.title = title
# body
self._dirty_body = False
self._body = MultiPurposeList(on_change=self.set_dirty_body)
if body:
self.body = body
def __unicode__(self):
return u'<dom obj level=%s, title=%s>' % (level, title)
def __str__(self):
return u_encode(self.__unicode__())
def __len__(self):
# 1 is for the heading's title
return 1 + len(self.body)
@property
def is_dirty(self):
u""" Return True if the dom obj body is marked dirty """
return self._dirty_body
@property
def is_dirty_body(self):
u""" Return True if the dom obj body is marked dirty """
return self._dirty_body
def get_index_in_parent_list(self):
""" Retrieve the index value of current dom obj in the parents list of
dom objs. This works also for top level dom objs.
:returns: Index value or None if dom obj doesn't have a
parent/document or is not in the list of dom objs
"""
l = self.get_parent_list()
if l:
return l.index(self)
def get_parent_list(self):
""" Retrieve the parents list of dom objs. This works also for top
level dom objs.
:returns: List of dom objs or None if dom objs doesn't have a
parent/document or is not in the list of dom objs
"""
if self.parent:
if self in self.parent.children:
return self.parent.children
def set_dirty(self):
u""" Mark the dom objs and body dirty so that it will be rewritten when
saving the document """
if self._document:
self._document.set_dirty_document()
def set_dirty_body(self):
u""" Mark the dom objs' body dirty so that it will be rewritten when
saving the document """
self._dirty_body = True
if self._document:
self._document.set_dirty_document()
@property
def document(self):
u""" Read only access to the document. If you want to change the
document, just assign the dom obj to another document """
return self._document
@property
def parent(self):
u""" Access to the parent dom obj """
return self._parent
@property
def number_of_parents(self):
u""" Access to the number of parent dom objs before reaching the root
document """
def count_parents(h):
if h.parent:
return 1 + count_parents(h.parent)
else:
return 0
return count_parents(self)
@property
def previous_sibling(self):
u""" Access to the previous dom obj that's a sibling of the current one
"""
return self._previous_sibling
@property
def next_sibling(self):
u""" Access to the next dom obj that's a sibling of the current one """
return self._next_sibling
@property
def previous_item(self):
u""" Serialized access to the previous dom obj """
if self.previous_sibling:
h = self.previous_sibling
while h.children:
h = h.children[-1]
return h
elif self.parent:
return self.parent
@property
def next_item(self):
u""" Serialized access to the next dom obj """
if self.children:
return self.children[0]
elif self.next_sibling:
return self.next_sibling
else:
h = self.parent
while h:
if h.next_sibling:
return h.next_sibling
else:
h = h.parent
@property
def start(self):
u""" Access to the starting line of the dom obj """
if self.document is None or not self.document.is_dirty:
return self._orig_start
def item_len_generator(h):
while h:
yield len(h)
h = h.previous_item
return sum(item for item in item_len_generator(self.previous_item))
@property
def start_vim(self):
if self.start is not None:
return self.start + 1
@property
def end(self):
u""" Access to the ending line of the dom obj """
if self.start is not None:
return self.start + len(self.body)
@property
def end_vim(self):
if self.end is not None:
return self.end + 1
@property
def end_of_last_child(self):
u""" Access to end of the last child """
if self.children:
child = self.children[-1]
while child.children:
child = child.children[-1]
return child.end
return self.end
@property
def end_of_last_child_vim(self):
return self.end_of_last_child + 1
@property
def children(self):
u""" MultiPurposeList[dom_objects??]: subheadings of the current DomObj
Setter method takes list, tuple or userlist with DOMObjects
"""
return self._children
@children.setter
def children(self, value):
v = value
if type(v) in (list, tuple) or isinstance(v, UserList):
v = flatten_list(v)
self._children[:] = v
@children.deleter
def children(self):
del self.children[:]
@property
def first_child(self):
u""" Access to the first child dom obj or None if no children exist """
if self.children:
return self.children[0]
@property
def last_child(self):
u""" Access to the last child dom obj or None if no children exist """
if self.children:
return self.children[-1]
@property
def level(self):
u""" int: Access the the dom obj level
Setter sets the DOM object and the document as dirty if invoked.
"""
return self._level
@level.setter
def level(self, value):
# TODO Shouldn't there be and error when values is not int?
self._level = int(value)
self.set_dirty()
@level.deleter
def level(self):
self.level = None
@property
def title(self):
u""" str: Get the title of current dom object
Setter sets the DOM object and the document as dirty if invoked.
"""
return self._title.strip()
@title.setter
def title(self, value):
if type(value) not in (unicode, str):
raise ValueError(u'Title must be a string.')
v = value
if type(v) == str:
v = u_decode(v)
self._title = v.strip()
self.set_dirty()
@title.deleter
def title(self):
self._title = u''
@property
def body(self):
u""" MultiPurposeList[]: Holds the content belonging to the heading """
return self._body
@body.setter
def body(self, value):
if type(value) in (list, tuple) or isinstance(value, UserList):
self._body[:] = flatten_list(value)
elif type(value) in (str, ):
self._body[:] = u_decode(value).split(u'\n')
elif type(value) in (unicode, ):
self._body[:] = value.split(u'\n')
else:
self.body = list(unicode(value))
@body.deleter
def body(self):
# TODO write this as del self._body[:] because there is no reason to
# call so much code for deleting a list
self.body = []
class DomObjList(MultiPurposeList):
u"""
A Dom Obj List
"""
def __init__(self, initlist=None, obj=None):
"""
:initlist: Initial data
:obj: Link to a concrete Heading or Document object
"""
# it's not necessary to register a on_change hook because the heading
# list will itself take care of marking headings dirty or adding
# headings to the deleted headings list
MultiPurposeList.__init__(self)
self._obj = obj
# initialization must be done here, because
# self._document is not initialized when the
# constructor of MultiPurposeList is called
if initlist:
self.extend(initlist)
@classmethod
def is_domobj(cls, obj):
# TODO no reason for it to be class method. Does it even need to exist
# because it is quite clear what isinstance does and in derived methods
# isinstance(Heading, DomObj) would return True anyway.
return isinstance(obj, DomObj)
# TODO this should be made into a property
def _get_document(self):
if self.__class__.is_domobj(self._obj):
return self._obj._document
return self._obj
def __setitem__(self, i, item):
if isinstance(i, slice):
o = item
if self.__class__.is_domobj(o):
o = (o, )
o = flatten_list(o)
for item in o:
if not self.__class__.is_domobj(item):
raise ValueError(u'List contains items that are not a Dom obj!')
# self._add_to_deleted_domobjs(self[i:j])
# self._associate_domobj(o, \
# self[i - 1] if i - 1 >= 0 and i < len(self) else None, \
# self[j] if j >= 0 and j < len(self) else None)
MultiPurposeList.__setitem__(self, i, o)
else:
if not self.__class__.is_domobj(item):
raise ValueError(u'Item is not a Dom obj!')
if item in self:
raise ValueError(u'Dom obj is already part of this list!')
# self._add_to_deleted_domobjs(self[i])
# self._associate_domobj(item, \
# self[i - 1] if i - 1 >= 0 else None, \
# self[i + 1] if i + 1 < len(self) else None)
MultiPurposeList.__setitem__(self, i, item)
def __delitem__(self, i, taint=True):
if isinstance(i, slice):
items = self[i]
if items:
first = items[0]
last = items[-1]
if first.previous_sibling:
first.previous_sibling._next_sibling = last.next_sibling
if last.next_sibling:
last.next_sibling._previous_sibling = first.previous_sibling
# if taint:
# self._add_to_deleted_domobj
gitextract_x59pk6e5/
├── .gitignore
├── .pylintrc
├── .travis.yml
├── CHANGELOG.org
├── LICENSE
├── Makefile
├── README.org
├── doc/
│ └── orgguide.txt
├── examples/
│ ├── mylife.org
│ └── plugins/
│ └── PluginExample.py
├── ftdetect/
│ └── org.vim
├── ftplugin/
│ ├── org.cnf
│ ├── org.vim
│ └── orgmode/
│ ├── __init__.py
│ ├── _vim.py
│ ├── docs/
│ │ ├── Makefile
│ │ ├── conf.py
│ │ ├── index.rst
│ │ ├── make.bat
│ │ ├── orgmode.liborgmode.rst
│ │ ├── orgmode.plugins.rst
│ │ ├── orgmode.py3compat.rst
│ │ └── orgmode.rst
│ ├── exceptions.py
│ ├── keybinding.py
│ ├── liborgmode/
│ │ ├── __init__.py
│ │ ├── agenda.py
│ │ ├── agendafilter.py
│ │ ├── base.py
│ │ ├── checkboxes.py
│ │ ├── documents.py
│ │ ├── dom_obj.py
│ │ ├── headings.py
│ │ └── orgdate.py
│ ├── menu.py
│ ├── plugins/
│ │ ├── Agenda.py
│ │ ├── Date.py
│ │ ├── EditCheckbox.py
│ │ ├── EditStructure.py
│ │ ├── Export.py
│ │ ├── Hyperlinks.py
│ │ ├── LoggingWork.py
│ │ ├── Misc.py
│ │ ├── Navigator.py
│ │ ├── ShowHide.py
│ │ ├── TagsProperties.py
│ │ ├── Todo.py
│ │ └── __init__.py
│ ├── py3compat/
│ │ ├── __init__.py
│ │ ├── encode_compatibility.py
│ │ ├── py_py3_string.py
│ │ ├── unicode_compatibility.py
│ │ └── xrange_compatibility.py
│ ├── settings.py
│ └── vimbuffer.py
├── indent/
│ └── org.vim
├── syntax/
│ ├── org.vim
│ ├── orgagenda.vim
│ └── orgtodo.vim
└── tests/
├── orgmode_testfile.org
├── run_tests.py
├── test_libagendafilter.py
├── test_libbase.py
├── test_libcheckbox.py
├── test_libheading.py
├── test_liborgdate.py
├── test_liborgdate_parsing.py
├── test_liborgdate_utf8.py
├── test_liborgdatetime.py
├── test_liborgtimerange.py
├── test_plugin_date.py
├── test_plugin_edit_checkbox.py
├── test_plugin_edit_structure.py
├── test_plugin_mappings.py
├── test_plugin_misc.py
├── test_plugin_navigator.py
├── test_plugin_show_hide.py
├── test_plugin_tags_properties.py
├── test_plugin_todo.py
├── test_vimbuffer.py
└── vim.py
SYMBOL INDEX (757 symbols across 49 files)
FILE: examples/plugins/PluginExample.py
class Example (line 10) | class Example(object):
method __init__ (line 17) | def __init__(self):
method action (line 32) | def action(cls):
method register (line 40) | def register(self):
FILE: ftplugin/orgmode/_vim.py
function realign_tags (line 41) | def realign_tags(f):
function repeat (line 59) | def repeat(f):
function apply_count (line 74) | def apply_count(f):
function echo (line 100) | def echo(message):
function echom (line 109) | def echom(message):
function echoe (line 119) | def echoe(message):
function insert_at_cursor (line 128) | def insert_at_cursor(text, move=True, start_insertmode=False):
function get_user_input (line 143) | def get_user_input(message):
function get_bufnumber (line 156) | def get_bufnumber(bufname):
function get_bufname (line 166) | def get_bufname(bufnr):
function indent_orgmode (line 175) | def indent_orgmode():
function fold_text (line 201) | def fold_text(allow_dirty=False):
function fold_orgmode (line 231) | def fold_orgmode(allow_dirty=False):
function date_to_str (line 271) | def date_to_str(date):
class OrgMode (line 278) | class OrgMode(object):
method __init__ (line 281) | def __init__(self):
method get_document (line 293) | def get_document(self, bufnr=0, allow_dirty=False):
method plugins (line 312) | def plugins(self):
method register_plugin (line 318) | def register_plugin(self, plugin):
method register_keybindings (line 374) | def register_keybindings(self):
method register_menu (line 386) | def register_menu(self):
method unregister_menu (line 389) | def unregister_menu(self):
method start (line 392) | def start(self):
FILE: ftplugin/orgmode/exceptions.py
class PluginError (line 4) | class PluginError(BaseException):
method __init__ (line 5) | def __init__(self, message):
class BufferNotFound (line 9) | class BufferNotFound(BaseException):
method __init__ (line 10) | def __init__(self, message):
class BufferNotInSync (line 14) | class BufferNotInSync(BaseException):
method __init__ (line 15) | def __init__(self, message):
class HeadingDomError (line 19) | class HeadingDomError(BaseException):
method __init__ (line 20) | def __init__(self, message):
FILE: ftplugin/orgmode/keybinding.py
function _register (line 16) | def _register(f, name):
function register_keybindings (line 26) | def register_keybindings(f):
function register_commands (line 30) | def register_commands(f):
class Command (line 34) | class Command(object):
method __init__ (line 37) | def __init__(self, name, command, arguments=u'0', complete=None, overw...
method __unicode__ (line 52) | def __unicode__(self):
method __str__ (line 55) | def __str__(self):
method name (line 59) | def name(self):
method command (line 63) | def command(self):
method arguments (line 67) | def arguments(self):
method complete (line 71) | def complete(self):
method overwrite_exisiting (line 75) | def overwrite_exisiting(self):
method create (line 78) | def create(self):
class Plug (line 90) | class Plug(object):
method __init__ (line 93) | def __init__(self, name, command, mode=MODE_NORMAL):
method __unicode__ (line 108) | def __unicode__(self):
method __str__ (line 111) | def __str__(self):
method create (line 114) | def create(self):
method mode (line 123) | def mode(self):
class Keybinding (line 127) | class Keybinding(object):
method __init__ (line 130) | def __init__(self, key, action, mode=None, options=None, remap=True, b...
method key (line 164) | def key(self):
method action (line 168) | def action(self):
method mode (line 172) | def mode(self):
method options (line 176) | def options(self):
method remap (line 180) | def remap(self):
method buffer_only (line 184) | def buffer_only(self):
method silent (line 188) | def silent(self):
method create (line 191) | def create(self):
FILE: ftplugin/orgmode/liborgmode/agenda.py
function agenda_sorting_key (line 22) | def agenda_sorting_key(heading):
class AgendaManager (line 42) | class AgendaManager(object):
method __init__ (line 46) | def __init__(self):
method get_todo (line 49) | def get_todo(self, documents):
method get_next_week_and_active_todo (line 60) | def get_next_week_and_active_todo(self, documents):
method get_timestamped_items (line 72) | def get_timestamped_items(self, documents):
FILE: ftplugin/orgmode/liborgmode/agendafilter.py
function filter_items (line 26) | def filter_items(headings, filters):
function is_within_week (line 47) | def is_within_week(heading):
function is_within_week_and_active_todo (line 60) | def is_within_week_and_active_todo(heading):
function contains_active_todo (line 69) | def contains_active_todo(heading):
function contains_active_date (line 85) | def contains_active_date(heading):
FILE: ftplugin/orgmode/liborgmode/base.py
function flatten_list (line 26) | def flatten_list(lst):
class Direction (line 49) | class Direction():
class MultiPurposeList (line 59) | class MultiPurposeList(UserList):
method __init__ (line 70) | def __init__(self, initlist=None, on_change=None):
method _changed (line 74) | def _changed(self):
method __setitem__ (line 79) | def __setitem__(self, i, item):
method __delitem__ (line 87) | def __delitem__(self, i):
method __getitem__ (line 95) | def __getitem__(self, i):
method __setslice__ (line 104) | def __setslice__(self, i, j, other):
method __delslice__ (line 107) | def __delslice__(self, i, j):
method __getslice__ (line 110) | def __getslice__(self, i, j):
method __iadd__ (line 113) | def __iadd__(self, other):
method __imul__ (line 118) | def __imul__(self, n):
method append (line 123) | def append(self, item):
method insert (line 127) | def insert(self, i, item):
method pop (line 131) | def pop(self, i=-1):
method remove (line 136) | def remove(self, item):
method reverse (line 139) | def reverse(self):
method sort (line 143) | def sort(self, *args, **kwds):
method extend (line 147) | def extend(self, other):
function get_domobj_range (line 152) | def get_domobj_range(content=[], position=0, direction=Direction.FORWARD...
FILE: ftplugin/orgmode/liborgmode/checkboxes.py
class Checkbox (line 26) | class Checkbox(DomObj):
method __init__ (line 33) | def __init__(self, level=1, type=u'-', title=u'', status=u'[ ]', body=...
method __unicode__ (line 57) | def __unicode__(self):
method __str__ (line 61) | def __str__(self):
method __len__ (line 64) | def __len__(self):
method copy (line 68) | def copy(self, including_children=True, parent=None):
method parse_checkbox_from_data (line 97) | def parse_checkbox_from_data(cls, data, heading=None, orig_start=None):
method update_subtasks (line 136) | def update_subtasks(self, total=0, on=0):
method identify_checkbox (line 148) | def identify_checkbox(cls, line):
method is_dirty (line 166) | def is_dirty(self):
method is_dirty_checkbox (line 171) | def is_dirty_checkbox(self):
method get_index_in_parent_list (line 175) | def get_index_in_parent_list(self):
method get_parent_list (line 189) | def get_parent_list(self):
method set_dirty (line 202) | def set_dirty(self):
method set_dirty_checkbox (line 210) | def set_dirty_checkbox(self):
method previous_checkbox (line 218) | def previous_checkbox(self):
method next_checkbox (line 223) | def next_checkbox(self):
method first_checkbox (line 228) | def first_checkbox(self):
method start (line 234) | def start(self):
method toggle (line 238) | def toggle(self):
method all_siblings (line 246) | def all_siblings(self):
method all_children (line 260) | def all_children(self):
method all_children_status (line 273) | def all_children_status(self):
method all_siblings_status (line 290) | def all_siblings_status(self):
method are_children_all (line 307) | def are_children_all(self, status):
method is_child_one (line 319) | def is_child_one(self, status):
method are_siblings_all (line 328) | def are_siblings_all(self, status):
method level (line 337) | def level(self, value):
method title (line 344) | def title(self, value):
method status (line 355) | def status(self):
method status (line 360) | def status(self, value):
method status (line 365) | def status(self):
method type (line 369) | def type(self):
method type (line 374) | def type(self, value):
method type (line 378) | def type(self):
class CheckboxList (line 382) | class CheckboxList(DomObjList):
method __init__ (line 386) | def __init__(self, initlist=None, obj=None):
method is_checkbox (line 397) | def is_checkbox(cls, obj):
method _get_heading (line 400) | def _get_heading(self):
FILE: ftplugin/orgmode/liborgmode/documents.py
class Document (line 21) | class Document(object):
method __init__ (line 30) | def __init__(self):
method __unicode__ (line 56) | def __unicode__(self):
method __str__ (line 61) | def __str__(self):
method get_all_todo_states (line 64) | def get_all_todo_states(self):
method get_todo_states (line 74) | def get_todo_states(self):
method tabstop (line 88) | def tabstop(self):
method tabstop (line 93) | def tabstop(self, value):
method tag_column (line 97) | def tag_column(self):
method tag_column (line 102) | def tag_column(self, value):
method init_dom (line 105) | def init_dom(self, heading=Heading):
method meta_information (line 173) | def meta_information(self):
method meta_information (line 181) | def meta_information(self, value):
method meta_information (line 193) | def meta_information(self):
method headings (line 197) | def headings(self):
method headings (line 202) | def headings(self, value):
method headings (line 206) | def headings(self):
method write (line 209) | def write(self):
method set_dirty_meta_information (line 217) | def set_dirty_meta_information(self):
method set_dirty_document (line 225) | def set_dirty_document(self):
method is_dirty (line 236) | def is_dirty(self):
method is_dirty_meta_information (line 255) | def is_dirty_meta_information(self):
method is_dirty_document (line 260) | def is_dirty_document(self):
method all_headings (line 264) | def all_headings(self):
method find_heading (line 280) | def find_heading(
FILE: ftplugin/orgmode/liborgmode/dom_obj.py
class DomObj (line 46) | class DomObj(object):
method __init__ (line 62) | def __init__(self, level=1, title=u'', body=None):
method __unicode__ (line 90) | def __unicode__(self):
method __str__ (line 93) | def __str__(self):
method __len__ (line 96) | def __len__(self):
method is_dirty (line 101) | def is_dirty(self):
method is_dirty_body (line 106) | def is_dirty_body(self):
method get_index_in_parent_list (line 110) | def get_index_in_parent_list(self):
method get_parent_list (line 121) | def get_parent_list(self):
method set_dirty (line 132) | def set_dirty(self):
method set_dirty_body (line 138) | def set_dirty_body(self):
method document (line 146) | def document(self):
method parent (line 152) | def parent(self):
method number_of_parents (line 157) | def number_of_parents(self):
method previous_sibling (line 168) | def previous_sibling(self):
method next_sibling (line 174) | def next_sibling(self):
method previous_item (line 179) | def previous_item(self):
method next_item (line 190) | def next_item(self):
method start (line 205) | def start(self):
method start_vim (line 217) | def start_vim(self):
method end (line 222) | def end(self):
method end_vim (line 228) | def end_vim(self):
method end_of_last_child (line 233) | def end_of_last_child(self):
method end_of_last_child_vim (line 243) | def end_of_last_child_vim(self):
method children (line 247) | def children(self):
method children (line 255) | def children(self, value):
method children (line 262) | def children(self):
method first_child (line 266) | def first_child(self):
method last_child (line 272) | def last_child(self):
method level (line 278) | def level(self):
method level (line 286) | def level(self, value):
method level (line 292) | def level(self):
method title (line 296) | def title(self):
method title (line 304) | def title(self, value):
method title (line 314) | def title(self):
method body (line 318) | def body(self):
method body (line 323) | def body(self, value):
method body (line 334) | def body(self):
class DomObjList (line 340) | class DomObjList(MultiPurposeList):
method __init__ (line 344) | def __init__(self, initlist=None, obj=None):
method is_domobj (line 363) | def is_domobj(cls, obj):
method _get_document (line 370) | def _get_document(self):
method __setitem__ (line 375) | def __setitem__(self, i, item):
method __delitem__ (line 402) | def __delitem__(self, i, taint=True):
method __setslice__ (line 425) | def __setslice__(self, i, j, other):
method __delslice__ (line 428) | def __delslice__(self, i, j, taint=True):
method __iadd__ (line 431) | def __iadd__(self, other):
method __imul__ (line 441) | def __imul__(self, n):
method append (line 445) | def append(self, item, taint=True):
method insert (line 455) | def insert(self, i, item, taint=True):
method pop (line 462) | def pop(self, i=-1):
method remove_slice (line 468) | def remove_slice(self, i, j, taint=True):
method remove (line 471) | def remove(self, item, taint=True):
method reverse (line 474) | def reverse(self):
method sort (line 484) | def sort(self, *args, **kwds):
method extend (line 494) | def extend(self, other):
FILE: ftplugin/orgmode/liborgmode/headings.py
class Heading (line 29) | class Heading(DomObj):
method __init__ (line 32) | def __init__(self, level=1, title=u'', tags=None, todo=None, body=None...
method __unicode__ (line 65) | def __unicode__(self):
method __str__ (line 107) | def __str__(self):
method __len__ (line 110) | def __len__(self):
method __lt__ (line 114) | def __lt__(self, other):
method __le__ (line 133) | def __le__(self, other):
method __ge__ (line 152) | def __ge__(self, other):
method __gt__ (line 171) | def __gt__(self, other):
method copy (line 190) | def copy(self, including_children=True, parent=None):
method all_checkboxes (line 218) | def all_checkboxes(self):
method all_toplevel_checkboxes (line 234) | def all_toplevel_checkboxes(self):
method find_checkbox (line 245) | def find_checkbox(self, position=0, direction=Direction.FORWARD,
method init_checkboxes (line 277) | def init_checkboxes(self, checkbox=Checkbox):
method current_checkbox (line 336) | def current_checkbox(self, position=None):
method first_checkbox (line 388) | def first_checkbox(self):
method parse_heading_from_data (line 394) | def parse_heading_from_data(
method update_subtasks (line 465) | def update_subtasks(self, total=0, on=0):
method identify_heading (line 481) | def identify_heading(line):
method is_dirty (line 501) | def is_dirty(self):
method is_dirty_heading (line 506) | def is_dirty_heading(self):
method get_index_in_parent_list (line 510) | def get_index_in_parent_list(self):
method get_parent_list (line 524) | def get_parent_list(self):
method set_dirty (line 537) | def set_dirty(self):
method set_dirty_heading (line 545) | def set_dirty_heading(self):
method previous_heading (line 553) | def previous_heading(self):
method next_heading (line 558) | def next_heading(self):
method start (line 563) | def start(self):
method level (line 573) | def level(self, value):
method todo (line 579) | def todo(self):
method todo (line 585) | def todo(self, value):
method todo (line 601) | def todo(self):
method active_date (line 605) | def active_date(self):
method active_date (line 615) | def active_date(self, value):
method active_date (line 619) | def active_date(self):
method title (line 623) | def title(self, value):
method tags (line 635) | def tags(self):
method tags (line 640) | def tags(self, value):
method tags (line 661) | def tags(self):
method checkboxes (line 665) | def checkboxes(self):
method checkboxes (line 670) | def checkboxes(self, value):
method checkboxes (line 674) | def checkboxes(self):
class HeadingList (line 678) | class HeadingList(DomObjList):
method __init__ (line 687) | def __init__(self, initlist=None, obj=None):
method is_heading (line 698) | def is_heading(cls, obj):
method _get_document (line 702) | def _get_document(self):
method _add_to_deleted_headings (line 707) | def _add_to_deleted_headings(self, item):
method _associate_heading (line 724) | def _associate_heading(
method __setitem__ (line 791) | def __setitem__(self, i, item):
method __delitem__ (line 820) | def __delitem__(self, i, taint=True):
method __iadd__ (line 845) | def __iadd__(self, other):
method append (line 855) | def append(self, item, taint=True):
method insert (line 865) | def insert(self, i, item, taint=True):
method pop (line 872) | def pop(self, i=-1):
method extend (line 878) | def extend(self, other):
FILE: ftplugin/orgmode/liborgmode/orgdate.py
function get_orgdate (line 58) | def get_orgdate(data):
function _findfirst (line 75) | def _findfirst(f, seq):
function _text2orgdate (line 86) | def _text2orgdate(string):
class OrgDate (line 165) | class OrgDate(datetime.date):
method __init__ (line 174) | def __init__(self, active, year, month, day):
method __new__ (line 178) | def __new__(cls, active, year, month, day):
method __unicode__ (line 181) | def __unicode__(self):
method __str__ (line 190) | def __str__(self):
method timestr (line 193) | def timestr(self):
method date (line 196) | def date(self):
method strftime (line 199) | def strftime(self, fmt):
class OrgDateTime (line 203) | class OrgDateTime(datetime.datetime):
method __init__ (line 213) | def __init__(self, active, year, month, day, hour, mins):
method __new__ (line 216) | def __new__(cls, active, year, month, day, hour, minute):
method __unicode__ (line 219) | def __unicode__(self):
method __str__ (line 228) | def __str__(self):
method timestr (line 231) | def timestr(self):
method date (line 234) | def date(self):
method strftime (line 237) | def strftime(self, fmt):
class OrgTimeRange (line 241) | class OrgTimeRange(object):
method __init__ (line 252) | def __init__(self, active, start, end):
method __unicode__ (line 262) | def __unicode__(self):
method __str__ (line 305) | def __str__(self):
method date (line 308) | def date(self):
FILE: ftplugin/orgmode/menu.py
function register_menu (line 10) | def register_menu(f):
function add_cmd_mapping_menu (line 28) | def add_cmd_mapping_menu(plugin, name, function, key_mapping, menu_desrc):
class Submenu (line 47) | class Submenu(object):
method __init__ (line 50) | def __init__(self, name, parent=None):
method __add__ (line 56) | def __add__(self, entry):
method __sub__ (line 62) | def __sub__(self, entry):
method children (line 68) | def children(self):
method get_menu (line 71) | def get_menu(self):
method create (line 77) | def create(self):
method __str__ (line 81) | def __str__(self):
class Separator (line 87) | class Separator(object):
method __init__ (line 90) | def __init__(self, parent=None):
method __unicode__ (line 94) | def __unicode__(self):
method __str__ (line 97) | def __str__(self):
method create (line 100) | def create(self):
class ActionEntry (line 105) | class ActionEntry(object):
method __init__ (line 108) | def __init__(self, lname, action, rname=None, mode=MODE_NORMAL, parent...
method __str__ (line 127) | def __str__(self):
method lname (line 131) | def lname(self):
method action (line 135) | def action(self):
method rname (line 141) | def rname(self):
method mode (line 147) | def mode(self):
method create (line 152) | def create(self):
FILE: ftplugin/orgmode/plugins/Agenda.py
class Agenda (line 18) | class Agenda(object):
method __init__ (line 26) | def __init__(self):
method _switch_to (line 41) | def _switch_to(cls, bufname, vim_commands=None):
method _get_agendadocuments (line 68) | def _get_agendadocuments(self):
method _load_agendafiles (line 86) | def _load_agendafiles(self, agenda_files):
method opendoc (line 108) | def opendoc(cls, split=False, switch=False):
method list_next_week (line 142) | def list_next_week(cls):
method list_next_week_for_buffer (line 149) | def list_next_week_for_buffer(cls):
method list_next_week_for (line 156) | def list_next_week_for(cls, agenda_documents):
method list_all_todos (line 221) | def list_all_todos(cls, current_buffer=False):
method list_timeline (line 255) | def list_timeline(cls):
method register (line 279) | def register(self):
FILE: ftplugin/orgmode/plugins/Date.py
class Date (line 18) | class Date(object):
method __init__ (line 34) | def __init__(self):
method _modify_time (line 59) | def _modify_time(cls, startdate, modifier):
method insert_timestamp (line 227) | def insert_timestamp(cls, active=True):
method insert_timestamp_with_calendar (line 259) | def insert_timestamp_with_calendar(cls, active=True):
method register (line 279) | def register(self):
FILE: ftplugin/orgmode/plugins/EditCheckbox.py
class EditCheckbox (line 15) | class EditCheckbox(object):
method __init__ (line 20) | def __init__(self):
method new_checkbox (line 35) | def new_checkbox(cls, below=None, plain=None):
method toggle (line 143) | def toggle(cls, checkbox=None):
method _update_subtasks (line 186) | def _update_subtasks(cls):
method _update_checkboxes_subtasks (line 201) | def _update_checkboxes_subtasks(cls, checkbox):
method update_checkboxes_status (line 210) | def update_checkboxes_status(cls):
method _update_checkboxes_status (line 222) | def _update_checkboxes_status(cls, checkbox=None):
method register (line 277) | def register(self):
FILE: ftplugin/orgmode/plugins/EditStructure.py
class EditStructure (line 17) | class EditStructure(object):
method __init__ (line 20) | def __init__(self):
method new_heading (line 32) | def new_heading(cls, below=None, insert_mode=False, end_of_last_child=...
method _append_heading (line 113) | def _append_heading(cls, heading, parent):
method _change_heading_level (line 123) | def _change_heading_level(cls, level, including_children=True, on_head...
method demote_heading (line 263) | def demote_heading(cls, including_children=True, on_heading=False, ins...
method promote_heading (line 273) | def promote_heading(cls, including_children=True, on_heading=False, in...
method _move_heading (line 280) | def _move_heading(cls, direction=Direction.FORWARD, including_children...
method move_heading_upward (line 335) | def move_heading_upward(cls, including_children=True):
method move_heading_downward (line 344) | def move_heading_downward(cls, including_children=True):
method register (line 350) | def register(self):
FILE: ftplugin/orgmode/plugins/Export.py
class Export (line 15) | class Export(object):
method __init__ (line 27) | def __init__(self):
method _get_init_script (line 42) | def _get_init_script(cls):
method _export (line 52) | def _export(cls, format_):
method topdf (line 88) | def topdf(cls):
method tobeamer (line 97) | def tobeamer(cls):
method tohtml (line 106) | def tohtml(cls):
method tolatex (line 115) | def tolatex(cls):
method tomarkdown (line 124) | def tomarkdown(cls):
method register (line 132) | def register(self):
FILE: ftplugin/orgmode/plugins/Hyperlinks.py
class Hyperlinks (line 14) | class Hyperlinks(object):
method __init__ (line 17) | def __init__(self):
method _get_link (line 35) | def _get_link(cls, cursor=None):
method follow (line 73) | def follow(cls, action=u'openLink', visual=u''):
method insert (line 105) | def insert(cls, uri=None, description=None):
method register (line 160) | def register(self):
FILE: ftplugin/orgmode/plugins/LoggingWork.py
class LoggingWork (line 11) | class LoggingWork(object):
method __init__ (line 14) | def __init__(self):
method action (line 29) | def action(cls):
method register (line 36) | def register(self):
FILE: ftplugin/orgmode/plugins/Misc.py
class Misc (line 12) | class Misc(object):
method __init__ (line 15) | def __init__(self):
method jump_to_first_character (line 27) | def jump_to_first_character(cls):
method edit_at_first_character (line 36) | def edit_at_first_character(cls):
method i_heading (line 48) | def i_heading(cls, mode=u'visual', selection=u'inner', skip_children=F...
method a_heading (line 112) | def a_heading(cls, selection=u'inner', skip_children=False):
method register (line 144) | def register(self):
FILE: ftplugin/orgmode/plugins/Navigator.py
class Navigator (line 13) | class Navigator(object):
method __init__ (line 16) | def __init__(self):
method parent (line 23) | def parent(cls, mode):
method parent_next_sibling (line 54) | def parent_next_sibling(cls, mode):
method _change_visual_selection (line 86) | def _change_visual_selection(cls, current_heading, heading, direction=...
method _focus_heading (line 181) | def _focus_heading(cls, mode, direction=Direction.FORWARD, skip_childr...
method previous (line 266) | def previous(cls, mode, skip_children=False):
method next (line 274) | def next(cls, mode, skip_children=False):
method register (line 280) | def register(self):
FILE: ftplugin/orgmode/plugins/ShowHide.py
class ShowHide (line 15) | class ShowHide(object):
method __init__ (line 18) | def __init__(self):
method _fold_depth (line 30) | def _fold_depth(cls, h):
method toggle_folding (line 53) | def toggle_folding(cls, reverse=False):
method global_toggle_folding (line 125) | def global_toggle_folding(cls, reverse=False):
method register (line 157) | def register(self):
FILE: ftplugin/orgmode/plugins/TagsProperties.py
class TagsProperties (line 13) | class TagsProperties(object):
method __init__ (line 16) | def __init__(self):
method complete_tags (line 31) | def complete_tags(cls):
method set_tags (line 76) | def set_tags(cls):
method find_tags (line 103) | def find_tags(cls):
method realign_tags (line 132) | def realign_tags(cls):
method realign_all_tags (line 146) | def realign_all_tags(cls):
method register (line 156) | def register(self):
FILE: ftplugin/orgmode/plugins/Todo.py
function split_access_key (line 23) | def split_access_key(t, sub=None):
class Todo (line 52) | class Todo(object):
method __init__ (line 70) | def __init__(self):
method _process_all_states (line 82) | def _process_all_states(cls, all_states):
method _get_next_state (line 105) | def _get_next_state(
method toggle_todo_state (line 152) | def toggle_todo_state(
method set_todo_state (line 211) | def set_todo_state(cls, state):
method init_org_todo (line 251) | def init_org_todo(cls):
method register (line 303) | def register(self):
FILE: ftplugin/orgmode/py3compat/encode_compatibility.py
function u_encode (line 3) | def u_encode(string):
function u_decode (line 5) | def u_decode(string):
function u_encode (line 8) | def u_encode(string):
function u_decode (line 10) | def u_decode(string):
FILE: ftplugin/orgmode/py3compat/py_py3_string.py
class NoneAsEmptyFormatter (line 11) | class NoneAsEmptyFormatter(Formatter):
method get_value (line 12) | def get_value(self, key, args, kwargs):
FILE: ftplugin/orgmode/settings.py
function get (line 22) | def get(setting, default=None, scope=SCOPE_ALL):
function set (line 52) | def set(setting, value, scope=SCOPE_GLOBAL, overwrite=False):
function unset (line 85) | def unset(setting, scope=SCOPE_GLOBAL):
FILE: ftplugin/orgmode/vimbuffer.py
class VimBuffer (line 37) | class VimBuffer(Document):
method __init__ (line 38) | def __init__(self, bufnr=0):
method tabstop (line 63) | def tabstop(self):
method tag_column (line 67) | def tag_column(self):
method is_insync (line 71) | def is_insync(self):
method bufnr (line 77) | def bufnr(self):
method changedtick (line 84) | def changedtick(self):
method changedtick (line 89) | def changedtick(self, value):
method get_todo_states (line 92) | def get_todo_states(self, strip_access_key=True):
method update_changedtick (line 148) | def update_changedtick(self):
method write (line 159) | def write(self):
method write_heading (line 216) | def write_heading(self, heading, including_children=True):
method write_checkbox (line 263) | def write_checkbox(self, checkbox, including_children=True):
method write_checkboxes (line 288) | def write_checkboxes(self, checkboxes):
method previous_heading (line 291) | def previous_heading(self, position=None):
method current_heading (line 299) | def current_heading(self, position=None):
method next_heading (line 350) | def next_heading(self, position=None):
method find_current_heading (line 358) | def find_current_heading(self, position=None, heading=Heading):
class VimBufferContent (line 377) | class VimBufferContent(MultiPurposeList):
method __init__ (line 386) | def __init__(self, vimbuffer, on_change=None):
method __contains__ (line 393) | def __contains__(self, item):
method __getitem__ (line 399) | def __getitem__(self, i):
method __setitem__ (line 409) | def __setitem__(self, i, item):
method __add__ (line 436) | def __add__(self, other):
method __radd__ (line 446) | def __radd__(self, other):
method __iadd__ (line 456) | def __iadd__(self, other):
method append (line 469) | def append(self, item):
method insert (line 475) | def insert(self, i, item):
method index (line 481) | def index(self, item, *args):
method pop (line 487) | def pop(self, i=-1):
method extend (line 490) | def extend(self, other):
FILE: tests/test_libagendafilter.py
class AgendaFilterTestCase (line 26) | class AgendaFilterTestCase(unittest.TestCase):
method setUp (line 29) | def setUp(self):
method test_contains_active_todo (line 51) | def test_contains_active_todo(self):
method test_contains_active_date (line 61) | def test_contains_active_date(self):
method test_is_within_week_with_orgdate (line 69) | def test_is_within_week_with_orgdate(self):
method test_is_within_week_with_orgdatetime (line 88) | def test_is_within_week_with_orgdatetime(self):
method test_filter_items (line 107) | def test_filter_items(self):
method test_filter_items_with_some_todos_and_dates (line 140) | def test_filter_items_with_some_todos_and_dates(self):
function suite (line 167) | def suite():
FILE: tests/test_libbase.py
class LibBaseTestCase (line 11) | class LibBaseTestCase(unittest.TestCase):
method setUp (line 13) | def setUp(self):
method test_base_functions (line 22) | def test_base_functions(self):
function suite (line 30) | def suite():
FILE: tests/test_libcheckbox.py
function set_vim_buffer (line 13) | def set_vim_buffer(buf=None, cursor=(2, 0), bufnr=0):
class CheckboxTestCase (line 21) | class CheckboxTestCase(unittest.TestCase):
method setUp (line 23) | def setUp(self):
method test_init (line 63) | def test_init(self):
method test_basic (line 70) | def test_basic(self):
method test_identify (line 92) | def test_identify(self):
method test_toggle (line 99) | def test_toggle(self):
method test_subtasks (line 116) | def test_subtasks(self):
function suite (line 129) | def suite():
FILE: tests/test_libheading.py
class TestHeadingRecognizeDatesInHeading (line 12) | class TestHeadingRecognizeDatesInHeading(unittest.TestCase):
method setUp (line 14) | def setUp(self):
method test_heading_parsing_no_date (line 33) | def test_heading_parsing_no_date(self):
method test_heading_parsing_with_date (line 53) | def test_heading_parsing_with_date(self):
method test_heading_parsing_with_date_and_body (line 69) | def test_heading_parsing_with_date_and_body(self):
method test_less_than_for_dates_in_heading (line 95) | def test_less_than_for_dates_in_heading(self):
method test_less_equal_for_dates_in_heading (line 106) | def test_less_equal_for_dates_in_heading(self):
method test_greate_than_for_dates_in_heading (line 113) | def test_greate_than_for_dates_in_heading(self):
method test_greate_equal_for_dates_in_heading (line 120) | def test_greate_equal_for_dates_in_heading(self):
method test_sorting_of_headings (line 126) | def test_sorting_of_headings(self):
function suite (line 152) | def suite():
FILE: tests/test_liborgdate.py
class OrgDateTestCase (line 13) | class OrgDateTestCase(unittest.TestCase):
method setUp (line 18) | def setUp(self):
method test_OrgDate_ctor_active (line 26) | def test_OrgDate_ctor_active(self):
method test_OrgDate_ctor_inactive (line 33) | def test_OrgDate_ctor_inactive(self):
method test_OrdDate_str_active (line 40) | def test_OrdDate_str_active(self):
method test_OrdDate_str_inactive (line 45) | def test_OrdDate_str_inactive(self):
function suite (line 50) | def suite():
FILE: tests/test_liborgdate_parsing.py
class OrgDateParsingTestCase (line 15) | class OrgDateParsingTestCase(unittest.TestCase):
method setUp (line 22) | def setUp(self):
method test_get_orgdate_parsing_active (line 26) | def test_get_orgdate_parsing_active(self):
method test_get_orgdatetime_parsing_active (line 43) | def test_get_orgdatetime_parsing_active(self):
method test_get_orgtimerange_parsing_active (line 61) | def test_get_orgtimerange_parsing_active(self):
method test_get_orgdate_parsing_inactive (line 86) | def test_get_orgdate_parsing_inactive(self):
method test_get_orgdatetime_parsing_passive (line 102) | def test_get_orgdatetime_parsing_passive(self):
method test_get_orgdate_parsing_with_list_of_texts (line 119) | def test_get_orgdate_parsing_with_list_of_texts(self):
method test_get_orgdate_parsing_with_invalid_input (line 171) | def test_get_orgdate_parsing_with_invalid_input(self):
method test_get_orgdate_parsing_with_invalid_dates (line 185) | def test_get_orgdate_parsing_with_invalid_dates(self):
method test_get_orgdate_parsing_with_utf8 (line 199) | def test_get_orgdate_parsing_with_utf8(self):
method test_get_orgdatetime_parsing_with_utf8 (line 220) | def test_get_orgdatetime_parsing_with_utf8(self):
function suite (line 245) | def suite():
FILE: tests/test_liborgdate_utf8.py
class OrgDateUtf8TestCase (line 16) | class OrgDateUtf8TestCase(unittest.TestCase):
method setlocale (line 24) | def setlocale(self, name):
method setUp (line 32) | def setUp(self):
method test_OrdDate_str_unicode_active (line 39) | def test_OrdDate_str_unicode_active(self):
method test_OrdDate_str_unicode_inactive (line 44) | def test_OrdDate_str_unicode_inactive(self):
function suite (line 49) | def suite():
FILE: tests/test_liborgdatetime.py
class OrgDateTimeTestCase (line 12) | class OrgDateTimeTestCase(unittest.TestCase):
method test_OrgDateTime_ctor_active (line 17) | def test_OrgDateTime_ctor_active(self):
method test_OrgDateTime_ctor_inactive (line 25) | def test_OrgDateTime_ctor_inactive(self):
method test_OrdDateTime_str_active (line 33) | def test_OrdDateTime_str_active(self):
method test_OrdDateTime_str_inactive (line 39) | def test_OrdDateTime_str_inactive(self):
function suite (line 46) | def suite():
FILE: tests/test_liborgtimerange.py
class OrgTimeRangeTestCase (line 12) | class OrgTimeRangeTestCase(unittest.TestCase):
method setUp (line 14) | def setUp(self):
method test_OrgTimeRange_ctor_active (line 22) | def test_OrgTimeRange_ctor_active(self):
method test_OrgTimeRange_ctor_inactive (line 32) | def test_OrgTimeRange_ctor_inactive(self):
method test_OrdDate_str_active (line 42) | def test_OrdDate_str_active(self):
method test_OrdDate_str_inactive (line 62) | def test_OrdDate_str_inactive(self):
function suite (line 82) | def suite():
FILE: tests/test_plugin_date.py
class DateTestCase (line 15) | class DateTestCase(unittest.TestCase):
method setUp (line 22) | def setUp(self):
method test_modify_time_with_None (line 25) | def test_modify_time_with_None(self):
method test_modify_time_with_dot (line 30) | def test_modify_time_with_dot(self):
method test_modify_time_with_given_relative_days (line 35) | def test_modify_time_with_given_relative_days(self):
method test_modify_time_with_given_relative_days_without_d (line 48) | def test_modify_time_with_given_relative_days_without_d(self):
method test_modify_time_with_given_relative_weeks (line 61) | def test_modify_time_with_given_relative_weeks(self):
method test_modify_time_with_given_relative_months (line 74) | def test_modify_time_with_given_relative_months(self):
method test_modify_time_with_given_relative_years (line 82) | def test_modify_time_with_given_relative_years(self):
method test_modify_time_with_given_weekday (line 91) | def test_modify_time_with_given_weekday(self):
method test_modify_time_with_month_and_day (line 109) | def test_modify_time_with_month_and_day(self):
method test_modify_time_with_time (line 122) | def test_modify_time_with_time(self):
method test_modify_time_with_full_dates (line 133) | def test_modify_time_with_full_dates(self):
method test_modify_time_with_only_days (line 152) | def test_modify_time_with_only_days(self):
method test_modify_time_with_day_and_time (line 161) | def test_modify_time_with_day_and_time(self):
function suite (line 171) | def suite():
FILE: tests/test_plugin_edit_checkbox.py
function set_vim_buffer (line 17) | def set_vim_buffer(buf=None, cursor=(2, 0), bufnr=0):
class EditCheckboxTestCase (line 26) | class EditCheckboxTestCase(unittest.TestCase):
method setUp (line 27) | def setUp(self):
method test_toggle (line 95) | def test_toggle(self):
method test_no_status_checkbox (line 127) | def test_no_status_checkbox(self):
method test_number_list (line 142) | def test_number_list(self):
method test_new_checkbox (line 150) | def test_new_checkbox(self):
method test_item_decrement (line 158) | def test_item_decrement(self):
method test_item_decrementA (line 186) | def test_item_decrementA(self):
method test_item_increment (line 196) | def test_item_increment(self):
method test_item_incrementz (line 212) | def test_item_incrementz(self):
function suite (line 238) | def suite():
FILE: tests/test_plugin_edit_structure.py
class EditStructureTestCase (line 14) | class EditStructureTestCase(unittest.TestCase):
method setUp (line 15) | def setUp(self):
method test_new_heading_below_normal_behavior (line 64) | def test_new_heading_below_normal_behavior(self):
method test_new_heading_above_normal_behavior (line 70) | def test_new_heading_above_normal_behavior(self):
method test_new_heading_below (line 76) | def test_new_heading_below(self):
method test_new_heading_below_insert_mode (line 89) | def test_new_heading_below_insert_mode(self):
method test_new_heading_below_split_text_at_the_end (line 101) | def test_new_heading_below_split_text_at_the_end(self):
method test_new_heading_below_split_text_at_the_end_insert_parts (line 114) | def test_new_heading_below_split_text_at_the_end_insert_parts(self):
method test_new_heading_below_in_the_middle (line 126) | def test_new_heading_below_in_the_middle(self):
method test_new_heading_below_in_the_middle2 (line 134) | def test_new_heading_below_in_the_middle2(self):
method test_new_heading_below_in_the_middle3 (line 142) | def test_new_heading_below_in_the_middle3(self):
method test_new_heading_below_at_the_end (line 150) | def test_new_heading_below_at_the_end(self):
method test_new_heading_above (line 158) | def test_new_heading_above(self):
method test_new_heading_above_in_the_middle (line 166) | def test_new_heading_above_in_the_middle(self):
method test_new_heading_above_in_the_middle2 (line 174) | def test_new_heading_above_in_the_middle2(self):
method test_new_heading_above_in_the_middle3 (line 182) | def test_new_heading_above_in_the_middle3(self):
method test_new_heading_above_at_the_end (line 190) | def test_new_heading_above_at_the_end(self):
method test_new_heading_below_split_heading_title (line 198) | def test_new_heading_below_split_heading_title(self):
method test_new_heading_below_split_heading_title_with_todo (line 226) | def test_new_heading_below_split_heading_title_with_todo(self):
method test_demote_heading (line 254) | def test_demote_heading(self):
method test_demote_newly_created_level_one_heading (line 266) | def test_demote_newly_created_level_one_heading(self):
method test_demote_newly_created_level_two_heading (line 286) | def test_demote_newly_created_level_two_heading(self):
method test_demote_last_heading (line 308) | def test_demote_last_heading(self):
method test_promote_heading (line 320) | def test_promote_heading(self):
method test_promote_level_one_heading (line 332) | def test_promote_level_one_heading(self):
method test_demote_parent_heading (line 339) | def test_demote_parent_heading(self):
method test_promote_parent_heading (line 350) | def test_promote_parent_heading(self):
method test_demote_parent_heading_count (line 362) | def test_demote_parent_heading_count(self):
method test_promote_parent_heading (line 375) | def test_promote_parent_heading(self):
function suite (line 386) | def suite():
FILE: tests/test_plugin_mappings.py
class MappingTestCase (line 21) | class MappingTestCase(unittest.TestCase):
method test_non_overlapping_plug_mappings (line 23) | def test_non_overlapping_plug_mappings(self):
method setUp (line 44) | def setUp(self):
function suite (line 65) | def suite():
FILE: tests/test_plugin_misc.py
class MiscTestCase (line 20) | class MiscTestCase(unittest.TestCase):
method setUp (line 21) | def setUp(self):
method test_indent_noheading (line 60) | def test_indent_noheading(self):
method test_indent_heading (line 67) | def test_indent_heading(self):
method test_indent_heading_middle (line 74) | def test_indent_heading_middle(self):
method test_indent_heading_middle2 (line 82) | def test_indent_heading_middle2(self):
method test_indent_heading_end (line 90) | def test_indent_heading_end(self):
method test_fold_heading_start (line 98) | def test_fold_heading_start(self):
method test_fold_heading_middle (line 106) | def test_fold_heading_middle(self):
method test_fold_heading_end (line 114) | def test_fold_heading_end(self):
method test_fold_heading_end_of_last_child (line 122) | def test_fold_heading_end_of_last_child(self):
method test_fold_heading_end_of_last_child_next_heading (line 131) | def test_fold_heading_end_of_last_child_next_heading(self):
method test_fold_middle_subheading (line 139) | def test_fold_middle_subheading(self):
method test_fold_middle_subheading2 (line 147) | def test_fold_middle_subheading2(self):
method test_fold_middle_subheading3 (line 155) | def test_fold_middle_subheading3(self):
function suite (line 163) | def suite():
FILE: tests/test_plugin_navigator.py
function set_visual_selection (line 16) | def set_visual_selection(visualmode, line_start, line_end, col_start=1,
class NavigatorTestCase (line 36) | class NavigatorTestCase(unittest.TestCase):
method setUp (line 37) | def setUp(self):
method test_movement (line 80) | def test_movement(self):
method test_forward_movement (line 88) | def test_forward_movement(self):
method test_backward_movement (line 135) | def test_backward_movement(self):
method test_parent_movement (line 175) | def test_parent_movement(self):
method test_next_parent_movement (line 223) | def test_next_parent_movement(self):
method test_forward_movement_visual (line 229) | def test_forward_movement_visual(self):
method test_forward_movement_visual_to_the_end_of_the_file (line 371) | def test_forward_movement_visual_to_the_end_of_the_file(self):
method test_backward_movement_visual (line 400) | def test_backward_movement_visual(self):
method test_parent_movement_visual (line 556) | def test_parent_movement_visual(self):
function suite (line 632) | def suite():
FILE: tests/test_plugin_show_hide.py
class ShowHideTestCase (line 14) | class ShowHideTestCase(unittest.TestCase):
method setUp (line 15) | def setUp(self):
method test_no_heading_toggle_folding (line 56) | def test_no_heading_toggle_folding(self):
method test_toggle_folding_first_heading_with_no_children (line 62) | def test_toggle_folding_first_heading_with_no_children(self):
method test_toggle_folding_close_one (line 83) | def test_toggle_folding_close_one(self):
method test_toggle_folding_open_one (line 94) | def test_toggle_folding_open_one(self):
method test_toggle_folding_close_multiple_all_open (line 104) | def test_toggle_folding_close_multiple_all_open(self):
method test_toggle_folding_open_multiple_all_closed (line 118) | def test_toggle_folding_open_multiple_all_closed(self):
method test_toggle_folding_open_multiple_first_level_open (line 128) | def test_toggle_folding_open_multiple_first_level_open(self):
method test_toggle_folding_open_multiple_second_level_half_open (line 143) | def test_toggle_folding_open_multiple_second_level_half_open(self):
method test_toggle_folding_open_multiple_other_second_level_half_open (line 160) | def test_toggle_folding_open_multiple_other_second_level_half_open(self):
method test_toggle_folding_open_multiple_third_level_half_open (line 177) | def test_toggle_folding_open_multiple_third_level_half_open(self):
method test_toggle_folding_open_multiple_other_third_level_half_open (line 194) | def test_toggle_folding_open_multiple_other_third_level_half_open(self):
method test_toggle_folding_open_multiple_other_third_level_half_open_second_level_half_closed (line 211) | def test_toggle_folding_open_multiple_other_third_level_half_open_seco...
method test_no_heading_toggle_folding_reverse (line 228) | def test_no_heading_toggle_folding_reverse(self):
method test_toggle_folding_first_heading_with_no_children_reverse (line 234) | def test_toggle_folding_first_heading_with_no_children_reverse(self):
method test_toggle_folding_close_one_reverse (line 255) | def test_toggle_folding_close_one_reverse(self):
method test_toggle_folding_open_one_reverse (line 265) | def test_toggle_folding_open_one_reverse(self):
method test_toggle_folding_close_multiple_all_open_reverse (line 275) | def test_toggle_folding_close_multiple_all_open_reverse(self):
method test_toggle_folding_open_multiple_all_closed_reverse (line 290) | def test_toggle_folding_open_multiple_all_closed_reverse(self):
method test_toggle_folding_open_multiple_first_level_open_reverse (line 300) | def test_toggle_folding_open_multiple_first_level_open_reverse(self):
method test_toggle_folding_open_multiple_second_level_half_open_reverse (line 314) | def test_toggle_folding_open_multiple_second_level_half_open_reverse(s...
method test_toggle_folding_open_multiple_other_second_level_half_open_reverse (line 328) | def test_toggle_folding_open_multiple_other_second_level_half_open_rev...
method test_toggle_folding_open_multiple_third_level_half_open_reverse (line 342) | def test_toggle_folding_open_multiple_third_level_half_open_reverse(se...
method test_toggle_folding_open_multiple_other_third_level_half_open_reverse (line 356) | def test_toggle_folding_open_multiple_other_third_level_half_open_reve...
method test_toggle_folding_open_multiple_other_third_level_half_open_second_level_half_closed_reverse (line 370) | def test_toggle_folding_open_multiple_other_third_level_half_open_seco...
function suite (line 384) | def suite():
FILE: tests/test_plugin_tags_properties.py
class TagsPropertiesTestCase (line 20) | class TagsPropertiesTestCase(unittest.TestCase):
method setUp (line 21) | def setUp(self):
method test_new_property (line 65) | def test_new_property(self):
method test_set_tags (line 72) | def test_set_tags(self):
method test_parse_tags_no_colons_single_tag (line 84) | def test_parse_tags_no_colons_single_tag(self):
method test_parse_tags_no_colons_multiple_tags (line 90) | def test_parse_tags_no_colons_multiple_tags(self):
method test_parse_tags_single_colon_left_single_tag (line 96) | def test_parse_tags_single_colon_left_single_tag(self):
method test_parse_tags_single_colon_left_multiple_tags (line 102) | def test_parse_tags_single_colon_left_multiple_tags(self):
method test_parse_tags_single_colon_right_single_tag (line 108) | def test_parse_tags_single_colon_right_single_tag(self):
method test_parse_tags_single_colon_right_multiple_tags (line 114) | def test_parse_tags_single_colon_right_multiple_tags(self):
method test_filter_empty_tags (line 120) | def test_filter_empty_tags(self):
method test_delete_tags (line 126) | def test_delete_tags(self):
method test_realign_tags_noop (line 143) | def test_realign_tags_noop(self):
method test_realign_tags_remove_spaces (line 148) | def test_realign_tags_remove_spaces(self):
method test_realign_tags (line 161) | def test_realign_tags(self):
function suite (line 175) | def suite():
FILE: tests/test_plugin_todo.py
class TodoTestCase (line 18) | class TodoTestCase(unittest.TestCase):
method setUp (line 21) | def setUp(self):
method test_toggle_todo_with_no_heading (line 51) | def test_toggle_todo_with_no_heading(self):
method test_todo_toggle_NOTODO (line 61) | def test_todo_toggle_NOTODO(self):
method test_toggle_todo_in_heading_with_no_todo_state_different_levels (line 68) | def test_toggle_todo_in_heading_with_no_todo_state_different_levels(se...
method test_circle_through_todo_states (line 86) | def test_circle_through_todo_states(self):
method test_circle_through_todo_states_with_more_states (line 119) | def test_circle_through_todo_states_with_more_states(self):
method test_toggle_todo_with_cursor_in_text_not_heading (line 141) | def test_toggle_todo_with_cursor_in_text_not_heading(self):
method test_get_states_without_seperator (line 157) | def test_get_states_without_seperator(self):
method test_get_states_with_seperator (line 180) | def test_get_states_with_seperator(self):
method test_get_next_state_with_no_current_state (line 229) | def test_get_next_state_with_no_current_state(self):
method test_get_next_state_backward_with_no_current_state (line 240) | def test_get_next_state_backward_with_no_current_state(self):
method test_get_next_state_with_invalid_current_state (line 254) | def test_get_next_state_with_invalid_current_state(self):
method test_get_next_state_backward_with_invalid_current_state (line 265) | def test_get_next_state_backward_with_invalid_current_state(self):
method test_get_next_state_with_current_state_equals_todo_state (line 282) | def test_get_next_state_with_current_state_equals_todo_state(self):
method test_get_next_state_backward_with_current_state_equals_todo_state (line 290) | def test_get_next_state_backward_with_current_state_equals_todo_state(...
method test_get_next_state_backward_misc (line 297) | def test_get_next_state_backward_misc(self):
method test_get_next_state_with_jump_from_todo_to_done (line 329) | def test_get_next_state_with_jump_from_todo_to_done(self):
method test_get_next_state_with_jump_from_done_to_todo (line 334) | def test_get_next_state_with_jump_from_done_to_todo(self):
method test_get_next_state_in_current_sequence (line 339) | def test_get_next_state_in_current_sequence(self):
method test_get_next_state_in_current_sequence_with_access_keys (line 346) | def test_get_next_state_in_current_sequence_with_access_keys(self):
method test_get_next_keyword_sequence (line 368) | def test_get_next_keyword_sequence(self):
function suite (line 421) | def suite():
FILE: tests/test_vimbuffer.py
class VimBufferTestCase (line 16) | class VimBufferTestCase(unittest.TestCase):
method setUp (line 17) | def setUp(self):
method test_write_heading_tags (line 61) | def test_write_heading_tags(self):
method test_write_multi_heading_bodies (line 79) | def test_write_multi_heading_bodies(self):
method test_meta_information_assign_directly (line 100) | def test_meta_information_assign_directly(self):
method test_meta_information_assign_string (line 113) | def test_meta_information_assign_string(self):
method test_meta_information_assign_multi_line_string (line 121) | def test_meta_information_assign_multi_line_string(self):
method test_meta_information_assign_one_element_array (line 129) | def test_meta_information_assign_one_element_array(self):
method test_meta_information_assign_multi_element_array (line 137) | def test_meta_information_assign_multi_element_array(self):
method test_meta_information_read_no_meta_information (line 145) | def test_meta_information_read_no_meta_information(self):
method test_meta_information_assign_empty_array (line 178) | def test_meta_information_assign_empty_array(self):
method test_meta_information_assign_empty_string (line 185) | def test_meta_information_assign_empty_string(self):
method test_bufnr (line 192) | def test_bufnr(self):
method test_write_meta_information (line 196) | def test_write_meta_information(self):
method test_write_changed_title (line 254) | def test_write_changed_title(self):
method test_write_changed_body (line 279) | def test_write_changed_body(self):
method test_write_shortened_body (line 305) | def test_write_shortened_body(self):
method test_write_lengthened_body (line 330) | def test_write_lengthened_body(self):
method test_write_delete_heading (line 355) | def test_write_delete_heading(self):
method test_write_delete_first_heading (line 391) | def test_write_delete_first_heading(self):
method test_write_delete_last_heading (line 426) | def test_write_delete_last_heading(self):
method test_write_delete_multiple_headings (line 470) | def test_write_delete_multiple_headings(self):
method test_write_add_heading (line 529) | def test_write_add_heading(self):
method test_write_add_heading_before_first_heading (line 552) | def test_write_add_heading_before_first_heading(self):
method test_write_add_heading_after_last_heading_toplevel (line 586) | def test_write_add_heading_after_last_heading_toplevel(self):
method test_write_add_heading_after_last_heading_subheading (line 620) | def test_write_add_heading_after_last_heading_subheading(self):
method test_write_replace_one_heading (line 661) | def test_write_replace_one_heading(self):
method test_write_replace_multiple_headings_with_one_heading (line 703) | def test_write_replace_multiple_headings_with_one_heading(self):
method test_write_replace_multiple_headings_with_a_multiple_heading_structure (line 733) | def test_write_replace_multiple_headings_with_a_multiple_heading_struc...
method test_dom (line 782) | def test_dom(self):
method test_index_boundaries (line 799) | def test_index_boundaries(self):
method test_heading_start_and_end (line 820) | def test_heading_start_and_end(self):
method test_first_heading (line 882) | def test_first_heading(self):
method test_heading_in_the_middle (line 907) | def test_heading_in_the_middle(self):
method test_previous_headings (line 920) | def test_previous_headings(self):
class VimBufferTagsTestCase (line 953) | class VimBufferTagsTestCase(unittest.TestCase):
method setUp (line 954) | def setUp(self):
method test_tag_read_no_word_with_tags (line 1004) | def test_tag_read_no_word_with_tags(self):
method test_tag_read_one_word_with_tags (line 1010) | def test_tag_read_one_word_with_tags(self):
method test_tag_read_TODO_with_tags (line 1016) | def test_tag_read_TODO_with_tags(self):
method test_tag_read_one (line 1022) | def test_tag_read_one(self):
method test_tag_read_multiple (line 1027) | def test_tag_read_multiple(self):
method test_tag_no_tags (line 1032) | def test_tag_no_tags(self):
method test_tag_read_space_and_tab_separated (line 1039) | def test_tag_read_space_and_tab_separated(self):
method test_tag_read_tab_separated (line 1044) | def test_tag_read_tab_separated(self):
method test_tag_read_long_title (line 1049) | def test_tag_read_long_title(self):
method test_tag_read_long_title_plus_todo_state (line 1055) | def test_tag_read_long_title_plus_todo_state(self):
method test_tag_del_tags (line 1064) | def test_tag_del_tags(self):
method test_tag_replace_one_tag (line 1079) | def test_tag_replace_one_tag(self):
method test_tag_replace_multiple_tags (line 1095) | def test_tag_replace_multiple_tags(self):
class VimBufferTodoTestCase (line 1111) | class VimBufferTodoTestCase(unittest.TestCase):
method setUp (line 1112) | def setUp(self):
method test_no_space_after_upper_case_single_word_heading (line 1163) | def test_no_space_after_upper_case_single_word_heading(self):
method test_todo_read_TODO (line 1177) | def test_todo_read_TODO(self):
method test_todo_read_TODO_NOTODO (line 1182) | def test_todo_read_TODO_NOTODO(self):
method test_todo_read_WAITING (line 1187) | def test_todo_read_WAITING(self):
method test_todo_read_DONE (line 1192) | def test_todo_read_DONE(self):
method test_todo_read_special (line 1197) | def test_todo_read_special(self):
method test_todo_del_todo (line 1210) | def test_todo_del_todo(self):
method test_todo_write_todo_uppercase (line 1226) | def test_todo_write_todo_uppercase(self):
method test_todo_set_illegal_todo (line 1242) | def test_todo_set_illegal_todo(self):
function suite (line 1252) | def suite():
FILE: tests/vim.py
class VimWindow (line 4) | class VimWindow(object):
method __init__ (line 7) | def __init__(self, test):
method buffer (line 12) | def buffer():
class VimBuffer (line 22) | class VimBuffer(list):
method __init__ (line 23) | def __init__(self, iterable=None):
method append (line 30) | def append(self, o):
class VimTest (line 41) | class VimTest(object):
method __init__ (line 44) | def __init__(self):
method buffer (line 49) | def buffer():
function eval (line 70) | def eval(cmd):
function command (line 83) | def command(cmd):
Condensed preview — 81 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (661K chars).
[
{
"path": ".gitignore",
"chars": 45,
"preview": "*.pyc\n*.swp\ntags\n.ropeproject\n.cover*\ncover*\n"
},
{
"path": ".pylintrc",
"chars": 6991,
"preview": "[MASTER]\n\n# Specify a configuration file.\n#rcfile=\n\n# Python code to execute, usually for sys.path manipulation such as\n"
},
{
"path": ".travis.yml",
"chars": 400,
"preview": "language: python\n\nbefore_install:\n - sudo apt-get update && sudo apt-get --reinstall install -qq language-pack-pt\n\npy"
},
{
"path": "CHANGELOG.org",
"chars": 10720,
"preview": "* Changelog\n All notable changes to this project will be documented in this file.\n\n This log is kept according to the "
},
{
"path": "LICENSE",
"chars": 2644,
"preview": "---------------------------------------------------------------------\nAll source code is licensed under the terms of the"
},
{
"path": "Makefile",
"chars": 2768,
"preview": "PLUGIN = orgmode\nPREFIX = /usr/local\nVIMDIR = $(PREFIX)/share/vim\n\nall: build\n\nbuild:\n\n# install plugin at destination\ni"
},
{
"path": "README.org",
"chars": 1977,
"preview": "* Vim-OrgMode\n\n #+ATTR_HTML: title=\"Join the chat at https://gitter.im/jceb/vim-orgmode\"\n [[https://gitter.im/jceb/vim"
},
{
"path": "doc/orgguide.txt",
"chars": 62901,
"preview": "*orgguide.txt* For Vim version 7.3 Last change: 2019 December 13\n\n _ _ ____ __ __ _____ ____"
},
{
"path": "examples/mylife.org",
"chars": 689,
"preview": "* My Life in plain text\n - [X] birth\n - [-] life [50%]\n - [X] use vim\n - [ ] get everything else done\n* "
},
{
"path": "examples/plugins/PluginExample.py",
"chars": 1428,
"preview": "# -*- coding: utf-8 -*-\n\nfrom orgmode import echo, echom, echoe, ORGMODE, apply_count, repeat\nfrom orgmode.menu import S"
},
{
"path": "ftdetect/org.vim",
"chars": 111,
"preview": "autocmd BufNewFile,BufRead *.org setfiletype org\n\"autocmd BufNewFile,BufReadPost org:todo* setfiletype orgtodo\n"
},
{
"path": "ftplugin/org.cnf",
"chars": 216,
"preview": "--langdef=org\n--langmap=org:.org\n--regex-org=/^(\\*+)[[:space:]]+(.*)([[:space:]]+:[^\\t ]*:)?$/\\1 \\2/s,sections/\n--regex-"
},
{
"path": "ftplugin/org.vim",
"chars": 5164,
"preview": "\" org.vim -- Text outlining and task management for Vim based on Emacs' Org-Mode\n\" @Author : Jan Christoph Ebersba"
},
{
"path": "ftplugin/orgmode/__init__.py",
"chars": 24,
"preview": "# -*- coding: utf-8 -*-\n"
},
{
"path": "ftplugin/orgmode/_vim.py",
"chars": 12667,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n VIM ORGMODE\n ~~~~~~~~~~~~\n\n TODO\n\"\"\"\n\ntry:\n import importlib\n USE_DEPRECATE"
},
{
"path": "ftplugin/orgmode/docs/Makefile",
"chars": 8068,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "ftplugin/orgmode/docs/conf.py",
"chars": 12125,
"preview": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# orgmode documentation build configuration file, created by\n# sphinx-q"
},
{
"path": "ftplugin/orgmode/docs/index.rst",
"chars": 436,
"preview": ".. orgmode documentation master file, created by\n sphinx-quickstart on Sat May 21 16:35:00 2016.\n You can adapt this"
},
{
"path": "ftplugin/orgmode/docs/make.bat",
"chars": 7734,
"preview": "@ECHO OFF\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\n"
},
{
"path": "ftplugin/orgmode/docs/orgmode.liborgmode.rst",
"chars": 1585,
"preview": "orgmode.liborgmode package\n==========================\n\nSubmodules\n----------\n\norgmode.liborgmode.agenda module\n---------"
},
{
"path": "ftplugin/orgmode/docs/orgmode.plugins.rst",
"chars": 2178,
"preview": "orgmode.plugins package\n=======================\n\nSubmodules\n----------\n\norgmode.plugins.Agenda module\n------------------"
},
{
"path": "ftplugin/orgmode/docs/orgmode.py3compat.rst",
"chars": 1007,
"preview": "orgmode.py3compat package\n=========================\n\nSubmodules\n----------\n\norgmode.py3compat.encode_compatibility modul"
},
{
"path": "ftplugin/orgmode/docs/orgmode.rst",
"chars": 1107,
"preview": "orgmode package\n===============\n\nSubpackages\n-----------\n\n.. toctree::\n\n orgmode.liborgmode\n orgmode.plugins\n o"
},
{
"path": "ftplugin/orgmode/exceptions.py",
"chars": 495,
"preview": "# -*- coding: utf-8 -*-\n\n\nclass PluginError(BaseException):\n def __init__(self, message):\n BaseException.__ini"
},
{
"path": "ftplugin/orgmode/keybinding.py",
"chars": 6344,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nMODE_ALL = u'a'\nMODE_NORMAL = u'n'\nMODE_VISUAL = u'v'\nMODE_INSERT = u'i'\nMODE_OPERA"
},
{
"path": "ftplugin/orgmode/liborgmode/__init__.py",
"chars": 24,
"preview": "# -*- coding: utf-8 -*-\n"
},
{
"path": "ftplugin/orgmode/liborgmode/agenda.py",
"chars": 3106,
"preview": "# -*- coding: utf-8 -*-\n\nu\"\"\"\n Agenda\n ~~~~~~~~~~~~~~~~~~\n\n The agenda is one of the main concepts of orgmode. "
},
{
"path": "ftplugin/orgmode/liborgmode/agendafilter.py",
"chars": 2369,
"preview": "# -*- coding: utf-8 -*-\n\nu\"\"\"\n agendafilter\n ~~~~~~~~~~~~~~~~\n\n AgendaFilter contains all the filters that can "
},
{
"path": "ftplugin/orgmode/liborgmode/base.py",
"chars": 5467,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n base\n ~~~~~~~~~~\n\n Here are some really basic data structures that are used throu"
},
{
"path": "ftplugin/orgmode/liborgmode/checkboxes.py",
"chars": 12270,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n checkboxes\n ~~~~~~~~~~\n\n TODO: explain this :)\n\"\"\"\n\nimport re\ntry:\n from colle"
},
{
"path": "ftplugin/orgmode/liborgmode/documents.py",
"chars": 9975,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n documents\n ~~~~~~~~~\n\n TODO: explain this :)\n\"\"\"\n\ntry:\n from collections impor"
},
{
"path": "ftplugin/orgmode/liborgmode/dom_obj.py",
"chars": 15809,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n dom object\n ~~~~~~~~~~\n\n TODO: explain this :)\n\"\"\"\n\nimport re\nfrom orgmode.liborg"
},
{
"path": "ftplugin/orgmode/liborgmode/headings.py",
"chars": 31909,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n headings\n ~~~~~~~~~\n\n TODO: explain this :)\n\"\"\"\n\nimport re\n\nimport vim\nfrom orgmo"
},
{
"path": "ftplugin/orgmode/liborgmode/orgdate.py",
"chars": 10285,
"preview": "# -*- coding: utf-8 -*-\nu\"\"\"\n OrgDate\n ~~~~~~~~~~~~~~~~~~\n\n This module contains all date/time/timerange repres"
},
{
"path": "ftplugin/orgmode/menu.py",
"chars": 5169,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode.keybinding import Command, Plug, Keybinding\nfrom orgmode.keybinding im"
},
{
"path": "ftplugin/orgmode/plugins/Agenda.py",
"chars": 11902,
"preview": "# -*- coding: utf-8 -*-\n\nfrom datetime import date\nimport os\nimport glob\n\nimport vim\n\nfrom orgmode._vim import ORGMODE, "
},
{
"path": "ftplugin/orgmode/plugins/Date.py",
"chars": 11671,
"preview": "# -*- coding: utf-8 -*-\nimport re\nfrom datetime import timedelta, date, datetime\n\nimport operator\n\nimport vim\n\nfrom orgm"
},
{
"path": "ftplugin/orgmode/plugins/EditCheckbox.py",
"chars": 12150,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\nfrom orgmode._vim import echo, echom, echoe, ORGMODE, apply_count, repeat, insert_at"
},
{
"path": "ftplugin/orgmode/plugins/EditStructure.py",
"chars": 21483,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode._vim import ORGMODE, apply_count, repeat, realign_tags\nfrom orgmode im"
},
{
"path": "ftplugin/orgmode/plugins/Export.py",
"chars": 6178,
"preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\nimport vim\n\nfrom orgmode._vim import ORGMODE, echoe, echom\nfrom or"
},
{
"path": "ftplugin/orgmode/plugins/Hyperlinks.py",
"chars": 8102,
"preview": "# -*- coding: utf-8 -*-\n\nimport re\n\nimport vim\n\nfrom orgmode._vim import echom, ORGMODE, realign_tags\nfrom orgmode.menu "
},
{
"path": "ftplugin/orgmode/plugins/LoggingWork.py",
"chars": 1332,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode._vim import echo, echom, echoe, ORGMODE, apply_count, repeat\nfrom orgm"
},
{
"path": "ftplugin/orgmode/plugins/Misc.py",
"chars": 9122,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode._vim import ORGMODE, apply_count\nfrom orgmode.menu import Submenu\nfrom"
},
{
"path": "ftplugin/orgmode/plugins/Navigator.py",
"chars": 15300,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode._vim import echo, ORGMODE, apply_count\nfrom orgmode.menu import Submen"
},
{
"path": "ftplugin/orgmode/plugins/ShowHide.py",
"chars": 7058,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode.liborgmode.headings import Heading\nfrom orgmode._vim import ORGMODE, a"
},
{
"path": "ftplugin/orgmode/plugins/TagsProperties.py",
"chars": 7068,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nfrom orgmode._vim import ORGMODE, repeat\nfrom orgmode.menu import Submenu, ActionEn"
},
{
"path": "ftplugin/orgmode/plugins/Todo.py",
"chars": 14220,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\nimport re\nimport itertools as it\n\nfrom orgmode._vim import echom, ORGMODE, apply_cou"
},
{
"path": "ftplugin/orgmode/plugins/__init__.py",
"chars": 24,
"preview": "# -*- coding: utf-8 -*-\n"
},
{
"path": "ftplugin/orgmode/py3compat/__init__.py",
"chars": 24,
"preview": "# -*- coding: utf-8 -*-\n"
},
{
"path": "ftplugin/orgmode/py3compat/encode_compatibility.py",
"chars": 267,
"preview": "import sys\nif sys.version_info < (3,):\n def u_encode(string):\n return string.encode('utf8')\n def u_decode(s"
},
{
"path": "ftplugin/orgmode/py3compat/py_py3_string.py",
"chars": 330,
"preview": "import sys\nfrom string import Formatter\n\n\nif sys.version_info < (3,):\n VIM_PY_CALL = u':py'\nelse:\n VIM_PY_CALL = u"
},
{
"path": "ftplugin/orgmode/py3compat/unicode_compatibility.py",
"chars": 66,
"preview": "try:\n unicode\nexcept NameError:\n basestring = unicode = str\n"
},
{
"path": "ftplugin/orgmode/py3compat/xrange_compatibility.py",
"chars": 66,
"preview": "try:\n from __builtin__ import xrange as range\nexcept:\n pass\n"
},
{
"path": "ftplugin/orgmode/settings.py",
"chars": 3095,
"preview": "# -*- coding: utf-8 -*-\n\nimport vim\n\nimport sys\nfrom orgmode.py3compat.encode_compatibility import *\nfrom orgmode.py3com"
},
{
"path": "ftplugin/orgmode/vimbuffer.py",
"chars": 19079,
"preview": "# -*- coding: utf-8 -*-\n\n\"\"\"\n vimbuffer\n ~~~~~~~~~~\n\n VimBuffer and VimBufferContent are the interface between "
},
{
"path": "indent/org.vim",
"chars": 2979,
"preview": "\" Delete the next line to avoid the special indention of items\nif !exists(\"g:org_indent\")\n let g:org_indent = 0\nendif\n\n"
},
{
"path": "syntax/org.vim",
"chars": 16781,
"preview": "if exists(\"b:current_syntax\")\n finish\nendif\n\n\" Support org authoring markup as closely as possible\n\" (we're adding tw"
},
{
"path": "syntax/orgagenda.vim",
"chars": 3154,
"preview": "\" TODO do we really need a separate syntax file for the agenda?\n\" - Most of the stuff here is also in syntax.org\n\" "
},
{
"path": "syntax/orgtodo.vim",
"chars": 1434,
"preview": "if exists(\"b:current_syntax\")\n finish\nendif\n\nsyn match org_todo_key /\\[\\zs[^]]*\\ze\\]/\nhi def link org_todo_key Identi"
},
{
"path": "tests/orgmode_testfile.org",
"chars": 496,
"preview": "\n* bold, italics and underline syntax matching\n** Should match:\n\n*foo* *foo* \n*Really, quite long sentence*.\n_foo_ _fo"
},
{
"path": "tests/run_tests.py",
"chars": 1643,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\n\nimport test_vimbuffer\n\nimport test_libagendafilter\nimpor"
},
{
"path": "tests/test_libagendafilter.py",
"chars": 7148,
"preview": "# -*- coding: utf-8 -*-\n\n\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport unittest\nfrom datetime import date\nfrom dat"
},
{
"path": "tests/test_libbase.py",
"chars": 952,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nfrom orgmode.liborgmode.base import"
},
{
"path": "tests/test_libcheckbox.py",
"chars": 4439,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\nfrom orgmode.liborgmode."
},
{
"path": "tests/test_libheading.py",
"chars": 6090,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nfrom orgmode.liborgmode.headings i"
},
{
"path": "tests/test_liborgdate.py",
"chars": 1499,
"preview": "# -*- coding: utf-8 -*-\n\n\nimport sys\nimport unittest\nfrom datetime import date\n\nsys.path.append(u'../ftplugin')\nfrom org"
},
{
"path": "tests/test_liborgdate_parsing.py",
"chars": 9726,
"preview": "# -*- coding: utf-8 -*-\n\n\nimport sys\nimport unittest\n\nsys.path.append(u'../ftplugin')\nfrom orgmode.liborgmode.orgdate im"
},
{
"path": "tests/test_liborgdate_utf8.py",
"chars": 1453,
"preview": "# -*- coding: utf-8 -*-\n\nimport sys\nimport unittest\nimport locale\nimport threading\n\nfrom datetime import date\nfrom conte"
},
{
"path": "tests/test_liborgdatetime.py",
"chars": 1578,
"preview": "# -*- coding: utf-8 -*-\n\nimport sys\nimport unittest\nfrom datetime import datetime\n\nsys.path.append(u'../ftplugin')\nfrom "
},
{
"path": "tests/test_liborgtimerange.py",
"chars": 2850,
"preview": "# -*- coding: utf-8 -*-\n\nimport sys\nimport unittest\nfrom datetime import date\nfrom datetime import datetime\n\nsys.path.ap"
},
{
"path": "tests/test_plugin_date.py",
"chars": 6551,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin"
},
{
"path": "tests/test_plugin_edit_checkbox.py",
"chars": 8752,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nfrom orgmode._vim impor"
},
{
"path": "tests/test_plugin_edit_structure.py",
"chars": 20781,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nfrom orgmode._vim impor"
},
{
"path": "tests/test_plugin_mappings.py",
"chars": 2513,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport unitt"
},
{
"path": "tests/test_plugin_misc.py",
"chars": 5837,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nf"
},
{
"path": "tests/test_plugin_navigator.py",
"chars": 23125,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nfrom orgmode._vim impor"
},
{
"path": "tests/test_plugin_show_hide.py",
"chars": 18121,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nfrom orgmode._vim impor"
},
{
"path": "tests/test_plugin_tags_properties.py",
"chars": 7860,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nf"
},
{
"path": "tests/test_plugin_todo.py",
"chars": 17411,
"preview": "# -*- coding: utf-8 -*-\n\n\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport unittest\nfrom orgmode.liborgmode.base impor"
},
{
"path": "tests/test_vimbuffer.py",
"chars": 62007,
"preview": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.append(u'../ftplugin')\n\nimport vim\n\nfrom orgmode.liborgmode"
},
{
"path": "tests/vim.py",
"chars": 1860,
"preview": "# -*- coding: utf-8 -*-\n\n\nclass VimWindow(object):\n u\"\"\" Docstring for VimWindow \"\"\"\n\n def __init__(self, test):\n "
}
]
About this extraction
This page contains the full source code of the jceb/vim-orgmode GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 81 files (617.0 KB), approximately 158.5k tokens, and a symbol index with 757 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.