endfor
" Spawn a new small code commenting window nonbinded to file
new CodeCommCommenting
- setlocal noreadonly noswapfile buftype=acwrite
+ setlocal noreadonly noswapfile buftype=acwrite filetype=codecomm
call append("^", ready)
" Separate codecomm_file consolidating function, called when buffer is saved
autocmd! BufWriteCmd CodeCommCommenting
echohl MoreMsg | echomsg "Commented:" len(ready) "lines" | echohl None
endfunction
autocmd BufWriteCmd CodeCommCommenting call s:AppendCC()
- " Simple syntax highlighting for that window
- syntax region CCBlock start=/^-\{5}#/ end=/^-\+ >8 -\+/
- highlight link CCBlock Statement
normal zR
startinsert
endfunction