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

Re: marks (a feature request)

Expand Messages
  • Ing. Stanislav Sitar
    ... Hi. I have been using editor TextPad for windows for years. Until I got tired with its limited regular expressions. TextPad has the unnamed marks feature
    Message 1 of 2 , Aug 1, 2003
    • 0 Attachment
      >> Feature query:
      >>
      >> Would anyone else find something alogn
      >> this line useful?
      >>
      >> m- removes all marks on a line
      >> m+ sets an "anonymous" mark
      >> These "anonymous" marks, which need not
      >> be limited in number, would be added to
      >> the list that can be reached
      >> by cycling through ]' (etc).
      >>
      >> i. Avoids having to recall which marks you've set.
      >> ii. Would be useful with :g and :v
      >>
      >> fwiw,
      >> Alan Isaac
      >>

      Hi.

      I have been using editor TextPad for windows for years.
      Until I got tired with its limited regular expressions.
      TextPad has the "unnamed marks" feature called bookmarks.

      I have found them *extremely* useful.

      In fact the unnamed marks are the only feature I miss in Vim.


      Consider this situation.

      You mark all lines containing string "blah blah blah"
      then you remove marks from lines that contain "foobar"
      then you add another series of marks, and subtract yet another
      and finally you tell vim to delete/copy/alter marked lines.

      I know, a vim guru is able to craft a :g command with a very
      complicated regular expression with the same functionality,
      but unnamed marks will enable *any* user make very complicated
      changes using a few commands
      1. :add_unnamed_mark
      2. :clear_unnamed_mark
      3. :toggle_the_unnamed mark
      those commands could be used with :g or :v commands
      or with commandline ranges

      It would be possible to map those commands to m+ , m- , m*

      existing commandline ranges (see :help range) would be enhanced with another
      range that would tell any command to operate on lines with/without unnamed
      mark (like :%s/foo/bar/ says: apply substitute command to the whole file,
      :#s/foo/bar/ would say apply the substitute command to the marked lines

      There would be also need to show bookmarked lines.
      there could be a column (similar to "line numbers column" or "fold column")


      I have tried to persuade Bram to consider adding "unnamed bookmarks" feature.
      Without any success ;-( .

      So If you thing that unnamed marks would be a good thing let us know.
      If there are enough users that thing the unnamed marks are a good thing
      we might be able to persuade Bram.


      Just my 2 cents worth.
      Stano
    • Mikolaj Machowski
      ... I agree with you, such filtering would be useful. But the last feature could probably be done with script like showmarks (basing on :sign) and building it
      Message 2 of 2 , Aug 1, 2003
      • 0 Attachment
        On Fri, Aug 01, 2003 at 09:49:35AM +0200, Ing. Stanislav Sitar wrote:
        > 1. :add_unnamed_mark
        > 2. :clear_unnamed_mark
        > 3. :toggle_the_unnamed mark
        > those commands could be used with :g or :v commands
        > or with commandline ranges
        > It would be possible to map those commands to m+ , m- , m*
        > existing commandline ranges (see :help range) would be enhanced with another
        > range that would tell any command to operate on lines with/without unnamed
        > mark (like :%s/foo/bar/ says: apply substitute command to the whole file,
        > :#s/foo/bar/ would say apply the substitute command to the marked lines
        > There would be also need to show bookmarked lines.
        > there could be a column (similar to "line numbers column" or "fold column")

        I agree with you, such filtering would be useful. But the last feature
        could probably be done with script like showmarks (basing on :sign) and
        building it into Vim is unnecessary.

        m.
        --
        LaTeX + Vim = http://vim-latex.sourceforge.net/
        Vim-list(s) Users Map: (last change 27 May)
        http://skawina.eu.org/mikolaj/vimlist
        Are You There?
      Your message has been successfully submitted and would be delivered to recipients shortly.