mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-10-17 19:41:28 +08:00
Make smart quote work beyond the first column. Closes #89.
This commit is contained in:
1 parent
8ec2bcb89a
commit
f1e92d05d5
2 files changed
+3
-1
No files matched your search
@@ -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