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

Format options in ftplugin/python.vim

Expand Messages
  • Alexei Alexandrov
    Hi, Currently file type script for Python doesn t set any text format options. This is not convenient - if textwidth is set, Vim starts to wrap lines for
    Message 1 of 1 , Jun 28, 2008
    • 0 Attachment
      Hi,

      Currently file type script for Python doesn't set any text format
      options. This is not convenient - if 'textwidth' is set, Vim starts to
      wrap lines for code as you write it. Also, 'o' command in normal mode
      doesn't insert the comment leader automatically.

      Please add the following code to ftplugin/python.vim:

      " Set 'formatoptions' to break comment lines but not other lines,
      " and insert the comment leader when hitting <CR> or using "o".
      setlocal fo-=t fo+=croql

      --
      Alexei Alexandrov


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.