Loading ...
Sorry, an error occurred while loading the content.

Plugin for editing code inside markdown

Expand Messages
  • Alberto Miorin
    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
    Message 1 of 3 , Apr 18, 2013
    • 0 Attachment
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • LCD 47
      On 18 April 2013, Alberto Miorin wrote: [...] ... [...] For what it s worth, the SyntaxRange plugin addresses nicely the syntax
      Message 2 of 3 , Apr 18, 2013
      • 0 Attachment
        On 18 April 2013, Alberto Miorin <newsgroup.vim@...> wrote:
        [...]
        > 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.
        [...]

        For what it's worth, the SyntaxRange plugin addresses nicely the
        syntax highlighting part, but not the indent and the other goodies:

        http://www.vim.org/scripts/script.php?script_id=4168

        /lcd

        --
        --
        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@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Christian Brabandt
        ... You could have used the NrrwRgn plugin http://www.vim.org/scripts/script.php?script_id=3075 regards, Christian -- -- You received this message from the
        Message 3 of 3 , Apr 19, 2013
        • 0 Attachment
          On Thu, April 18, 2013 22:04, Alberto Miorin wrote:
          > 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.
          >
          You could have used the NrrwRgn plugin
          http://www.vim.org/scripts/script.php?script_id=3075

          regards,
          Christian

          --
          --
          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@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.