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

Foldmethod set to syntax for c or cpp file

Expand Messages
  • √Čtienne Faure
    Hello, I would like to use the syntax foldmethod method but all I can get is no fold found . I thought is was somewhere caused by an added script and tried
    Message 1 of 2 , Aug 3, 2011
    • 0 Attachment
      Hello,

      I would like to use the syntax foldmethod method but all I can get is
      "no fold found".
      I thought is was somewhere caused by an added script and tried the following:
      (Using the latest vim without cream, version 7.3.266, on windows seven)

      gvim -U NONE -u NONE toto.cpp
      :set nocp
      :set filetype=cpp
      :syntax on
      :set foldmethod=syntax
      zc
      -> No fold found (having the cursor inside a block)

      Dummy content of toto.cpp:

      int main (int argc, char** argv)
      {
      if (argc == 0)
      {
      printf("pouet\n");
      printf("pouet\n");
      printf("pouet\n");
      }
      return 0;
      }

      I'm having the same issue with the file renamed "toto.c" and the
      filetype set to c.

      What am I missing ?

      Etienne

      --
      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
    • √Čtienne Faure
      Hello again, I guess I found my problem: ~/vimfiles/after/syntax/c.vim was the cause. It was coming from http://www.vim.org/scripts/script.php?script_id=1201 I
      Message 2 of 2 , Aug 3, 2011
      • 0 Attachment
        Hello again,

        I guess I found my problem: ~/vimfiles/after/syntax/c.vim was the cause.
        It was coming from http://www.vim.org/scripts/script.php?script_id=1201
        I don't remember how it ended up in after/ directory.

        Even though I've solved my issue, I don't understand it.

        Regards,

        Etienne

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.