mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Make smart quote work beyond the first column. Closes #89.
This commit is contained in:
@@ -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) == '\'
|
||||
|
||||
@@ -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'"
|
||||
|
||||
Reference in New Issue
Block a user