Make smart quote work beyond the first column. Closes #89.

This commit is contained in:
Israel Chauca Fuentes
2012-03-03 16:08:28 -05:00
parent 8ec2bcb89a
commit f1e92d05d5
2 changed files with 3 additions and 1 deletions

View File

@@ -244,7 +244,7 @@ function! delimitMate#IsSmartQuote(char) "{{{
endif
let char_at = delimitMate#GetCharFromCursor(0)
let char_before = delimitMate#GetCharFromCursor(-1)
let valid_char_re = '\w\|[^[:punct:]]'
let valid_char_re = '\w\|[^[:punct:][:space:]]'
let word_before = char_before =~ valid_char_re
let word_at = char_at =~ valid_char_re
let escaped = delimitMate#CursorIdx() >= 1 && delimitMate#GetCharFromCursor(-1) == '\'

View File

@@ -32,3 +32,5 @@ set backspace=
"'\<Esc>a\<BS>x" "'x'"
set cpo=ces$
"'x" "'x'"
# Make sure smart quote works beyond first column.
" 'x" " 'x'"