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

_% and _# hard to locate in help

Expand Messages
  • Walter Briscoe
    I answered news://6594a6d9.0409132230.2d9d5284@posting.google.com in news://comp.editors. the OP wanted to use the current file name in an ex command. I knew
    Message 1 of 1 , Sep 14, 2004
    • 0 Attachment
      I answered news://6594a6d9.0409132230.2d9d5284@... in
      news://comp.editors. the OP wanted to use the current file name in an ex
      command. I knew the answer was % but found it hard to locate it. (:help
      %CTRL-D matches 29 times.) Can I suggest something like this patch?

      D:\wfb\vim\bld\vim63) diff -c runtime/doc/editing.txt.0 runtime/doc/editing.txt
      *** runtime/doc/editing.txt.0
      --- runtime/doc/editing.txt
      **************
      *** 29,35
      *current-file*
      As long as you don't write the buffer, the original file remains unchanged.
      If you start editing a file (read a file into the buffer), the file name is
      ! remembered as the "current file name".

      *alternate-file*
      If there already was a current file name, then that one becomes the alternate
      --- 29,35 -----
      *current-file*
      As long as you don't write the buffer, the original file remains unchanged.
      If you start editing a file (read a file into the buffer), the file name is
      ! remembered as the "current file name" for which % |_%| is usable in Ex commands.

      *alternate-file*
      If there already was a current file name, then that one becomes the alternate
      **************
      *** 33,39

      *alternate-file*
      If there already was a current file name, then that one becomes the alternate
      ! file name. All file names are remembered in the file list. When you enter a
      file name, for editing (e.g., with ":e filename") or writing (e.g., with (:w
      file name"), the file name is added to the list. You can use this list to
      remember which files you edited and to quickly switch from one file to
      --- 33,40 -----

      *alternate-file*
      If there already was a current file name, then that one becomes the alternate
      ! file name for which # |_#| is usable in Ex commands.
      ! All file names are remembered in the file list. When you enter a
      file name, for editing (e.g., with ":e filename") or writing (e.g., with (:w
      file name"), the file name is added to the list. You can use this list to
      remember which files you edited and to quickly switch from one file to

      D:\wfb\vim\bld\vim63)
      --
      Walter Briscoe
    Your message has been successfully submitted and would be delivered to recipients shortly.