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

Re: Question on ]m ]M [m [M commands

Expand Messages
  • Bram Moolenaar
    ... It doesn t work for me. [m jumps back to the previous {} inside the function, not to the start of the function. ... All C functions should have a { in
    Message 1 of 2 , Feb 1, 2001
    • 0 Attachment
      Yegappan Lakshmanan wrote:

      > According to the documentation, the ]m, ]M, [m and [M commands
      > can be used in Java or in a similar structured language to jump
      > to the start or the end of a method. I tried this in C for
      > jumping to the start and end of a function. It works without
      > any problems. Why is C not mentioned in the documentation for
      > this command?

      It doesn't work for me. [m jumps back to the previous {} inside the function,
      not to the start of the function.

      > I can use the [[ command to jump to the start of a C function.
      > But this will not work if a function declaration is something
      > like
      >
      > void func(void) {
      >
      > In the above case, the [m command works without any problems.

      All C functions should have a "{" in the first column. Otherwise it doesn't
      look like a C function. It's not illegal, just bad style. You could use [{
      to find that {.

      --
      hundred-and-one symptoms of being an internet addict:
      100. The most exciting sporting events you noticed during summer 1996
      was Netscape vs. Microsoft.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.