mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 04:34:29 +08:00
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
#
|
|
%d
|
|
filetype indent on
|
|
set bs=2 et sts=4 sw=4 ft=javascript
|
|
call setline(1, '$(document).ready(function() {})')
|
|
DelimitMateReload
|
|
exec "normal 31|i\<CR>x\<Esc>"
|
|
================================================================================
|
|
$(document).ready(function() {
|
|
x
|
|
})
|
|
--------------------------------------------------------------------------------
|
|
# Issue #95
|
|
new
|
|
exec "normal i(\<CR>test)x"
|
|
================================================================================
|
|
(
|
|
test
|
|
)x
|
|
--------------------------------------------------------------------------------
|
|
# Remove CR expansion on BS
|
|
%d
|
|
exec "normal i(\<CR>\<BS>x"
|
|
================================================================================
|
|
(x)
|
|
--------------------------------------------------------------------------------
|
|
# Consider indentation with BS inside an empty CR expansion.
|
|
%d
|
|
exec "normal i( \<CR>\<BS>\<BS>x"
|
|
================================================================================
|
|
(x)
|
|
--------------------------------------------------------------------------------
|
|
# Conflict with indentation settings (cindent). Issue #95
|
|
se cindent
|
|
call setline(1, ['sub foo {',' while (1) {', ' ', ' }', '}'])
|
|
call cursor(3, 8)
|
|
normal a}x
|
|
================================================================================
|
|
sub foo {
|
|
while (1) {
|
|
|
|
}x
|
|
}
|
|
--------------------------------------------------------------------------------
|
|
%d
|
|
call setline(1, "\"{bracketed}")
|
|
normal A"x
|
|
================================================================================
|
|
"{bracketed}"x
|
|
--------------------------------------------------------------------------------
|