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

[PATCH] ftplugin/man.vim

Expand Messages
  • SungHyun Nam
    Hello, I noticed ftplugin/man.vim has problem if user set nu or rnu. I m not sure disabling the nu/rnu is a good idea. I just follow the rule of VIM s help
    Message 1 of 2 , Jul 15, 2013
    • 0 Attachment
      Hello,

      I noticed ftplugin/man.vim has problem if user set nu or rnu.

      I'm not sure disabling the nu/rnu is a good idea.
      I just follow the rule of VIM's help page.
      If someone wants to set nu/rnu in man page, we can change like:
      let $MANWIDTH = winwidth(0) - &nu - &rnu

      I'm not sure 'nofen' is really needed. Just wanted to disable all
      the settings which affects winwidth.

      Thanks,
      namsh

      diff -r aa77364a8653 runtime/ftplugin/man.vim
      --- a/runtime/ftplugin/man.vim Sun Jul 07 16:15:35 2013 +0200
      +++ b/runtime/ftplugin/man.vim Mon Jul 15 10:45:18 2013 +0900
      @@ -151,7 +151,7 @@
      " Avoid warning for editing the dummy file twice
      setl buftype=nofile noswapfile

      - setl ma
      + setl ma nonu nornu nofen
      silent exec "norm 1GdG"
      let $MANWIDTH = winwidth(0)
      silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"

      --
      --
      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... I think it s OK, because filetype is set later. If someone wants to view man pages with specific settings a ftplugin in the after directory should
      Message 2 of 2 , Jul 17, 2013
      • 0 Attachment
        SungHyun Nam wrote:

        > I noticed ftplugin/man.vim has problem if user set nu or rnu.
        >
        > I'm not sure disabling the nu/rnu is a good idea.
        > I just follow the rule of VIM's help page.
        > If someone wants to set nu/rnu in man page, we can change like:
        > let $MANWIDTH = winwidth(0) - &nu - &rnu
        >
        > I'm not sure 'nofen' is really needed. Just wanted to disable all
        > the settings which affects winwidth.

        I think it's OK, because 'filetype' is set later. If someone wants to
        view man pages with specific settings a ftplugin in the "after"
        directory should work (I haven't tried it though).


        --
        For humans, honesty is a matter of degree. Engineers are always honest in
        matters of technology and human relationships. That's why it's a good idea
        to keep engineers away from customers, romantic interests, and other people
        who can't handle the truth.
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        You received this message from the "vim_dev" 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_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.