Thursday, April 18, 2013

Plugin for editing code inside markdown

Hi all,

I've published this plugin on github.
https://github.com/amiorin/vim-fenced-code-blocks

Here an explanation of the problem I tried to solve with it.

In GitHub flavor markdown, you can use

```vim
function! s:fun
echo "hello world!"
endfunction
```

and you get the code syntax highlighted in the final html.
But inside vim you don't have any help, it's just plain text,
so no autoindent and no syntax highlighting.

With this plugin you can extract the code in a temporary file
with the right extension to trigger the FileType autocmd.

When you go back to the markdown the plugin updates the
fenced code block automatically.

You can find a animated gif in the GitHub project homepage.

Please star the project if you like it.

Best regards
Alberto

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: