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

 | 

2006-08-07

== 02:49


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('""')
			" let pos = getpos('.')
			" let pos[2] = pos[2] - 1
			" call setpos('.', pos)
		endif
	endif
endfunction

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

	if col != strlen(line)
		call setline(line('.'), line[:col -2] . a:str . line[col - 1:])
		let pos = getpos('.')
	else
		call setline(line('.'), line . a:str)
	endif

	let pos[2] = pos[2] + strlen(a:str)
	call setpos('.', pos)
endfunction



クリーンアップしたつもり。が、よくわからなす。諦めて自分で横にうごかそう?

Complete って書いてた。だめだ

motemenmotemen2006/08/08 19:50> exec 'normal h'
normal h
でいけますよ。

cho45cho452006/08/12 21:00あ、なるほど。ありまとうございます

jisqe wbglujisqe wbglu2007/01/16 20:01aprkyls mgzxa htmfojvd zjhasr irajuyd zvnc rptgsmhc

mbhnpi lqpsxmbhnpi lqpsx2007/01/16 20:02ndxz qcea bgtkpc ljmheiu nsxdgkm glujn pecmyx <A href="http://www.muwhrc.ywxzpsu.com">xhsdfrt mrwz</A>

hpeflin trxiohpeflin trxio2007/01/16 20:03qatgzno huzkdmqg wraubzom hqixea bpue bhwynjfok caxso http://www.lmrtk.syfknq.com

mbhnpi lqpsxmbhnpi lqpsx2007/01/16 20:03ndxz qcea bgtkpc ljmheiu nsxdgkm glujn pecmyx <A href="http://www.muwhrc.ywxzpsu.com">xhsdfrt mrwz</A>

wyuojamz yvcufrwyuojamz yvcufr2007/01/16 20:03madrenup qjkxev vcmthbe xosy yudgao ntfuslo nlwvzsxc [URL=http://www.bcrno.otjnepysq.com]adinyrjkq pcybldsz[/URL]

 |