-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Clean View #52
Comments
On Sun, Oct 21, 2012 at 10:42 PM, Olaf Dabrunz [email protected]:
VimOrganizer should already do this. There is a highlight group called Something like the statement below will make these initial asterisks :highlight Org_Star guifg=[color of background] ctermfg=[color of The best thing to do would be to put it in the OrgCustomColors function in function OrgCustomColors() You can also look at the help section :h vimorg-customizing-colors Hope that helps, Herb |
Thanks for pointing me to this! I have to admit that I did not yet look at a number of the highlights in OrgCustomColors(), including the Org_Star highlight, although I have copied the function from the _vimrc in the VimOrganizer package. It worked, but it needed the change in syntax/org.vim from cbf351d, which is not yet in http://www.vim.org/scripts/script.php?script_id=3342. I am still using the vim.org version -- should I switch to the git master? Maybe the Org_Star highlight should get a special mention in the vimorg help file. It was a bit too easy to overlook. I like that I could get the hiding to work relatively easily in a vim that runs in a terminal. emacs org-mode in a terminal "hides" the leading stars by using the default foreground color, which is very visible. Only in a GUI window the leading stars are really hidden. If I only knew more about font-lock I might get this to work in a terminal too, but it does not work out of the box. Alas, I feel that there are a few things missing (some of them are already in emacs org-mode, as described in the "clean view" announcement (http://permalink.gmane.org/gmane.emacs.orgmode/22)), let me sum them up here:
If you would like to have some of these features (or some other solution), I could try to help implementing something (although I do not know that much about VimOrganizer internals yet, but I have done (mostly unreleased) patches to a number of other vim scripts and have programmed several larger (unreleased) vim scripts myself). Thanks for the great work! Olaf |
On Mon, Oct 22, 2012 at 11:15 AM, Olaf Dabrunz [email protected]:
Alas, I feel that there are a few things missing (some of them are already
Regarding the issue with cursor highlighting in terminal vim, my guess is Support for 'hidestars' would be good, but realistically most Org users Regarding odd numbers of stars: Yes, "clean view" in Org-mode has two let b:v.levelstars=1 To get "odd" star behavior change this to: let b:v.levelstars=2 This will then start adding 2 stars for every level past level 1, with There is also a function in org.vim that would allow changing a document's function! s:StarLevelFromTo(from, to)
Calling 's:StarLevelFromTo(1,2)' would change current doc from regular If you do use the odd star setup in VimOrganizer you would want to have -- Herb |
On Mon, Oct 22, 2012 at 8:26 PM, Herbert Sitz [email protected] wrote:
Oh, I should also add that if you aren't using the "level dependent -- Herb |
This is a request for the "clean view" as in emacs' org-mode. As described on the org-mode mailing list, only the last star before each heading is shown:
While vim could probably do something similar with concealed characters, VimOrganizer already uses the 'conceal' feature to implement hiding of URLs. As there is only one global
'conceallevel'
, the "clean view" cannot replace concealed chars with spaces while the URL hiding mode is set to completely remove these chars.I remember reading that you thought about implementing something akin to "clean view" by using headings with leading spaces in the org file, but that emacs org-mode does not support such a file format. I could not find that thread again, but IIRC Carsten Dominik said something to the effect that the leading stars are deeply entangled within org-mode's code.
My suggestion is to implement the "clean view" in VimOrganizer with leading spaces in the file anyway. This seems to be the only "clean" way to do this in vim. To preserve compatibility with emacs, this means another addition to the .emacs file is needed to convert such a file to the emacs org file format.
I am not sure how difficult it really is to change emacs' org-mode to accept such a "clean view" file format. After looking a bit into the code of emacs org-mode it seems it is still using outline-mode functions to match headings, but it sets specific
outline-regexp
andoutline-level
functions to use stars only (and to implement the tricks to get clean view working, such asorg-odd-levels
).There may be corner cases to catch, but I am not yet convinced that it is too difficult to implement.
The only problem I see is that people may use org files that contain lists with
'*'
as an item marker. These become difficult (or impossible?) to distinguish from "clean view" headings.Whatever can be done about this, I am not sure. But it may help to require a special
#+STARTUP: cleanview
line in the file to turn on recognition of clean view headings. Users of this file format need to make sure that their non-heading lines do not start with spaces and then a star.The text was updated successfully, but these errors were encountered: