vim loses left/right cursor keys in insert mode when editing SQL

Bug #584797 reported by Robin Sheat
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
vim (Debian)
Fix Released
Unknown
vim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vim

To reproduce:
1) Open a .sql file in vim
2) Go into insert mode, attempt to move around the file contents using the regular arrow keys.
3) Note that, while up and down work, left and right don't.

Expected result:
* Left and right work

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: vim-runtime 2:7.2.330-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon May 24 14:35:59 2010
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=nl_NL:nl
 PATH=(custom, user)
 LANG=nl_NL.utf8
 SHELL=/bin/bash
SourcePackage: vim

Revision history for this message
Robin Sheat (eythian) wrote :
Revision history for this message
Dominique Pellé (dominique-pelle) wrote :

I can't reproduce this bug.

Can you try with "vim -u NONE foo.sql" to make sure it's not one of your settings in your ~/.vimrc which is causing the problem?

Revision history for this message
Will Gray (graywh) wrote :

Yes, the current version of ftplugin/sql.vim imaps <Left>, <Right>, and uses <C-c> as a sort of mapleader for insert mode. There are variables you can set to customize the maps. You'll probably want to read the documentation in :h sql-completion.

Changed in vim (Ubuntu):
status: New → Invalid
Revision history for this message
permanuno (permanuno) wrote :

This should not be invalid. It was fixed in debian bug 560083 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560083). Debian vim 2:7.2.436+hg~e12b9d992389-1, but Ubuntu Lucid is only at 2:7.2.330-1ubuntu3. Can anyone suggest a workaround?

Changed in vim (Ubuntu):
status: Invalid → New
Revision history for this message
permanuno (permanuno) wrote :

To answer my own question, I have a workaround that should work until Ubuntu is brought up to vim 2:7.2.436.

1) Download sql.diff from debbugs #560083.
2) Make a copy of the system-wide vim runtime: cp -a /usr/share/vim/vim72 /tmp/vim-runtime
3) Apply sql.diff to the copy of vim runtime: cd /tmp/vim-runtime; patch -p2 < /tmp/sql.diff
4) patch will report that autoload/sqlcomplete.vim and ftplugin/sql.vim were updated. Copy these to ~/.vim:
   mkdir -p ~/.vim/autoload && cp /tmp/vim-runtime/autoload/sqlcomplete.vim ~/.vim/autoload;
   mkdir -p ~/.vim/ftplugin && cp /tmp/vim-runtime/ftplugin/sql.vim

Now arrows should work when editing a sql file.

Revision history for this message
permanuno (permanuno) wrote :

diff / patch file that fixes two sql vim-runtime files

Revision history for this message
permanuno (permanuno) wrote :

vim-runtime file after applying patch. Goes in ~/.vim/autoload

Revision history for this message
permanuno (permanuno) wrote :

vim-runtime file after applying patch. Goes in ~/.vim/ftplugin

tags: added: vim vim-runtime
Revision history for this message
Will Gray (graywh) wrote :

This has been fixed in debian vim 2:7.2.436+hg~e12b9d992389-1

Changed in vim (Ubuntu):
status: New → Fix Committed
tags: added: patch
Changed in vim (Debian):
status: Unknown → Fix Released
Adam Guthrie (therigu)
tags: added: patch-accepted-debian
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.7 KiB)

This bug was fixed in the package vim - 2:7.3.035+hg~8fdc12103333-1ubuntu1

---------------
vim (2:7.3.035+hg~8fdc12103333-1ubuntu1) natty; urgency=low

  * Merge with Debian unstable (lp: #662276):
    - Use case-insensitive matching for month and day of week names in
      crontab's syntax file (lp: #517019 aka Debian bug #568378).
    - Fix sqlcomplete's <Left>/<Right> maps so they don't interfere with
      normal usage (lp: #584797 aka Debian bug #560083).
    - [7.2.386] KDE 3.1 focus hack causes problems for other window managers
      (lp: #535341).
  * Remaining changes:
    - debian/control:
      + Drop vim-lesstif package and lesstif2-dev build-dependency.
      + Rename Vcs-* to XS-Debian-Vcs-*.
    - debian/rules:
      + Don't build the vim-lesstif variant in Ubuntu.
    - debian/runtime/debian.vim.in:
      + Add Launchpad integration to the Help menu if launchpad-integration is
        installed.
    - debian/runtime/vimrc:
      + "syntax on" is a sane default for non-tiny vim
    - debian/patches/debian/ubuntu-grub-syntax.patch:
      + Add Ubuntu-specific "quiet" keyword.

vim (2:7.3.035+hg~8fdc12103333-1) unstable; urgency=low

  * Pull patches 001 - 035.
    + More robust YAML highlighting. (Closes: #535682)
  * debian/rules:
    + Stop overriding CFLAGS on the command-line when invoking make. Upstream
      enforces an upper-limit of 1 for _FORTIFY_SOURCE due to the use of
      flexible arrays in nested structs, which improperly cause Vim to crash
      with _FORTIFY_SOURCE=2.
    + Use DEB_HOST_ARCH_OS instead of DEB_HOST_GNU_SYSTEM to determine whether
      Linux-specific functionality is enabled.
    + Use dpkg-vendor to change build configuration when building on Ubuntu.
      Thanks to Michael Bienia for the patch.
  * Make helpztags capable of generating tags files for non-English help
    files. (Closes: #600248)
  * Debian runtime:
    + Add natty as a recognized distribution. (Closes: #600560)
    + Add metapackages as a recognized section. (Closes: #600562)
    + Remove etch as a recognized distribution.
  * debian/control: Add dpkg-dev (>= 1.15.1) Build-Depends for dpkg-vendor.

vim (2:7.3.000+hg~ee53a39d5896-1) unstable; urgency=low

  * New upstream release.
  * debian/rules:
    + Explicitly use the dynamic loading Python interfaces.
    + Remove cleanup from clean target which are now properly handled by
      upstream's Makefile.
  * Update version information in documentation.

vim (2:7.3f.20100812+hg~20e83abf88b1-1) experimental; urgency=low

  * Merge latest 7.3f pre-release.
    + Correctly restore multi-byte terminal titles when exiting Vim. (Closes:
      #558153)
    + Highlight text inside math zones correctly for tex files. (Closes:
      #509908)
    + Recognize nested cite regions in tex files. (Closes: #444288)
    + Support syntax highlighting of bash's $"". (Closes: #473736)
  * Patches merged upstream:
    + perl-indent-block.patch
    + logcheck-ftplugin.patch
    + tex-syntax-verbatim-spell.patch
  * Enable Lua scripting.
    + Add liblua5.1-0-dev and lua5.1 to Build-Depends.
    + Enable lua interface via dynamic loading.
  * Switch Perl interface to dynamic loading.
  * debi...

Read more...

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

Other bug subscribers

Remote bug watches

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