# HG changeset patch # User Steve Losh # Date 1350084497 14400 # Node ID e3bb00c0db497432446d7c33a549024b3bee3a9e # Parent 255d5232b0f6b73cdf950687e34437717df37392 Tweak wording. diff -r 255d5232b0f6 -r e3bb00c0db49 chapters/35.markdown --- a/chapters/35.markdown Fri Oct 12 19:25:40 2012 -0400 +++ b/chapters/35.markdown Fri Oct 12 19:28:17 2012 -0400 @@ -76,12 +76,14 @@ :::vim :echo "abcd"[0:2] -Vim displays "abc". It does not allow you to use negative indices with strings though: +Vim displays "abc". However, you can't use negative bare indices with strings. +You *can* use negative indices when slicing strings though! Run the following +command: :::vim - :echo "abcd"[-1] "abcd"[-1:] + :echo "abcd"[-1] . "abcd"[-2:] -will echo " d". +Vim displays "cd" (using a negative index silently resulted in an empty string). Concatenation -------------