Bug#713066: yaml indentation is faulty, could use improvement

martin f krafft madduck at debian.org
Sat Jun 22 09:56:32 UTC 2013


Package: vim-runtime
Version: 2:7.3.923-2
Severity: minor
File: /usr/share/vim/vim73/indent/yaml.vim

YAML syntax is very flexible and it's often not possible to
determine what will happen next. However, the current implementation
is IMHO suboptimal and could be improved.

The syntax for a hash is lines of variable-value pairs separated by
a colon:

  ---
  foo: bar
  colour: blue

It is possible to place these into a list as well, i.e. a list of
hashes:

  ---
  - a: b
    c: d
  - 1: 2
    3: 4

Unfortunately, when entering this, the list's indentation level is
not preserved, e.g. (▮ is cursor position, ▯ is where I think it
should be):

  ---
  - a: b<return>
  ▮ ▯

I think it would be reasonable to assume that the user is still
entering more hash values and keep the list indentation, that is,
indent the cursor to align with the previous key ('a:').

Thank you for your consideration.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-rc4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim            2:7.3.923-2
ii  vim-nox [vim]  2:7.3.923-2

vim-runtime suggests no packages.

-- debconf-show failed


-- 
 .''`.   martin f. krafft <madduck at d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1124 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20130622/4f1b6443/attachment.sig>


More information about the pkg-vim-maintainers mailing list