diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index e3a179a..0000000 --- a/INSTALL.txt +++ /dev/null @@ -1,82 +0,0 @@ -Installation instructions for VimOrganizer v. 0.30, November 2011 -================================================================= - -1. Install VimOrganizer files as you would any other ftplugin, with downloaded -files going in their respective directories under your .vim (Linux/Mac) -or vimfiles (Windows) directory. - -2. Run helptags on the help file in the /doc directory, vimorg.txt, -so help items can be accessed using the Vim help system. - -3. Make sure your vimrc has these lines: -------------------------------------- - filetype plugin indent on - - [...and then somewhere below that:] - - au! BufRead,BufWrite,BufWritePost,BufNewFile *.org - au BufEnter *.org call org#SetOrgFileType() ------------------------------------- - -If you use VimOrganizer much you will also want to configure variables -and/or functions in your vimrc. A sample vimrc has been included -in the download. - -ALSO, you will want to install the plugins listed below. VimOrganizer -will work without them, but some functionality will be unavailable: - -4. Make sure you have Calendar.vim installed. - (Calendar.vim comes included in the /plugin/ directory as part of - the Vim runtime in some Vim installs, otherwise available at: - http://www.vim.org/scripts/script.php?script_id=52) - -Second, here are two plugins that you will want to download to -take advantage of Org-mode-like narrowing and link features that have been built -into VimOrganizer: - -5. Christian Brabandt's NarrowRegion plugin. Find and install it from here: - http://www.vim.org/scripts/script.php?script_id=3075 -6. The Utl "Universal Text Linking" plugin. Find and install it from here: - http://www.vim.org/scripts/script.php?script_id=293 - -If you are running on Windows another plugin will be useful: - -7. If you're running on Windows then you may want to get Peter Rodding's - shell.vim plugin. It's not necessary, but if you have installed - it VimOrganizer will use it to ensure that you don't see - the annoying Windows command prompt window pop up when VimOrganizer - calls out to Emacs/Org-mode. - http://www.vim.org/scripts/script.php?script_id=3123 - -8. FINALLY, install Emacs. Not necessary for basic outlining, agenda -searches, and other basic stuff, but it is necessary to do exports -to html and PDF (which you will definitely want) as well as other -advanced stuff. Don't be afraid, install is simply and configuration -is not hard. Find Emacs here: -http://www.gnu.org/software/emacs/ - -Vimorg uses a variable, g:org_command_for_emacsclient, to hold the -command that will start the emacsclient on your system. If you are -not on Linux or OSX you will need to set this explicitly in your -vimrc file. - -Also, please note that emacsclient works slightly differently on -Windows and Linux/OSX systems. You must manually start -Emacs on Linux/OSX or calls to emacsclient will not work. Please see -:h vimorg-emacs-setup - -For Emacs you should also install a hook function in the .emacs file, -which will automatically make minor conversions when you export and/or -open a VimOrganizer .org file in Emacs. You can find the text for that -function in the VimOrganizer help file: -:h vimorg-orgmode-conversion - -If you're scared of Emacs, don't worry. You don't ever need to edit -a document using Emacs. The most you will need to do is open up -the .emacs configuration file (in Vim) to make some configuration -changes, and that is required only if you're doing more advanced stuff. -Having said, that, if there are problems it can sometimes be easiest to -open Emacs and diagnose an issue there. Still, you don't ever need -to edit a document in Emacs, just think of Emacs as your "application -server". - diff --git a/README.md b/README.md index 23b97f8..0ebc164 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ # org-mode for SpaceVim -This plugin is a fork of VimOrganizer +> This plugin is a fork of VimOrganizer + +## Install + +```toml +[[layers]] + name = 'lang#org' +``` diff --git a/VimOrganizerCheatsheet.org b/VimOrganizerCheatsheet.org deleted file mode 100755 index 2edc7fd..0000000 --- a/VimOrganizerCheatsheet.org +++ /dev/null @@ -1,113 +0,0 @@ -* VimOrganizer CheatSheet -** TODO Outline Navigation - :home:work: - abc - TAB cycle visibilty of single headline/subtree - - Shift-TAB cycle visibility of entire outline - - ,1 show level 1 heads only - - ,2 show up to level 2 headings - - ... - - ,,3 show up to level 3 heads for current heading only - - ,,5 show up to level 5 heads for current heading only - . . . -** Basic Outline Editing - Name your file with a '.org' extension and then just start adding - headings with asterisks to indicate heading level. NOTE: asterisks must - be in the leftmost column and must be separated from heading text by a - space. This document is an example showing headings, subheadings, - and text underneath each. -*** Adding new headlines -**** TODO Enter, shift+Enter - add another headline of same level - works only in normal mode -**** Ctrl+Enter - add another headline of lower-level -**** DONE Ctrl+Shift+Enter - add another headline of higher-level -** TODO Time Stamps/Date-time prompt - The following commands may be issued anywhere within a headline and will - enter or edit the corresponding date for the headline. One date of - each type may be defined per headline (i.e, 'deadline', 'scheduled', - 'closed', and 'regular'. You can enter more dates anywhere you want, but - this editing mechanism is currently restricted to dealing with only these - "primary" dates. - - enter DEADLINE date for headline ,dd - enter SCHEDULED date for headline ,ds - enter CLOSED date for headline ,dc - enter regular date TIMESTAMP (i.e., no indicator) for headline - ,dt - enter timestamp into text ,dg - - The command-line prompt and calendar that appear when you enter a ,d - command operate nearly the same as the date-time prompt in Emacs' - Org-mode. A few options are not yet implemented (e.g., the 'w'eek - options), but most should work just the same. For excellent documentation - on Org-mode's date-time prompt see: - :http://orgmode.org/manual/The-date_002ftime-prompt.html#The-date_002ftime-prompt -** Agenda Dashboard - Type ,ag to bring up the Agenda Dashboard, which allows you to launch - some searches. -** Set Agenda Files - Agenda files are held in a list: g:agenda_files. You can enter values for - g:agenda_files in your vimrc, e.g., - - :let g:agenda_files = ['myfile.org','c:/path/myfile.org'] - - You can also use Vimscript to assign multiple files at a time to - g:agenda_files. For example, putting the line below in your vimrc would - put all .org files in the org_files directory into g:agenda_files: - - :let g:agenda_files = split(glob("~\desktop\org_files\*.org"),"\n") - - User Interface for runtime editing of g:agenda_files: - - There is a also a bare-bones agenda-editing mechanism that works like this: - (1) Put your .org working directories in list g:agenda_dirs. Mine is in my - vimrc and looks like this: - - :let g:agenda_dirs=["c:/users/herbert/documents/my\ dropbox","c:/users/herbert/desktop/org_Files"] - - (2) Then to edit your agenda files issue this command - - :call EditAgendaFiles() - - This will open a new tab and show your current agenda files along with a list - of all org files in your agenda dirs. Simply copy or move lines from the - agenda dirs list to the top and when done press :W (that's a capital 'W'). - Order of agenda files is sometimes important, e.g., it is used when ordering - some agenda results. - -** Tags - Tags for a file are defined using the SetupTags() function. There is an - example in the project's vimrc file. General structure of the - tag-setup-string is: (1) tags followed by the single-key access in parens, - (2) curly brackets (i.e., {} ) around sets of tags that are mutually exclusive. - For now you must place the single-key-access parens with character after the - tag, no letter is automatically assigned. The tags set up by SetupTags() are - used in the menu accessed by ,et . - - edit tags -- ,et - view items with tag in agenda -- double-click tag, - - (Note: The 'RunSearch' searches below can all be entered now - by accessing Agenda Dashboard (,ag) and pressing 'm') - view entries having both tag1 and tag2: - :call RunSearch('+tag1+tag2') - view entries having tag1 but not tag2: - :call RunSearch('+tag1-tag2') - view entries having tag1 or tag2: - :call RunSearch('+tag1|tag2') - view entries having tag1 that are also TODO: - :call RunSearch('+TODO+tag1') - view entries having tag1 that are also DONE: - :call RunSearch('+DONE+tag1') - view entries having tag1 that have any todo: - :call RunSearch('+ANY_TODO+tag1') - diff --git a/_vimrc b/_vimrc deleted file mode 100644 index bb70b2b..0000000 --- a/_vimrc +++ /dev/null @@ -1,180 +0,0 @@ -" This is an example vimrc that should work for testing purposes. -" Integrate the VimOrganizer specific sections into your own -" vimrc if you wish to use VimOrganizer on a regular basis. . . - -"=================================================================== -" THE NECESSARY STUFF -" The three lines below are necessary for VimOrganizer to work right -" ================================================================== -let g:ft_ignore_pat = '\.org' -filetype plugin indent on -" and then put these lines in vimrc somewhere after the line above -au! BufRead,BufWrite,BufWritePost,BufNewFile *.org -au BufEnter *.org call org#SetOrgFileType() -" let g:org_capture_file = '~/org_files/mycaptures.org' -command! OrgCapture :call org#CaptureBuffer() -command! OrgCaptureFile :call org#OpenCaptureFile() -syntax on - -"============================================================== -" THE UNNECESSARY STUFF -"============================================================== -" Everything below here is a customization. None are needed. -"============================================================== - -" The variables below are used to define the default Todo list and -" default Tag list. Both of these can also be defined -" on a document-specific basis by config lines in a file. -" See :h vimorg-todo-metadata and/or :h vimorg-tag-metadata -" 'TODO | DONE' is the default, so not really necessary to define it at all -let g:org_todo_setup='TODO | DONE' -" OR, e.g.,: -"let g:org_todo_setup='TODO NEXT STARTED | DONE CANCELED' - -" include a tags setup string if you want: -let g:org_tags_alist='{@home(h) @work(w) @tennisclub(t)} {easy(e) hard(d)} {computer(c) phone(p)}' -" -" g:org_agenda_dirs specify directories that, along with -" their subtrees, are searched for list of .org files when -" accessing EditAgendaFiles(). Specify your own here, otherwise -" default will be for g:org_agenda_dirs to hold single -" directory which is directory of the first .org file opened -" in current Vim instance: -" Below is line I use in my Windows install: -" NOTE: case sensitive even on windows. -let g:org_agenda_select_dirs=["~/desktop/org_files"] -let g:org_agenda_files = split(glob("~/desktop/org_files/org-mod*.org"),"\n") - -" ---------------------- -" Emacs setup -" ---------------------- -" To use Emacs you will need to define the client. On -" Linux/OSX this is typically simple, just: -"let g:org_command_for_emacsclient = 'emacsclient' -" -" On Windows it is more complicated, and probably involves creating -" a 'soft link' to the emacsclient executable (which is 'emacsclientw') -" See :h vimorg-emacs-setup -"let g:org_command_for_emacsclient = 'c:\users\herbert\emacsclientw.exe' - -" ---------------------- -" Custom Agenda Searches -" ---------------------- -" The assignment to g:org_custom_searches below defines searches that a -" a user can then easily access from the Org menu or the Agenda Dashboard. -" (Still need to add help on how to define them, assignment below -" is hopefully illustrative for now. . . . ) -let g:org_custom_searches = [ - \ { 'name':"Next week's agenda", 'type':'agenda', - \ 'agenda_date':'+1w', 'agenda_duration':'w' } - \, { 'name':"Next week's TODOS", 'type':'agenda', - \ 'agenda_date':'+1w', 'agenda_duration':'w', - \ 'spec':'+UNFINISHED_TODOS' } - \, { 'name':'Home tags', 'type':'heading_list', 'spec':'+HOME' } - \, { 'name':'Home tags', 'type':'sparse_tree', 'spec':'+HOME' } - \ ] - -" -------------------------------- -" Custom colors -" --------------------------------" -" OrgCustomColors() allows a user to set highlighting for particular items -function! OrgCustomColors() - " Various text item 'highlightings' below - " are the defaults. Uncomment and change a line if you - " want different highlighting for the element. - " - " Below are defaults for any TODOS you define. TODOS that - " come before the | in a definition will use 'NOTDONETODO' - " and those that come after are DONETODO - "hi! DONETODO guifg=green ctermfg=green - "hi! NOTDONETODO guifg=red ctermfg=lightred - - " Heading level highlighting is done in pairs, one for the - " heading when unfolded and one for folded. Default is to make - " them the same except for the folded version being bold: - " assign OL1 pair for level 1, OL2 pair for level 2, etc. - "hi! OL1 guifg=somecolor guibg=somecolor - "hi! OL1Folded guifg=somecolor guibg=somecolor gui=bold - - - " Tags are lines below headings that have :colon:separated:tags: - "hi! Org_Tag guifg=lightgreen ctermfg=blue - - " Lines that begin with '#+' in column 0 are config lines - "hi! Org_Config_Line guifg=darkgray ctermfg=magenta - - " Drawers are :PROPERTIES: and :LOGBOOK: lines and their associated - " :END: lines - "hi! Org_Drawer guifg=pink ctermfg=magenta - "hi! Org_Drawer_Folded guifg=pink ctermfg=magenta gui=bold cterm=bold - - " This applies to value names in :PROPERTIES: blocks - "hi! Org_Property_Value guifg=pink ctermfg=magenta - - " Three lines below apply to different kinds of blocks - "hi! Org_Block guifg=#555555 ctermfg=magenta - "hi! Org_Src_Block guifg=#555555 ctermfg=magenta - "hi! Org_Table guifg=#888888 guibg=#333333 ctermfg=magenta - - " Dates are date specs between angle brackets (<>) or square brackets ([]) - "hi! Org_Date guifg=magenta ctermfg=magenta gui=underline cterm=underline - - " Org_Star is used to "hide" initial asterisks in a heading - "hi! Org_Star guifg=#444444 ctermfg=darkgray - - "hi! Props guifg=#ffa0a0 ctermfg=gray - - " Bold, italics, underline, and code are highlights applied - " to character formatting - "hi! Org_Code guifg=darkgray gui=bold ctermfg=14 - "hi! Org_Itals gui=italic guifg=#aaaaaa ctermfg=lightgray - "hi! Org_Bold gui=bold guifg=#aaaaaa ctermfg=lightgray - "hi! Org_Underline gui=underline guifg=#aaaaaa ctermfg=lightgray - "hi! Org_Lnumber guifg=#999999 ctermfg=gray - - " These lines apply to links: [[link]], and [[link][link desc]] - "if has("conceal") - " hi! default linkends guifg=blue ctermfg=blue - "endif - "hi! Org_Full_Link guifg=cyan gui=underline ctermfg=lightblue cterm=underline - "hi! Org_Half_Link guifg=cyan gui=underline ctermfg=lightblue cterm=underline - - " Applies to the Heading line that can be displayed in column view - "highlight OrgColumnHeadings guibg=#444444 guifg=#aaaaaa gui=underline - - " Use g:org_todo_custom_highlights to set up highlighting for individual - " TODO items. Without this all todos that designate an unfinished state - " will be highlighted using NOTDONETODO highlight (see above) - " and all todos that designate a finished state will be highlighted using - " the DONETODO highlight (see above). - let g:org_todo_custom_highlights = - \ { 'NEXT': { 'guifg':'#888888', 'guibg':'#222222', - \ 'ctermfg':'gray', 'ctermbg':'darkgray'}, - \ 'WAITING': { 'guifg':'#aa3388', - \ 'ctermfg':'red' } } - -endfunction - -" Below are two examples of Org-mode "hook" functions -" These present opportunities for end-user customization -" of how VimOrganizer works. For more info see the -" documentation for hooks in Emacs' Org-mode documentation: -" http://orgmode.org/worg/org-configs/org-hooks.php#sec-1_40 -" -" These two hooks are currently the only ones enabled in -" the VimOrganizer codebase, but they are easy to add so if -" there's a particular hook you want go ahead and request it -" or look for where these hooks are implemented in -" /ftplugin/org.vim and use them as example for placing your -" own hooks in VimOrganizer: -function! Org_property_changed_functions(line,key, val) - "call confirm("prop changed: ".a:line."--key:".a:key." val:".a:val) -endfunction -function! Org_after_todo_state_change_hook(line,state1, state2) - "call confirm("changed: ".a:line."--key:".a:state1." val:".a:state2) - "call OrgConfirmDrawer("LOGBOOK") - "let str = ": - State: " . org#Pad(a:state2,10) . " from: " . Pad(a:state1,10) . - " \ ' [' . org#Timestamp() . ']' - "call append(line("."), repeat(' ',len(matchstr(getline(line(".")),'^\s*'))) . str) -endfunction - diff --git a/contrib/README.txt b/contrib/README.txt deleted file mode 100644 index 2d026b8..0000000 --- a/contrib/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -The vim73 patch in this directory does two things: - -1. Enables level-dependent fold highlighting in Vim73. -2. Enables separate TODO highlighting in folded headings - in VimOrganizer, so TODO's stand out even when a - heading is folded. - -Two versions of the Vim73 patch are included. The _46 version -is for source code downloaded from Vim.org. The _390 version -works for the Mercurial repo version as of Dec. 31, 2011. - -The vim72 patch is old and only does (1) above. - -If someone is using a version of Windows and wants to avoid -recompiling process you can contact me and I will send you an -executable you should be able to use on your system. - -Herbert Sitz -hesitz@gmail.com diff --git a/contrib/vim72.diff b/contrib/vim72.diff deleted file mode 100644 index 1d79a20..0000000 --- a/contrib/vim72.diff +++ /dev/null @@ -1,79 +0,0 @@ -=== (+2,-1) src/eval.c === -@@ -355,6 +355,7 @@ - {VV_NAME("operator", VAR_STRING), VV_RO}, - {VV_NAME("searchforward", VAR_NUMBER), 0}, - {VV_NAME("oldfiles", VAR_LIST), 0}, -+ {VV_NAME("foldhighlight", VAR_NUMBER), 0}, - }; - - /* shorthand */ -=== (+18,-9) src/screen.c === -@@ -2179,9 +2179,17 @@ - # define RL_MEMSET(p, v, l) for (ri = 0; ri < l; ++ri) \ - ScreenAttrs[off + (p) + ri] = v - #endif -+ /* -+ * 4. Compose the folded-line string with 'foldtext', if set. -+ */ -+ text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -+ -+ txtcol = col; /* remember where text starts */ - - /* Set all attributes of the 'number' column and the text */ -- RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col); -+ //RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col); -+ RL_MEMSET(col, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)), W_WIDTH(wp) - col); -+ - - #ifdef FEAT_SIGNS - /* If signs are being displayed, add two spaces. */ -@@ -2196,10 +2204,11 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, -- (char_u *)" ", len, hl_attr(HLF_FL)); -+ (char_u *)" ", len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); -+ - else - # endif -- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, (char_u *)" ", len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); - col += len; - } - } -@@ -2222,10 +2231,10 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len, -- hl_attr(HLF_FL)); -+ hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); - else - #endif -- copy_text_attr(off + col, buf, len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, buf, len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); - col += len; - } - } -@@ -2233,9 +2242,9 @@ - /* - * 4. Compose the folded-line string with 'foldtext', if set. - */ -- text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -- -- txtcol = col; /* remember where text starts */ -+ //text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -+// moved up above to heappen earlier h.s. -+ // txtcol = col; /* remember where text starts */ - - /* - * 5. move the text to current_ScreenLine. Fill up with "fill_fold". -=== (+3,-2) src/vim.h === -@@ -1767,7 +1767,8 @@ - #define VV_OP 52 - #define VV_SEARCHFORWARD 53 - #define VV_OLDFILES 54 --#define VV_LEN 55 /* number of v: vars */ -+#define VV_FOLDHIGHLIGHT 55 -+#define VV_LEN 56 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD diff --git a/contrib/vim73_390_foldinghighlighting.patch b/contrib/vim73_390_foldinghighlighting.patch deleted file mode 100644 index 958b29a..0000000 --- a/contrib/vim73_390_foldinghighlighting.patch +++ /dev/null @@ -1,120 +0,0 @@ -Common subdirectories: src/auto and patched_src/auto -diff -u src/eval.c patched_src/eval.c ---- src/eval.c 2012-01-01 16:30:50.421710297 +0100 -+++ patched_src/eval.c 2012-01-01 17:12:53.261832394 +0100 -@@ -360,6 +360,8 @@ - {VV_NAME("searchforward", VAR_NUMBER), 0}, - {VV_NAME("oldfiles", VAR_LIST), 0}, - {VV_NAME("windowid", VAR_NUMBER), VV_RO}, -+ {VV_NAME("foldhighlight", VAR_NUMBER), 0}, -+ {VV_NAME("todohighlight", VAR_NUMBER), 0}, - }; - - /* shorthand */ -Common subdirectories: src/GvimExt and patched_src/GvimExt -Common subdirectories: src/os_mac_rsrc and patched_src/os_mac_rsrc -Common subdirectories: src/po and patched_src/po -Common subdirectories: src/proto and patched_src/proto -diff -u src/screen.c patched_src/screen.c ---- src/screen.c 2012-01-01 16:41:32.945741392 +0100 -+++ patched_src/screen.c 2012-01-01 17:17:33.209845943 +0100 -@@ -2214,6 +2214,9 @@ - * 4. Compose the text - * 5. Add the text - * 6. set highlighting for the Visual area an other text -+ * NOTE: in patch for VimOrganizer step 4, composing text -+ * is moved up to happen as part of step 2. -+ - */ - col = 0; - -@@ -2271,11 +2274,16 @@ - # define RL_MEMSET(p, v, l) for (ri = 0; ri < l; ++ri) \ - ScreenAttrs[off + (p) + ri] = v - #endif -- -- /* Set all attributes of the 'number' or 'relativenumber' column and the -- * text */ -- RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col); -- -+ /* -+ * 4. Compose the folded-line string with 'foldtext', if set. -+ */ -+ text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -+ -+ txtcol = col; /* remember where text starts */ -+ -+ /* Set all attributes of the 'number' column and the text */ -+ RL_MEMSET(col, syn_id2attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)), W_WIDTH(wp) - col); -+ - #ifdef FEAT_SIGNS - /* If signs are being displayed, add two spaces. */ - if (draw_signcolumn(wp)) -@@ -2289,10 +2297,10 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, -- (char_u *)" ", len, hl_attr(HLF_FL)); -+ (char_u *)" ", len, hl_attr(HLF_SC)); - else - # endif -- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_SC)); - col += len; - } - } -@@ -2324,20 +2332,31 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len, -- hl_attr(HLF_FL)); -+ hl_attr(HLF_N)); - else - #endif -- copy_text_attr(off + col, buf, len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, buf, len, hl_attr(HLF_N)); - col += len; - } - } -+ /* now set attributes for vimorganizer todo word in headline, if any */ -+ /* v:todohighlight is set in user's OrgFoldText() function. . . */ -+ if (get_vim_var_nr(VV_TODOHIGHLIGHT) > 0 ) -+ { -+ int start=0, end; -+ -+ while( *(text + start) == ' ' ) -+ start++; -+ end = start; -+ while( *(text + end) != ' ' ) -+ end++; -+ RL_MEMSET(start+col, syn_id2attr(get_vim_var_nr(VV_TODOHIGHLIGHT)), end - start); -+ } - - /* - * 4. Compose the folded-line string with 'foldtext', if set. - */ -- text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -- -- txtcol = col; /* remember where text starts */ -+ // moved up above to happen earlier h.s. - - /* - * 5. move the text to current_ScreenLine. Fill up with "fill_fold". -Common subdirectories: src/tee and patched_src/tee -Common subdirectories: src/testdir and patched_src/testdir -diff -u src/vim.h patched_src/vim.h ---- src/vim.h 2012-01-01 16:30:51.025710325 +0100 -+++ patched_src/vim.h 2012-01-01 17:18:31.933848785 +0100 -@@ -1860,7 +1860,9 @@ - #define VV_SEARCHFORWARD 53 - #define VV_OLDFILES 54 - #define VV_WINDOWID 55 --#define VV_LEN 56 /* number of v: vars */ -+#define VV_FOLDHIGHLIGHT 56 -+#define VV_TODOHIGHLIGHT 57 -+#define VV_LEN 58 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD - -Common subdirectories: src/VisVim and patched_src/VisVim -Common subdirectories: src/xxd and patched_src/xxd diff --git a/contrib/vim73_46_foldhighlight.patch b/contrib/vim73_46_foldhighlight.patch deleted file mode 100644 index 152b87c..0000000 --- a/contrib/vim73_46_foldhighlight.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff -u ./src/eval.c ./patched_src/eval.c ---- ./src/eval.c 2010-08-09 13:12:14.000000000 -0700 -+++ ./patched_src/eval.c 2011-08-24 12:45:30.990183200 -0700 -@@ -362,6 +362,8 @@ - {VV_NAME("operator", VAR_STRING), VV_RO}, - {VV_NAME("searchforward", VAR_NUMBER), 0}, - {VV_NAME("oldfiles", VAR_LIST), 0}, -+ {VV_NAME("foldhighlight", VAR_NUMBER), 0}, -+ {VV_NAME("todohighlight", VAR_NUMBER), 0}, - }; - - /* shorthand */ -diff -u ./src/screen.c ./patched_src/screen.c ---- ./src/screen.c 2010-08-13 06:21:27.000000000 -0700 -+++ ./patched_src/screen.c 2011-10-15 04:01:17.947926300 -0700 -@@ -2214,6 +2214,8 @@ - * 4. Compose the text - * 5. Add the text - * 6. set highlighting for the Visual area an other text -+ * NOTE: in patch for VimOrganizer step 4, composing text -+ * is moved up to happen as part of step 2. - */ - col = 0; - -@@ -2271,10 +2273,16 @@ - # define RL_MEMSET(p, v, l) for (ri = 0; ri < l; ++ri) \ - ScreenAttrs[off + (p) + ri] = v - #endif -+ /* -+ * 4. Compose the folded-line string with 'foldtext', if set. -+ */ -+ text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -+ -+ txtcol = col; /* remember where text starts */ -+ -+ /* Set all attributes of the 'number' column and the text */ -+ RL_MEMSET(col, syn_id2attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)), W_WIDTH(wp) - col); - -- /* Set all attributes of the 'number' or 'relativenumber' column and the -- * text */ -- RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col); - - #ifdef FEAT_SIGNS - /* If signs are being displayed, add two spaces. */ -@@ -2289,10 +2297,11 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, -- (char_u *)" ", len, hl_attr(HLF_FL)); -+ (char_u *)" ", len, hl_attr(HLF_SC)); - else - # endif -- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_SC)); -+ - col += len; - } - } -@@ -2324,20 +2333,35 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len, -- hl_attr(HLF_FL)); -+ hl_attr(HLF_N)); -+ //syn_id2attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); -+ - else - #endif -- copy_text_attr(off + col, buf, len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, buf, len, hl_attr(HLF_N)); -+ //copy_text_attr(off + col, buf, len, syn_id2attr(get_vim_var_nr(VV_FOLDHIGHLIGHT))); -+ - col += len; - } - } - -+ /* now set attributes for vimorganizer todo word in headline, if any */ -+ /* v:todohighlight is set in user's OrgFoldText() function. . . */ -+ if (get_vim_var_nr(VV_TODOHIGHLIGHT) > 0 ) -+ { -+ int start=0, end; -+ -+ while( *(text + start) == ' ' ) -+ start++; -+ end = start; -+ while( *(text + end) != ' ' ) -+ end++; -+ RL_MEMSET(start+col, syn_id2attr(get_vim_var_nr(VV_TODOHIGHLIGHT)), end - start); -+ } - /* - * 4. Compose the folded-line string with 'foldtext', if set. - */ -- text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -- -- txtcol = col; /* remember where text starts */ -+ // moved up above to happen earlier h.s. - - /* - * 5. move the text to current_ScreenLine. Fill up with "fill_fold". -diff -u ./src/vim.h ./patched_src/vim.h ---- ./src/vim.h 2010-07-29 11:46:39.000000000 -0700 -+++ ./patched_src/vim.h 2011-08-11 14:22:52.525545700 -0700 -@@ -1842,7 +1842,9 @@ - #define VV_OP 52 - #define VV_SEARCHFORWARD 53 - #define VV_OLDFILES 54 --#define VV_LEN 55 /* number of v: vars */ -+#define VV_FOLDHIGHLIGHT 55 -+#define VV_TODOHIGHLIGHT 56 -+#define VV_LEN 57 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD - diff --git a/contrib/vim74_foldhighlight.patch b/contrib/vim74_foldhighlight.patch deleted file mode 100644 index 7904178..0000000 --- a/contrib/vim74_foldhighlight.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff -u src-orig\eval.c src-changed\eval.c ---- src-orig\eval.c Fri Jul 05 09:23:42 2013 -+++ src-changed\eval.c Tue Oct 29 13:58:08 2013 -@@ -358,6 +358,8 @@ - {VV_NAME("searchforward", VAR_NUMBER), 0}, - {VV_NAME("oldfiles", VAR_LIST), 0}, - {VV_NAME("windowid", VAR_NUMBER), VV_RO}, -+ {VV_NAME("foldhighlight", VAR_NUMBER), 0}, -+ {VV_NAME("todohighlight", VAR_NUMBER), 0}, - }; - - /* shorthand */ -diff -u src-orig\screen.c src-changed\screen.c ---- src-orig\screen.c Sat Jul 13 03:23:00 2013 -+++ src-changed\screen.c Tue Oct 29 13:52:39 2013 -@@ -2374,6 +2374,9 @@ - * 4. Compose the text - * 5. Add the text - * 6. set highlighting for the Visual area an other text -+ * NOTE: in patch for VimOrganizer step 4, composing text -+ * is moved up to happen as part of step 2. -+ - */ - col = 0; - -@@ -2432,9 +2435,15 @@ - ScreenAttrs[off + (p) + ri] = v - #endif - -- /* Set all attributes of the 'number' or 'relativenumber' column and the -- * text */ -- RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col); -+ /* -+ * 4. Compose the folded-line string with 'foldtext', if set. -+ */ -+ text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -+ -+ txtcol = col; /* remember where text starts */ -+ -+ /* Set all attributes of the 'number' column and the text */ -+ RL_MEMSET(col, syn_id2attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)), W_WIDTH(wp) - col); - - #ifdef FEAT_SIGNS - /* If signs are being displayed, add two spaces. */ -@@ -2449,10 +2458,10 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, -- (char_u *)" ", len, hl_attr(HLF_FL)); -+ (char_u *)" ", len, hl_attr(HLF_SC)); - else - # endif -- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_SC)); - col += len; - } - } -@@ -2494,20 +2503,31 @@ - if (wp->w_p_rl) - /* the line number isn't reversed */ - copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len, -- hl_attr(HLF_FL)); -+ hl_attr(HLF_N)); - else - #endif -- copy_text_attr(off + col, buf, len, hl_attr(HLF_FL)); -+ copy_text_attr(off + col, buf, len, hl_attr(HLF_N)); - col += len; - } - } -+ /* now set attributes for vimorganizer todo word in headline, if any */ -+ /* v:todohighlight is set in user's OrgFoldText() function. . . */ -+ if (get_vim_var_nr(VV_TODOHIGHLIGHT) > 0 ) -+ { -+ int start=0, end; -+ -+ while( *(text + start) == ' ' ) -+ start++; -+ end = start; -+ while( *(text + end) != ' ' ) -+ end++; -+ RL_MEMSET(start+col, syn_id2attr(get_vim_var_nr(VV_TODOHIGHLIGHT)), end - start); -+ } - - /* - * 4. Compose the folded-line string with 'foldtext', if set. - */ -- text = get_foldtext(wp, lnum, lnume, foldinfo, buf); -- -- txtcol = col; /* remember where text starts */ -+ // moved up above to happen earlier h.s. - - /* - * 5. move the text to current_ScreenLine. Fill up with "fill_fold". -diff -u src-orig\vim.h src-changed\vim.h ---- src-orig\vim.h Fri Aug 02 07:02:27 2013 -+++ src-changed\vim.h Tue Oct 29 13:59:29 2013 -@@ -1866,7 +1866,9 @@ - #define VV_SEARCHFORWARD 53 - #define VV_OLDFILES 54 - #define VV_WINDOWID 55 --#define VV_LEN 56 /* number of v: vars */ -+#define VV_FOLDHIGHLIGHT 56 -+#define VV_TODOHIGHLIGHT 57 -+#define VV_LEN 58 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD - diff --git a/doc/vimorg.txt b/doc/org.txt similarity index 99% rename from doc/vimorg.txt rename to doc/org.txt index e0ef794..2f6cd4c 100644 --- a/doc/vimorg.txt +++ b/doc/org.txt @@ -1467,7 +1467,7 @@ TAGS-TODO-PROPERTY SEARCH *vimorg-tags-search* > Enter search string: +work+{boss.*} < selects headlines that contain the tag ':work:' - and any tag starting with ‘:boss’. (Note: unlike + and any tag starting with �:boss�. (Note: unlike the similar search in Org-mode, there should be _no_ initial '^'.) @@ -1490,17 +1490,17 @@ TAGS-TODO-PROPERTY SEARCH *vimorg-tags-search* The type of comparison done depends on how the comparison value is written: - If the comparison value is a plain number, a numerical comparison is - done, and the allowed operators are ‘<’, ‘=’, ‘>’, ‘<=’, ‘>=’, and - ‘!=’. + done, and the allowed operators are �<�, �=�, �>�, �<=�, �>=�, and + �!=�. - If the comparison value is enclosed in double-quotes, a string comparison is done, and the same operators are allowed. - If the comparison value is enclosed in double-quotes and angular - brackets (like ‘DEADLINE<="<2008-12-24 18:30>"’), both values are + brackets (like �DEADLINE<="<2008-12-24 18:30>"�), both values are assumed to be date/time specifications in the standard way, and the comparison will be done accordingly. - If the comparison value is enclosed in curly braces, a regexp match - is performed, with ‘=’ meaning that the regexp matches the property - value, and ‘!=’ meaning that it does not match. + is performed, with �=� meaning that the regexp matches the property + value, and �!=� meaning that it does not match. --------------------------------------------------------------- CUSTOM SEARCHES *vimorg-agenda-custom-searches* diff --git a/intro.txt b/intro.txt deleted file mode 100644 index 85f5683..0000000 --- a/intro.txt +++ /dev/null @@ -1,130 +0,0 @@ -VimOrganizer version 0.30, November 2, 2011. Requires Vim version that -is compiled with support for folding and tabs. Conceal will -be taken advantage of if working with Vim73 supporting conceal. -(Also, I STRONGLY suggest that you apply a patch to Vim so that -folded headings can have level-dependent highlighting, -patch for Vim73 is in contrib directory of the download. If you're on -Windows contact me and I should be able to provide you with an -executable. If I hadn't been able to make Vim do this I would have -bitten the bullet and moved to Emacs, as much as I hate editing in Emacs.) - -VimOrganizer is a Vim filetype plugin that attempts to clone Emacs' Org-mode. -It is currently (November 2011) in an alpha-stage, both in terms of (1) the -breadth and depth of Org-mode features it clones and (2) the stability of its -operation. It is nevertheless very usable. - -Some of the ADDITIONS AND IMPROVEMENTS since previous (December 2010) version: - -- Adjusts to any colorscheme - -- Org menu in gvim. - -- "Dashboards" to assist with Date entry, Columns, Tables, - Agenda searches, and exporting. - -- VimOrganizer help file to install in Vim. - -- Better compatibility with Org-mode files. Open, edit, and save same - files in Org-mode and/or VimOrganizer with (some) of the functionality and - configuration-specific options of Org-mode supported in VimOrganizer. - -- Support for Org-mode style links (as well as use of 'Conceal' in Vim73 - to hide link brackets and - descriptions) - -- Easy to use Org-like column mode, including column headings, - inherited columns, support for Org column blocks, and ability to - specify a list of custom column specs to apply in any buffer. - -- Org-like narrowing of code blocks and subtrees - -- Support for Org-like specifications of TODOS, tags, dates, - including support for Org-compatible config lines in a file. - -- Support for Org-like CATEGORIES, both in specification and in - their inherited behavior. - -- Search specification in Agenda searches is now nearly identical - to specification of searches in Org-mode. - -- User can specify list of commonly used custom agenda searches. - -- Clockin, clockout, and (when a running Emacs server is available, - clocktable block creation and updates. - -- Org-like "refiling" - -- Easy creation and editing of tables, as well as (when a running Emacs - server is available) manipulation and evaluation of tables, including - all spreadsheet functionality in Org-mode. - -- "Live" block evaluation (when a running Emacs server is available) - -- Support for nearly all the export types and export options - available in Org-mode (when running Emacs server is available) - -- Call out to an Emacs server to do "tangling" (literate programming). - -- Many bug fixes and small improvements - -Org-mode, and thus VimOrganizer, is a text-editor plugin/application that can -be used for (1) keeping notes, (2) maintaining TODO lists, (3) planning -projects, and/or (4) authoring and publishing documents, including support for -literate programming and "reproducible research". Like Org-mode, VimOrganizer -does this by implementing a flexible plain-text system with a lightly -structured document format. Org-mode has been in constant development for -seven or eight years, and continues to be developed. Work on VimOrganizer is -likewise ongoing, but VimOrganizer is at present a smaller and less ambitious -project than Org-mode. - -File formats and basic workflows for VimOrganizer and Org-mode are very -similar (files auto-convert as part of loading process) and VimOrganizer -actually calls out to an Emacs' Org-mode server to -implement important features, e.g., exporting to pdf format for printing. - -Thus, to make full use of VimOrganizer you will want to have an Emacs' -server running alongside. In most cases this requires little knowledge of -Emacs other than how to start it up and add a few lines to the '.emacs' file, -Emacs' counterpart to Vim's '.vimrc'. (You can even edit the .emacs file in -Vim.) VimOrganizer is focused on leveraging Org-mode by accessing it via -an Emacs server, and re-implementing in Vim only what is necessary and makes -sense. - -VimOrganizer also lets Vim users access Org-babel, a subproject of -Org-mode that allows execution of source-code blocks in org-format -documents. Uses for Org-babel range from writing technical research papers to -simply using a VimOrganizer document as a "language-scratchpad". Over -twenty languages are supported, including C, R, Lisp, Python, Perl, Ruby, -and others. VimOrganizer calls out to a running Emacs server for Org-babel -processing; functionality and speed are essentially the same as -when editing with Org-mode in Emacs. - -VimOrganizer has a first draft of a Vim help file, but the best first step in -learning about VimOrganizer is to learn about Emacs' Org-mode. VimOrganizer -uses the same basic concepts but implements them within the context of Vim -(and with a reduced feature set). Org-mode's main documentation and -support newsgroup are found here: -Org-mode Main Manual: http://orgmode.org/manual/index.html -Org-mode Compact Guide: http://orgmode.org/guide/index.html -Org-mode support: http://news.gmane.org/gmane.emacs.orgmode -Org-babel information: http://orgmode.org/worg/org-contrib/babel/ - -VimOrganizer help can be found here: -https://github.com/hsitz/VimOrganizer/blob/master/doc/vimorg.txt - -========================== -INSTALLATION INSTRUCTIONS -=========================== -https://github.com/hsitz/VimOrganizer/blob/master/INSTALL.txt - - -QUESTIONS, COMMENTS, SUGGESTIONS -================================ -Questions, comments, and suggestions regarding VimOrganizer are always -appreciated. The preferred place for those is in the VimOrganizer newsgroup -here: -http://groups.google.com/group/vimorganizer/topics - -VimOrganizer project files are maintained at github and the version -there may be more recent than the files at vim.org: -https://github.com/hsitz/VimOrganizer - ----------------------------------------------------------------- -NOTE: some code from other Vim plugins has been incorporated into the -VimOrganizer script files. Do NOT download these plugins to use them -with VimOrganizer; since VimOrganizer does not call out to them in any way: - -1. Charles Campbell's great calendar utilities -2. Table editing routines from Maxim Kim's excellent vimwiki plugin. - These are really quite nice (seem to be inspired by Org-mode's - own table-editing stuff) and deserve to be offered as a separate - plugin of their own, not dependent on any larger project. (If - VimOrganizer is not quite the sort of plugin you're looking for then - vimwiki may be.) ----------------------------------------------------------------- - -VimOrganizer page at vim.org: -http://www.vim.org/scripts/script.php?script_id=3342 - -