Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/textile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ COMMANDS *textile-commands*

<Leader>rt

:TextileRenderSplit - ... to a new split

<Leader>rs

:TextileRenderFile - ... to a file

<Leader>rf
Expand All @@ -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

Expand Down
10 changes: 10 additions & 0 deletions ftplugin/textile.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 <buffer> <Leader>rp :TextilePreview<CR>
noremap <buffer> <Leader>rf :TextileRenderFile<CR>
noremap <buffer> <Leader>rt :TextileRenderTab<CR>
noremap <buffer> <Leader>rs :TextileRenderSplit<CR>
setlocal ignorecase
setlocal wrap
setlocal lbr
Expand Down Expand Up @@ -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