Very rough going with Ubuntu

Viki
2012-02-17
2013-04-17
  • Peter Matulis
    Peter Matulis
    2012-02-17

    I am running Ubuntu 11.10 and tried this on 2 computers.

    I download and install (:so %) the following plugins:

    1. viki vimball (3.20)
    2. tlib vimball (0.42)

    I then do:

    $ vim -u ~/.vimrc_viki blah1

    and get the following screenfuls of errors:

    ================
    Error detected while processing function viki#DispatchOnFamily..viki_viki#MinorMode..viki#DispatchOnFamily..viki_viki#SetupBuffer..viki#CollectFileWords:
    line    5:
    E121: Undefined variable: g:vikiNameSuffix
    E15: Invalid expression: g:vikiNameSuffix != '' && index(patterns, g:vikiNameSuffix) == -1
    Error detected while processing function viki#DispatchOnFamily..viki_viki#MinorMode..viki#DispatchOnFamily..viki_viki#SetupBuffer..viki#CollectHyperWords..tl
    ib#file#Join:
    line    1:
    E492: Not an editor command:     TVarArg 'strip_slashes'
    line    2:
    E121: Undefined variable: strip_slashes
    E15: Invalid expression: strip_slashes
    line    1:
    E492: Not an editor command:     TVarArg 'strip_slashes'
    line    2:
    E121: Undefined variable: strip_slashes
    E15: Invalid expression: strip_slashes
    line    1:
    E492: Not an editor command:     TVarArg 'strip_slashes'
    line    2:
    E121: Undefined variable: strip_slashes
    E15: Invalid expression: strip_slashes
    line    1:
    E492: Not an editor command:     TVarArg 'strip_slashes'
    line    2:
    E121: Undefined variable: strip_slashes
    E15: Invalid expression: strip_slashes
    line    1:
    E492: Not an editor command:     TVarArg 'strip_slashes'
    line    2:
    E121: Undefined variable: strip_slashes
    .
    .
    .
    ================

    This is the contents of ~/.vimrc_viki:

    ================
    :syntax on
    :set nocompatible
    :filetype plugin indent on
    :set filetype=viki
    ================

    If I leave out 'filetype' from the rc file then the file opens fine.  Then I do:

    :set ft=viki

    and I get the following error:

    ================
    Error detected while processing /home/peter/.vim/syntax/texmath.vim:
    line  295:
    E475: Invalid argument: texMathSymbol '\\angle\&gt;' contained containedin=texmath conceal cchar=â<88>
    ================

    If I move texmath.vim out of the way and retry then no errors appear and new highlighting appears for the following (the contents of 'blah1'):

    ================
    * Main Menu

    - ok
    - []
    - ok

    []

    Doing ':set ft' shows me 'filetype=viki'.

    Putting the cursor over 'Link' and hitting Ctrl-Enter the cursor merely moves down one line (does not follow hyperlink).  Hitting '\vf' asks me if I want to create the file but when I say 'y' then I get the following:

    ================
    Error detected while processing function viki#MaybeFollowLink..<SNR>21_FollowLink..<SNR>21_OpenLink..viki#OpenLink..<SNR>21_EditLocalFile..<SNR>21_EditWrappe
    r:
    line   22:
    Vim raised E37: You tried to abondon a dirty buffer (see :h E37)
    Error detected while processing function viki#MaybeFollowLink..<SNR>21_FollowLink:
    line   29:
    E171: Missing :endif
    Error detected while processing function viki#MaybeFollowLink:
    line    8:
    E171: Missing :endif
    Press ENTER or type command to continue
    ================

    The above error goes away if I put the following in my rc file:

    let g:vikiHide='hide'

    If I follow a link, say 'y' to create, add content, and ':x' I get:

    ================
    "~/Data/tmp/vikitest/Technical Projects"  3L, 9C written
    E37: No write since last change (add ! to override)
    E162: No write since last change for buffer "blah1"
    ================

    I need to do ':x!' to prevent that from being displayed.

    When using '\vf' often the backslash is not recognized and I find myself in Visual mode.

    I need to figure out how to 'go back' as '\vb' does not work, ever.

    If I put the following in my rc file then everything gets 'folded' when a document is opened with the vim command:

    au BufNewFile,BufRead * :VikiMode

    When I am in a followed-to document I lose the 'viki' filetype.  How do I preserve it?

    So after a lot of effort my setup is at least devoid of errors.  Any way to make this smoother and more robust on Ubuntu?

    Thank you.

     
  • Peter Matulis
    Peter Matulis
    2012-02-17

    I forgot to say that I'm using standard packages on Ubuntu (vim 7.3.154).

     
  • Tom Link
    Tom Link
    2012-02-17

    Hi,

    At first glance, it seems to me that plugin/viki.vim and plugin/02tlib.vim weren't loaded properly. This causes the errors related to g:vikiNameSuffix and TVarArg. This seems to be a problem with how you installed these plugins.

    With respect to the error pointing to texmath.vim: This file contains an utf8 character. This should have been caught by the line

    if has('conceal') && &enc == 'utf-8'

    but it wasn't. Could it be a problem with the font? Could you please open the file texmath/syntax.vim and check if you can view its contents?

    With respect to <c-cr>: It should be mapped to the same function as \vf. Please execute:

    :map <c-cr>
    :map \vf

    to make sure.

    I think E37 and E162 are also about abandoning dirty buffers. I personally use &hidden. I admittedly haven't tested the plugin extensively with nohidden (vim's default setting).

    I don't think viki is responsible for \vf not being recognised. You can choose a different map leader by setting g:vikiMapLeader if the backslash (the default for localleader) is inconvenient. Or choose a different key as localleader (see :help maplocalleader).

    I'd recommend to choose an extension for viki files and to set g:vikiNameSuffix to that suffix (e.g. ".viki"). Then add

    au BufNewFile,BufRead *.viki setf viki

    to ~/.vim/filetypes.vim

    I am aware that the default settings of many variables could be improved. I won't have time to take a closer look into this until next week (or the one after that). Please let me know if the above comments were of any/no help.

    Regards,
    Tom

     
  • Tom Link
    Tom Link
    2012-02-18

    Hi,

    Could you please test the version on https://github.com/tomtom/viki_vim
    It should fix most of the problems you reported. I also ran a minimal test with vim default settings.

    Regards,
    Tom