X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=plugin%2Fcodecomm.vim;h=27bd890d4be5020c83b604e16a35ccec9d81bcc3;hb=ed4e098bc2052fd305cb8517ab5c094c66f00657;hp=00efad25d0c739e6296c3ed315137dd817999bd2;hpb=c4fcc9f7fcd4d929a1d9f61f858a531d74d6fff5;p=codecomm.git diff --git a/plugin/codecomm.vim b/plugin/codecomm.vim index 00efad2..27bd890 100644 --- a/plugin/codecomm.vim +++ b/plugin/codecomm.vim @@ -54,13 +54,13 @@ function! s:CodeComm() range 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 function! s:AppendCC() " Collect already written comments from file if it exists - let ccprev = [] + let ccprev = [" vim: filetype=codecomm", ""] if filereadable(g:codecomm_file) let ccprev = readfile(g:codecomm_file) endif @@ -71,9 +71,6 @@ function! s:CodeComm() range 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