E37: No write since last change (add ! to override)

2006-09-05

="" 挿入 17:27

inoremap = <C-O>:call <SID>XMLEqualComplement()<CR>

function! s:XMLEqualComplement()
	let line = getline('.')
	let col = col('.')

	call s:CursorInsert("=")

	let op = strridx(line, '<', col - 1)
	if op != -1
		let cp = stridx(line, '>', op)
		if cp == -1 || cp > col
			call s:CursorInsert('""')
		endif
	endif
endfunction

function! s:CursorInsert(str)
	let line = getline('.')
	let col  = col('.')
	let pos  = getpos('.')

	if col == strlen(line)
		exe 'normal! a' . a:str
	else
		exe 'normal! i' . a:str
		normal l
	endif
endfunction

結局こんなんにした。挿入したあとに normal h するのはうまくいかない。

test

DenDrickyDenDricky 2018/04/26 08:37 Levitra Generico Contrareembolso <a href=http://cheapciali.com>buy cialis</a> Cipro And Keflex Cialis In Offerta

MatrareMatrare 2018/10/13 01:52 Buy Propecia In Ontario Amoxicillin And Diphenhydramine Hci Interactions <a href=http://cialicheap.com>cialis</a> Amoxicillin Buy Buy Cialis Soft Tabs Online

WilliamMeacyWilliamMeacy 2019/02/02 11:26 acheter cialis generique
cheap cialis super active.com
<a href=https://kellyannehulme.com>20 mg cialis buy</a>
side effects for cialis
overnight cialis canada
https://greatwinesgrandhouses.com
cheapest generic cialis online
cialis daily use coupon
<a href=https://kellyannehulme.com>Cialis 20 mg cheap price</a>
shop for cialis
cialis madrid
https://kellyannehulme.com

WilliamMeacyWilliamMeacy 2019/02/02 11:26 cialis for once daily use reviews
cialis online sicuro opinioni
<a href=https://kellyannehulme.com>cialis buy online</a>
ajanta pharma cialis review
generic cialis overnight delivery 100mg
https://kellyannehulme.com
purchasing cialis online
cialis tadalafil lilly
<a href=https://kellyannehulme.com>20 mg cialis buy</a>
canadian pharmacy cialis generic
cialis in der apotheke
https://greatwinesgrandhouses.com

ArnoldvagArnoldvag 2019/02/05 20:50 achat cialis sans ordonnance
buying cialis in turkey
<a href="http://cialisfurr.com">buy cialis</a>
cialis half life
buy cialis soft tabs
<a href="http://cialisfurr.com">Buy Cheap Cialis</a>
sam's club cialis price
what prescription plans cover cialis
<a href="http://cialisfurr.com">Cheap Cialis</a>

ArnoldvagArnoldvag 2019/02/05 20:51 discreet cialis meds
buy cialis greece
<a href="http://cialisfurr.com">Cheap Cialis</a>
cialis erectile
cialis pbs cost
<a href="http://cialisfurr.com">Cheap Cialis</a>
cialis or vardenafil 20mg tablet
cialis price amazon
<a href="http://cialistlm.com">Buy Cialis Online</a>

ゲスト



トラックバック - http://vim.g.hatena.ne.jp/cho45/20060905