Re: Digest for vimwiki@googlegroups.com - 1 Message in 1 Topic

49 views
Skip to first unread message

Etienne B. Roesch

unread,
Jul 5, 2011, 5:01:01 AM7/5/11
to vim...@googlegroups.com
Hello Maxim!

No, the toggling works, with <C-Space>, but it only puts an X mark on the current item. I thought it was also meant to update the parents and children with .o0X signs, isn't that right or have I misunderstood?

Thanks for your help!

Etienne


Le 5 Jul 2011 à 07:40, vimwiki...@googlegroups.com a écrit :

    Maxim Kim <hab...@gmail.com> Jul 04 05:01AM -0700 ^
     
    Hello Etienne!
     
    What do you do to auto toggle list item? <C-Space>? It might be mac 
    keybinding issue.
    Try :VimwikiToggleListItem command on that item.
     
    Maxim.

Maxim Kim

unread,
Jul 5, 2011, 6:47:05 AM7/5/11
to vim...@googlegroups.com
Yes it should update parent items

- [o] item 1
    - [ ] item 2
    - [X] item 3
    - [X] item 4
    - [ ] item 5
    - [ ] item 6
- [ ] item 7

I assume that if you press <C-Space> on item 4, item 1 is not updated to [.] ?

Etienne

unread,
Jul 9, 2011, 7:34:10 AM7/9/11
to vimwiki
Hi Maxim,

Yes, exactly. Well, technically item 1 wouldn't have [o] at this
point.
I first thought it was the way I construct lists that was at fault,
but I copy-pasted the examples in the doc, and they wouldn't work
either. I use tab separators usually (\t* [ ] ), and also tried with
space instead, but that does not work either. Any other test I can
run?

Thanks much for your help!

Etienne

Maxim Kim

unread,
Jul 9, 2011, 8:41:38 AM7/9/11
to vim...@googlegroups.com
Hi Etienne!

It might be vim settings that you have in your .vimrc but I doubt it.
Just to be sure, send it to me for testing.


I do not have Mac thus if vimwiki has that problem with macvim I can't debug it myself.
All the 'lists' code are in autoload/vimwiki/lst.vim file.
You should check function! s:TLI_toggle(lnum) at line 280.
There is   call to function s:TLI_switch_parent_state(a:lnum) which should switch parent list item.
Now, to debug, insert vim's 'echomsg' statements into the code at suspicious positions :).
Check if s:set_state function is called for example.


Maxim.


Etienne

unread,
Jul 10, 2011, 4:12:44 PM7/10/11
to vimwiki
Thanks Maxim! I'll have a look and get back to you.

Etienne

Etienne B. Roesch

unread,
Jul 11, 2011, 6:23:34 AM7/11/11
to vim...@googlegroups.com
Hi Maxim,

Quick questions, I noticed that for list indented using the * symbol, the star symbol get coloured, but not when using - or +. Is that correct behaviour?

Same for the toggling behaviour, on my install, it only works with the star symbol.

Etienne

Maxim Kim

unread,
Jul 11, 2011, 6:28:24 AM7/11/11
to vim...@googlegroups.com
Hi Etienne!

List items should start with * or - (star or minus) signs. Both of them should be highlighted.


Etienne B. Roesch

unread,
Jul 11, 2011, 6:31:19 AM7/11/11
to vim...@googlegroups.com
Hi again,

Okeydokey. On vimwiki 1.2 on MacVim 7.3, only the star symbol is highlighted (in green).
I am guessing regexp are handled differently on other platforms. I'll have a look.

Thanks.

Etienne

Stu

unread,
Jul 11, 2011, 11:27:56 AM7/11/11
to vim...@googlegroups.com

Hi Etienne,

Lists and bullet (*,-,+) highlighting are all working fine for me.

I am also using MacVim 7.3 (57) and vimwiki 1.2.  Under MacVim's advanced settings, I have turned off "Use experimental renderer" and "Enable Quickstart", and selected "Draw marked text inline"

Have you customized your colorscheme, or made other non-trivial changes to your vim setup?  For example, I use

au FileType vimwiki setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab

set my tabstop etc. so that

:set tabstop?
    returns 2
:set softtabstop?
    returns 2
:set shiftwidth?
    returns 2
:set expandtab?
    returns expandtab


- Stu

To be sure about the lists, starting with Maxim's example:

- [o] item 1
  - [ ] item 2
  - [X] item 3
  - [X] item 4
  - [ ] item 5
  - [ ] item 6
- [ ] item 7

AFTER I press <C-Space> on item 4:

- [.] item 1
  - [ ] item 2
  - [X] item 3
  - [ ] item 4
  - [ ] item 5
  - [ ] item 6
- [ ] item 7

AFTER I press <C-Space> on item 1:

- [X] item 1
  - [X] item 2
  - [X] item 3
  - [X] item 4
  - [X] item 5
  - [X] item 6
