mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Fix duplicate closing delimiter after <CR>
This commit is contained in:
24
Makefile
24
Makefile
@@ -1,17 +1,18 @@
|
|||||||
PLUGIN=delimitMate
|
PLUGIN=delimitMate
|
||||||
|
VIMFOLDER=~/.vim
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -m 755 -d ~/.vim
|
install -m 755 -d ${VIMFOLDER}
|
||||||
install -m 755 -d ~/.vim/plugin/
|
install -m 755 -d ${VIMFOLDER}/plugin/
|
||||||
install -m 755 -d ~/.vim/autoload/
|
install -m 755 -d ${VIMFOLDER}/autoload/
|
||||||
install -m 755 -d ~/.vim/doc/
|
install -m 755 -d ${VIMFOLDER}/doc/
|
||||||
cp -f doc/${PLUGIN}.txt ~/.vim/doc/${PLUGIN}.txt
|
cp -f doc/${PLUGIN}.txt ${VIMFOLDER}/doc/${PLUGIN}.txt
|
||||||
cp -f plugin/${PLUGIN}.vim ~/.vim/plugin/${PLUGIN}.vim
|
cp -f plugin/${PLUGIN}.vim ${VIMFOLDER}/plugin/${PLUGIN}.vim
|
||||||
cp -f autoload/${PLUGIN}.vim ~/.vim/autoload/${PLUGIN}.vim
|
cp -f autoload/${PLUGIN}.vim ${VIMFOLDER}/autoload/${PLUGIN}.vim
|
||||||
cp -f autoload/${PLUGIN}Tests.vim ~/.vim/autoload/${PLUGIN}Tests.vim
|
cp -f autoload/${PLUGIN}Tests.vim ${VIMFOLDER}/autoload/${PLUGIN}Tests.vim
|
||||||
|
|
||||||
doc_update: install
|
doc_update: install
|
||||||
/usr/bin/vim -u NONE -c ':helptags ~/.vim/doc' -c ':q'
|
/usr/bin/vim -u NONE -c ':helptags ${VIMFOLDER}/doc' -c ':q'
|
||||||
|
|
||||||
zip:
|
zip:
|
||||||
zip -r ${PLUGIN}.zip doc plugin autoload
|
zip -r ${PLUGIN}.zip doc plugin autoload
|
||||||
@@ -27,3 +28,8 @@ vimball: install
|
|||||||
gzip: vimball
|
gzip: vimball
|
||||||
gzip -f ${PLUGIN}.vba
|
gzip -f ${PLUGIN}.vba
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f ${VIMFOLDER}/plugin/${PLUGIN}.vim
|
||||||
|
rm -f ${VIMFOLDER}/autoload/${PLUGIN}.vim
|
||||||
|
rm -f ${VIMFOLDER}/doc/${PLUGIN}.txt
|
||||||
|
rm -f ${VIMFOLDER}/autoload/${PLUGIN}Tests.txt
|
||||||
|
|||||||
@@ -494,8 +494,12 @@ function! delimitMate#Finish() " {{{
|
|||||||
let b:delimitMate_buffer = []
|
let b:delimitMate_buffer = []
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
let col = col('.') -2
|
let col = col('.') -2
|
||||||
"echom 'col: ' . col . '-' . line[:col] . "|" . line[col+len+1:] . '%' . buffer
|
echom 'col: ' . col . '-' . line[:col] . "|" . line[col+len+1:] . '%' . buffer
|
||||||
call setline('.', line[:col] . line[col+len+1:])
|
if col < 0
|
||||||
|
call setline('.', line[col+len+1:])
|
||||||
|
else
|
||||||
|
call setline('.', line[:col] . line[col+len+1:])
|
||||||
|
endif
|
||||||
let i = 1
|
let i = 1
|
||||||
let lefts = "\<Left>"
|
let lefts = "\<Left>"
|
||||||
while i < len
|
while i < len
|
||||||
|
|||||||
@@ -203,6 +203,9 @@ function! delimitMateTests#Main() " {{{
|
|||||||
unlet g:delimitMate_excluded_ft
|
unlet g:delimitMate_excluded_ft
|
||||||
set ft=
|
set ft=
|
||||||
|
|
||||||
|
" Duplicated delimiter after CR
|
||||||
|
call Type("Duplicated delimiter after CR", "(\<CR>", ['(', '|)'], [])
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" Show results: {{{
|
" Show results: {{{
|
||||||
|
|||||||
Reference in New Issue
Block a user