jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.12k stars 266 forks source link

org.vim aggressive conceal #228

Closed Bruno-Sosa closed 8 years ago

Bruno-Sosa commented 8 years ago

So I get the following error when I open .org files.

Error detected while processing /home/xxxx/.vim/plugged/vim-orgmode/syntax/org.vim:
line    9:
E121: Undefined variable: g:org_aggressive_conceal
E15: Invalid expression: g:org_aggressive_conceal
line   26:
E121: Undefined variable: s:conceal_aggressively
E15: Invalid expression: (s:conceal_aggressively == 1)
line   46:
E121: Undefined variable: s:conceal_aggressively
E15: Invalid expression: (s:conceal_aggressively == 1)
line  225:
E117: Unknown function: <SNR>37_ReadTodoKeywords
line  269:
E121: Undefined variable: s:conceal_aggressively
E15: Invalid expression: (s:conceal_aggressively == 1)
line  336:
E121: Undefined variable: s:conceal_aggressively
E15: Invalid expression: (s:conceal_aggressively==1)
Bruno-Sosa commented 8 years ago

on Arch Linux, installed vim-plug which in turn updated vim-orgmode. Here is my vimrc:

filetype plugin on
syntax on
colorscheme delek

filetype plugin indent on
let maplocalleader = "-"
let g:org_agenda_files=['~/todo.org']

call plug#begin()
Plug 'jceb/vim-orgmode'
call plug#end()
Bruno-Sosa commented 8 years ago

adding following line as recommended by orgguide.txt fixed it

 let g:org_aggressive_conceal = 0
Bruno-Sosa commented 8 years ago

The orgguide.txt says that the default is 0, but I suppose not?? I assuming these lines are relevant.

Ron89 commented 8 years ago

Sorry for the inconvenience caused. It looks like in your case syntax is loaded before ftplugin/org.vim. Did you remove the orgmode related files in .vim/ftplugins/ and .vim/syntax? It is possible that the multiple copies of orgmode scripts confused Vim

Bruno-Sosa commented 8 years ago

no i did not, oh boy, i'm so sorry. Do I remove all of them and the install with vim-plug using the method you told me in #227 ?

Ron89 commented 8 years ago

The settings are in /ftplugin/org.vim.

" setting to conceal aggresively
if ! exists('g:org_aggressive_conceal') && ! exists('b:org_aggressive_conceal')
    let g:org_aggressive_conceal = 0
endif

Normally, this file should be loaded before syntax. But maybe your other copy of ftplugin/org.vim was loaded first and this file is ignored because of

" Load orgmode just once {{{1
if &cp || exists("g:loaded_org")
    finish
endif
let g:loaded_org = 1
Bruno-Sosa commented 8 years ago

yay! it worked, I'll close. thank you, and sorry for the inconvenience

Ron89 commented 8 years ago

I would recommend so, if you don't have many other stuff in it. Personally I prefer plugin-manager. Because it can help keeping plugins in order, especially after major updating.

But still, sorry for the trouble causing feature.