- [ ] item 7

AFTER I press <C-Space> on item 1, again:

- [ ] item 1
  - [ ] item 2
  - [ ] item 3
  - [ ] item 4
  - [ ] item 5
  - [ ] item 6
- [ ] item 7

AFTER I press <C-Space> on item 7, again:

- [ ] item 1
  - [ ] item 2
  - [ ] item 3
  - [ ] item 4
  - [ ] item 5
  - [ ] item 6
- [X] item 7





Etienne B. Roesch

unread,
Jul 12, 2011, 10:52:10 AM7/12/11
to vim...@googlegroups.com
Hi Stu and Maxim,

Thanks for the help. I have done some more tests, and I don't really understand what is going on.
I am off to Greece for two weeks in a few days, and I don't think I will have time to dig deeper into it by then. I'll come back to you in August then!

I am on MacOS 10.6.8, how about you Stu?

Etienne

Stu

unread,
Jul 12, 2011, 1:38:56 PM7/12/11
to vim...@googlegroups.com
Hi Etienne,

I am also using 10.6.8.  

I think there is something fishy going on with your plugin installation.

Can you try the following, and send us the results:

1. Replace "autoload/vimwiki/lst.vim" with the attached file which includes debug messages.
2. Restart VIM
3. Open a vimwiki file and paste the List Example (see below) so that item 1 is positioned on line 1
4. Position the cursor on item 4 (line 4)
5. Enter the command `:redir @a`
6. Type <C-space>
7. Enter the command `:redir END`
8. Position the cursor below the list
9. Type `:pu a`
10. Send us the results.  You should obtain the trace that is included below.

Best,
- Stu

List Example:
- [o] item 1
  - [ ] item 2
  - [X] item 3
  - [X] item 4
  - [ ] item 5
  - [ ] item 6
- [ ] item 7


Output Trace:
DEBUG> function! vimwiki#lst#ToggleListItem 4 4
DEBUG> function! s:is_list_item 4
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 4
DEBUG> function! s:TLI_toggle 4
DEBUG> function! s:TLI_create_checkbox 4
DEBUG> function! s:is_cb_list_item 4
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:TLI_switch_child_state 4
DEBUG> function! s:get_state 4
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:get_child_items 4
DEBUG> function! s:get_level 4
DEBUG> function! s:next_list_item 4
DEBUG> function! s:rx_list_item
DEBUG> function! s:is_list_item 5
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 5
DEBUG> function! s:set_state 4 0
DEBUG> function! s:rx_li_symbol 0
DEBUG> function! s:TLI_switch_parent_state 4
DEBUG> function! s:is_cb_list_item 4
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_parent_item 4
DEBUG> function! s:get_level 4
DEBUG> function! s:prev_list_item 4
DEBUG> function! s:rx_list_item
DEBUG> function! s:is_list_item 3
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 3
DEBUG> function! s:prev_list_item 3
DEBUG> function! s:rx_list_item
DEBUG> function! s:is_list_item 2
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 2
DEBUG> function! s:prev_list_item 2
DEBUG> function! s:rx_list_item
DEBUG> function! s:is_list_item 1
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 1
DEBUG> function! s:is_cb_list_item 1
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:all_siblings_checked 4
DEBUG> function! s:get_sibling_items 4
DEBUG> function! s:get_level 4
DEBUG> function! s:get_level 4
DEBUG> function! s:get_level 4
DEBUG> function! s:is_cb_list_item 4
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:next_list_item 4
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 5
DEBUG> function! s:get_level 5
DEBUG> function! s:is_cb_list_item 5
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:next_list_item 5
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 6
DEBUG> function! s:get_level 6
DEBUG> function! s:is_cb_list_item 6
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:next_list_item 6
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 7
DEBUG> function! s:prev_list_item 4
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 3
DEBUG> function! s:get_level 3
DEBUG> function! s:is_cb_list_item 3
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:prev_list_item 3
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 2
DEBUG> function! s:get_level 2
DEBUG> function! s:is_cb_list_item 2
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:prev_list_item 2
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_level 1
DEBUG> function! s:get_state 4
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:rx_li_symbol 0
DEBUG> function! s:get_state 5
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:rx_li_symbol 0
DEBUG> function! s:get_state 6
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:rx_li_symbol 0
DEBUG> function! s:get_state 3
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:get_state 2
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_li_symbol 100
DEBUG> function! s:rx_li_symbol 0
DEBUG> function! s:set_state 1 20
DEBUG> function! s:rx_li_symbol 20
DEBUG> function! s:is_cb_list_item 1
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:get_parent_item 1
DEBUG> function! s:get_level 1
DEBUG> function! s:prev_list_item 1
DEBUG> function! s:is_cb_list_item 0
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:find_next_list_item 4
DEBUG> function! s:rx_list_item


- S.
lst.vim

Etienne B. Roesch

