diff --git a/doc/textile.txt b/doc/textile.txt index fe96b7f..dadc333 100644 --- a/doc/textile.txt +++ b/doc/textile.txt @@ -33,6 +33,10 @@ COMMANDS *textile-commands* rt +:TextileRenderSplit - ... to a new split + + rs + :TextileRenderFile - ... to a file rf @@ -56,10 +60,10 @@ Other: ============================================================================== -CREDITS *textile-credits* +CREDITS *textile-credits* - "Dominic Mitchell":http://happygiraffe.net/: initial syntax highlighting -- "Aaron Bieber":http://blog.aaronbieber.com/: improved syntax highlighting +- "Aaron Bieber":http://blog.aaronbieber.com/: improved syntax highlighting - "Tim Harper":http://tim.theenchanter.com/ : improved syntax highlighting, plugin diff --git a/ftplugin/textile.vim b/ftplugin/textile.vim index fa84c49..d2dae59 100644 --- a/ftplugin/textile.vim +++ b/ftplugin/textile.vim @@ -4,10 +4,12 @@ command! -nargs=0 TextileRenderFile call TextileRenderBufferToFile() command! -nargs=0 TextileRenderTab call TextileRenderBufferToTab() +command! -nargs=0 TextileRenderSplit call TextileRenderBufferToSplit() command! -nargs=0 TextilePreview call TextileRenderBufferToPreview() noremap rp :TextilePreview noremap rf :TextileRenderFile noremap rt :TextileRenderTab +noremap rs :TextileRenderSplit setlocal ignorecase setlocal wrap setlocal lbr @@ -55,5 +57,13 @@ function! TextileRenderBufferToTab() tabnew call append("^", split(html, "\n")) set syntax=html + set nomodified endfunction +function! TextileRenderBufferToSplit() + let html = TextileRender(getbufline(bufname("%"), 1, '$')) + new + call append("^", split(html, "\n")) + set syntax=html + set nomodified +endfunction