Permalink
Browse files

fix cursor placement for indented php tag

expanding `body>php` would leave the cursor in the 2nd column inside the
php tag instead of at the end of the line. using `_` for the cursor position and periods for trailing spaces, the expansion looked like:

```
<body>
    <?php
 _......
    ?>
</body>
```

ensure that `s:SparkupNext` correctly returns the matching subpattern for an
empty line.
  • Loading branch information...
1 parent 1d6cac9 commit ba0b8fee92708100eed33c77ec1c15305b82ace5 @nixon nixon committed Dec 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 vim/ftplugin/html/sparkup.vim
@@ -111,7 +111,7 @@ endfunction
function! s:SparkupNext()
" 1: empty tag, 2: empty attribute, 3: empty line
- let n = search('><\/\|\(""\)\|^\s*$', 'Wp')
+ let n = search('><\/\|\(""\)\|\(^\s*$\)', 'Wp')
if n == 3
startinsert!
else

0 comments on commit ba0b8fe

Please sign in to comment.