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

Re: formatting javascript in a perl file

Expand Messages
  • Chris Schneider
    Instead of shelling out to perltidy, you d just need to shell out to a javascript tidy program. _j or whatever could be your mapping. Specifically the visual
    Message 1 of 2 , Feb 11, 2013
    • 0 Attachment
      Instead of shelling out to perltidy, you'd just need to shell out to a javascript tidy program.  _j or whatever could be your mapping.  Specifically the visual mapping part answers your direct question.






      On Mon, Feb 11, 2013 at 8:02 AM, Imholz, John J. <imholzj@...> wrote:
      Is there a way to format a selection of javascript that is in a perl file?

      Something like I can do with perltidy:  (from my .vimrc)

      " Tidy selected lines (or entire file) with _t:
      nnoremap <silent> _t :%!perltidy -q<Enter>
      vnoremap <silent> _t :!perltidy -q<Enter>

      jji


      --
      --
      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.



      --
      --
      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.