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

Re: Macros

Expand Messages
  • Bram Moolenaar
    ... This will be a common question. I intend to add some support for this. There are no clear plans though. ... This indeed depends on the comments used. We
    Message 1 of 2 , Dec 21, 2000
      Ian Midgley wrote:

      > My Question is regarding folding. I'm currently using foldmethod=marker.
      >
      > I use visual mode to highlight a section of code to be folded and the type
      > :fold. This creates a fold which is fine, however how can I make the editor
      > add the foldmarkers at the start and end of the fold automatically as when
      > you exit the file and re-open it the folds are not there unless you add the
      > foldmarkers manually?

      This will be a common question. I intend to add some support for this. There
      are no clear plans though.

      > Can anyone give me a few clues about how I could write a macro to add the
      > foldmarkers eg for a 'c' file:
      >
      > /* {{{ fold name */ needs to be added at start of fold section and /* }}}
      > */ needs to be added at the end of the fold section.
      >
      > Emacs for example adds these fold marks (with the appropriate comments
      > dependant upon the language syntax of the filetype being used)

      This indeed depends on the comments used. We probably need a new option to
      set this. And then the option needs to be set, depending on the language.

      It would be good to see a few examples for this, using mappings and a Vim
      script, before implementing it inside Vim.

      --
      hundred-and-one symptoms of being an internet addict:
      72. Somebody at IRC just mentioned a way to obtain full motion video without
      a PC using a wireless protocol called NTSC, you wonder how you never
      heard about it

      /// 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.