unread,
Jul 13, 2011, 9:04:12 AM7/13/11
to vim...@googlegroups.com
Hi Stu and Maxim,

Thank you for your help guys, I really appreciate it. Jep, there is definitely something fishy with my install. I made a few tests, see below, and I am not sure what is going on. My latest theory is that it has something to do with the default encoding of my text files, which somehow messes up regexp.

Whatever the case is, I am willing to get my hands greasy and sorting it out but, I am going on holidays on Friday, and I am meant to get a brand new macbook early August. So, I propose that we set this issue to rest for a while, and as soon as I install vimwiki on my new computer, I'll carry on testing.

--

First, I performed the series of command as per your guidance with the installation of macvim 7.3 (59 – I upgrade from 53 to 59 two days ago) and my usual plugin configuration.

With your list indented using "-" symbols, I get the following:

DEBUG> function! vimwiki#lst#ToggleListItem 4 4
DEBUG> function! s:is_list_item 4
DEBUG> function! s:rx_list_item

DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_list_item


DEBUG> function! s:rx_list_item
DEBUG> function! s:find_next_list_item 4
DEBUG> function! s:rx_list_item

DEBUG> function! s:rx_list_item
DEBUG> function! s:rx_list_item

With your list indented using "*" symbols, I get the following:
Nota:
- The "*" symbol is highlighted
- [ ] turns into [X] on item 4, but nothing changes on item1
- Toggling item 1 switches [ ] to [X] and nothing happens to the children.

DEBUG> function! s:prev_list_item 1
DEBUG> function! s:is_cb_list_item 0
DEBUG> function! s:rx_cb_list_item
DEBUG> function! s:rx_list_item
DEBUG> function! s:find_next_list_item 4
DEBUG> function! s:rx_list_item

Then, I got rid of all my plugins, clean-sourced the vimwiki 1.2 vimball, emptied my .vimrc to only contain the following lines, and tried again. To my dismay, whereas <leader>ww does open wiki_1, <CR> does not follow links and <C-Space> does not toggle anything.

""""
" VimWiki
""""
let wiki_1 = {}
let wiki_1.path = '~/Documents/Dropbox/MyWiki'
let wiki_1.syntax = 'media'
let wiki_1.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
let wiki_2 = {}
let wiki_2.path = '~/Documents/Dropbox/MyPublicWiki'
let wiki_2.syntax = 'media'
let wiki_2.nested_syntaxes = {'python': 'python', 'c++': 'cpp', 'shell': 'sh'}
let g:vimwiki_list = [wiki_1, wiki_2]
let g:vimwiki_use_calendar = 1
let vimwiki_timetrack = "~/Documents/Dropbox/MyWiki/LogTimeTrackCSV.wiki"

> <lst.vim>

Etienne B. Roesch

unread,
Jul 29, 2011, 6:33:10 AM7/29/11
to vim...@googlegroups.com
Hi guys,

I did get my new macbook, and the very first thing I installed was Macvim+vimwiki. I did some tests, and I found why toggling todo items didn't work. Apparently, in a barebone vimrc file, the following line makes the regex go wrong – commenting it out solved the issue:

let wiki_1.syntax = 'media'


The barebone vimrc file I used looks like that:

set nocompatible
filetype plugin on
syntax on

let wiki_1 = {}
let wiki_1.path = '~/Dropbox/MyWiki'


let wiki_1.syntax = 'media'
let wiki_1.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
let wiki_2 = {}

let wiki_2.path = '~/Dropbox/MyPublicWiki'


let wiki_2.syntax = 'media'
let wiki_2.nested_syntaxes = {'python': 'python', 'c++': 'cpp', 'shell': 'sh'}
let g:vimwiki_list = [wiki_1, wiki_2]

I believe I must have extrapolated the .syntax lines from the paragraph in the help file describing how to define wikis as dictionaries, adding in the vimwiki-option-syntax.

Any thoughts?

Etienne

Maxim Kim

unread,
Jul 29, 2011, 7:22:01 AM7/29/11
to vim...@googlegroups.com
Hi Etienne!

On Friday, July 29, 2011 2:33:10 PM UTC+4, Etienne wrote:
Hi guys,

I did get my new macbook, and the very first thing I installed was Macvim+vimwiki. I did some tests, and I found why toggling todo items didn't work. Apparently, in a barebone vimrc file, the following line makes the regex go wrong – commenting it out solved the issue:

let wiki_1.syntax = 'media'

Media list syntax is quite different.
* list item 1
** sublist item 2
** sublist item 3
* list item 4

With proper list syntax you should be able to toggle parent items with <C-Space>.

Maxim.

Etienne B. Roesch

unread,
Jul 31, 2011, 3:48:18 PM7/31/11
to vim...@googlegroups.com

Hmmm, I see.

..
Thank you guys! :P

Etienne
Reply all
Reply to author
Forward
0 new messages