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

Re: Position of the cursor relative to window not file

Expand Messages
  • Jürgen Krämer
    Hi, ... you maybe have cindent set and because the first line ends with a comma, Vim thinks it s an incomplete parameter list that is going to be continued on
    Message 1 of 7 , Sep 30, 2009
      Hi,

      meino.cramer@... wrote:
      >
      > for scripting purposes I am searching a function in vimscript,
      > which returns the linenumber of the window the cursor is
      > currently in.
      > getpos() return beside other things the number of the line
      > when set number is on.
      > I am looking for a function which returns a number
      > between 0/1 and winheight() regardless how long the file
      > is (even if there no file at all)
      >
      > Thank you very much for your help in advance!
      >
      > PS: Why does vim indents the text of this mail after
      > the first line in this mysterious was?

      you maybe have cindent set and because the first line ends with a
      comma, Vim thinks it's an incomplete parameter list that is going
      to be continued on the next line.

      Regards,
      Jürgen

      --
      Sometimes I think the surest sign that intelligent life exists elsewhere
      in the universe is that none of it has tried to contact us. (Calvin)

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Fritz
      ... I d guess smartindent myself. ... --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more
      Message 2 of 7 , Oct 1, 2009
        On Oct 1, 1:22 am, Jürgen Krämer <jottka...@...> wrote:
        >
        > you maybe have cindent set and because the first line ends with a
        > comma, Vim thinks it's an incomplete parameter list that is going
        > to be continued on the next line.
        >

        I'd guess smartindent myself.

        The output of this command may help:

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