vim-runtime (Gutsy): ada.vim with syntax errors

Bug #152277 reported by Daniel Larraz
18
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vim-runtime

In Ubuntu Gutsy...

$ cat ~/.vimrc
...
syntax on
...

$ touch test.adb

$ vim test.adb

"test.adb" 0L, 0C
Error detected while processing /usr/share/vim/vim71/ftplugin/ada.vim:
line 111:
E121: Undefined variable: g:ada_default_compiler
E15: Invalid expression: "compiler " . g:ada_default_compiler
Error detected while processing function ada#Map_Popup:
line 1:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') . " :"^I . a:Command . "<CR>"
E15: Invalid expression: "50amenu " . "PopUp." . escape(a:Text, ' ') . "<Tab>"^I . escape(g:mapleader . "a" . a:Keys , '\'
) . " :"^I . a:Command . "<CR>"
Error detected while processing function ada#Map_Popup..ada#Map_Menu:
line 26:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') . " :"^I . a:Command . "<CR>"
E15: Invalid expression: "50amenu " . "Ada." . escape(a:Text, ' ') . "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') . "
:"^I . a:Command . "<CR>"
line 31:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') ." :" . a:Command
E15: Invalid expression: "nnoremap <buffer>" . escape(g:mapleader . "a" . a:Keys , '\') ." :" . a:Command
line 35:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') ." <C-O>:" . a:Command
E15: Invalid expression: "inoremap <buffer>" . escape(g:mapleader . "a" . a:Keys , '\') ." <C-O>:" . a:Command
Error detected while processing function ada#Map_Popup:
line 1:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') . " :"^I . a:Command . "<CR>"
E15: Invalid expression: "50amenu " . "PopUp." . escape(a:Text, ' ') . "<Tab>"^I . escape(g:mapleader . "a" . a:Keys , '\'
) . " :"^I . a:Command . "<CR>"
Error detected while processing function ada#Map_Popup..ada#Map_Menu:
line 26:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') . " :"^I . a:Command . "<CR>"
E15: Invalid expression: "50amenu " . "Ada." . escape(a:Text, ' ') . "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') . "
:"^I . a:Command . "<CR>"
line 31:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') ." :" . a:Command
E15: Invalid expression: "nnoremap <buffer>" . escape(g:mapleader . "a" . a:Keys , '\') ." :" . a:Command
line 35:
E121: Undefined variable: g:mapleader
E116: Invalid arguments for function escape(g:mapleader . "a" . a:Keys , '\') ." <C-O>:" . a:Command
E15: Invalid expression: "inoremap <buffer>" . escape(g:mapleader . "a" . a:Keys , '\') ." <C-O>:" . a:Command

Revision history for this message
Keir Lawson (keirlawson) wrote :

Yup, i'm getting this as well

Revision history for this message
Malaise (malaise) wrote :

Me too.
As a workaround I have moved /usr/share/vim/vim71/ftplugin/ada.vim as a .old
This does not prevent Ada syntax highlightening.

Revision history for this message
Sam H (samjh) wrote :

Until a permanent solution is found:

Go to http://www.vim.org/scripts/script.php?script_id=1609 and download the latest .vba archive.
As of time of writing, it is vba-4.5.0: http://www.vim.org/scripts/download_script.php?src_id=7686

Save the vba file to a place of your own choosing.

Fire up the vimball archive tool with superuser privileges. Example:
sudo vim ~/temp/vba-4.5.0

The vimball archive tool will open. Issue the so % command, thus:
:so %

It will install the Ada tool package for vim, including the correct syntax high-lighter.

Revision history for this message
Sam H (samjh) wrote :

Error confirmed, solution suggested. Needs the vim package maintainer(s) to check and implement solution.

Changed in vim:
status: New → In Progress
Revision history for this message
Sam H (samjh) wrote :

Just noticed in my comment https://bugs.launchpad.net/ubuntu/+source/vim/+bug/152277/comments/3 I made an error.

To use the vimball archive, the example command should have been:
sudo vim ~/temp/ada.4.5.0.vba

Revision history for this message
Sam H (samjh) wrote :

Problem still not resolved in Hardy.

Changed in vim:
status: In Progress → Confirmed
Revision history for this message
Malaise (malaise) wrote :

My workaround still applies to Hardy.

Revision history for this message
Sam H (samjh) wrote :

Didn't notice your workaround. Thanks. :) Confirmed it works!

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

just for the record:
inteprid vim (1:7.1.293-2ubuntu1) has the updated ada.vim.

$ grep date -A 2 /usr/share/vim/vim71/ftplugin/ada.vim
" $Date: 2007-09-17 05:11:59 -0400 (Mon, 17 Sep 2007) $
" Version: 4.5
" $Revision: 774 $

Revision history for this message
Colin Watson (cjwatson) wrote :

This was fixed in r745 of vim-ada-mode, and as noted it is fixed in Intrepid's vim.

Changed in vim:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.