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

1294Re: [jasspa] open, save hooks?

Expand Messages
  • Jon Green
    Dec 22, 2004
      Kimmo Pietarinen wrote:
      > I miss the functionality that is found for example in vim that the
      > cursor position is saved for visited files and restored when the file is
      > re-opened. I know that it is possible to get a somewhat similar
      > functionality by using the -c flag to 'me', but I do not want 'me' to
      > restore my entire previous session including open files etc.
      >

      Hi Kimmo,

      I'm not that familier with VIM. So to clarify what you are saying then
      if a file is opened that was opened in a previous session then the file
      position (line/col) is restored as the starting point.

      Like you say similar to -c. The difference being is that you open the
      file yourself from a 'blank' session (or one with say a few files
      loaded). I assume that there is a limit on the "visited" files - would
      this be the last 10 files perhaps ?

      Jon.

      >
      >
      > Ok, so I though I would have this as a small Chrismas project and
      > implement a macro that does this. I am new to macro programming and have
      > only done some small macros previously. I have searched the help pages
      > but not really figured out how to intercept the file open and save
      > commands. Is it possible to do and what hooks or callbacks should I use?
      > I have tried to do something with $buffer-fhook, $buffer-bhook and
      > $buffer-dhook, but they do not seem really appropriate...

      No the fhook mechanism is template (language) specific it is not generic
      enough to cater for all files. The all file hook was discussed some
      time ago but I do not think it is in the current public release build.
    • Show all 4 messages in this topic