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

trailing charactors

Expand Messages
  • Aaron
    Hi, I am trying to automate a set of search and replace commands which transpose a lilypond file into a different key. it is supposed to do the following. find
    Message 1 of 3 , Sep 2, 2003
    • 0 Attachment
      Hi,
      I am trying to automate a set of search and replace commands which
      transpose a lilypond file into a different key.

      it is supposed to do the following.

      find all ' and remove them
      find prall and replace with u
      art w
      grace z
      times v
      turn y
      fermata ^
      c to l
      d to t
      e to o
      f to r
      g to m
      a to q
      b to x
      and then change
      l to e
      t to fis
      o to g
      r to a
      m to b
      q to c
      x to d
      and finally
      u prall
      w trill
      z to grace
      v to times
      y to turn
      ^ to fermata

      These are the search and replacment I wrote, but I get trailing
      charactor error and it stops in the middle

      map ;po :g/a/s///g :g/prall/s//u/g :g/art/s//w/g :g/grace/s//z/g
      :g/times/s//v/g :g/turn/s//y/g :g/fermata/s//^/g :g/c/s//l/g :g/d/s//t/g
      :g/e/s//o/g :g/f/s//r/g :g/g/s//m/g :g/a/s//q/g :g/b/s//x/g :w
      :g/l/s//e/g :g/t/s//fis/g :g/o/s//g/g :g/r/s//a/g
      :g/m/s//b/g:g/q/s//c/g :g/x/s//d/g :w :g/^/s//fermata/g :g/u/s//prall/g
      :g/w/s//trill/g :g/v/s//times/g :g/y/s//turn/g :g/z/s//grace/g


      could someone help me debug this??
      Thanks
      Aaron
    • Antony Scriven
      ... It looks like that s all one command, without any |s or s separating the :globals. (Unless they got stripped?) If so, that s an error. You might like
      Message 2 of 3 , Sep 2, 2003
      • 0 Attachment
        Aaron wrote:

        > [...]
        >
        > These are the search and replacment I wrote, but I get trailing
        > charactor error and it stops in the middle
        >
        > map ;po :g/a/s///g :g/prall/s//u/g :g/art/s//w/g :g/grace/s//z/g
        > :g/times/s//v/g :g/turn/s//y/g :g/fermata/s//^/g :g/c/s//l/g :g/d/s//t/g
        > :g/e/s//o/g :g/f/s//r/g :g/g/s//m/g :g/a/s//q/g :g/b/s//x/g :w
        > :g/l/s//e/g :g/t/s//fis/g :g/o/s//g/g :g/r/s//a/g
        > :g/m/s//b/g:g/q/s//c/g :g/x/s//d/g :w :g/^/s//fermata/g :g/u/s//prall/g
        > :g/w/s//trill/g :g/v/s//times/g :g/y/s//turn/g :g/z/s//grace/g

        It looks like that's all one command, without any |s or
        <CR>s separating the :globals. (Unless they got stripped?)
        If so, that's an error.

        You might like to try placing each command on a separate
        line in a separate file, and then sourcing the file. You
        don't have to sacrifice the convenience of a map:

        nno ;po :so complicated-cmds.vim<CR>

        If there is still a problem, you might find this easier to
        debug than one long map.

        Antony
      • Aaron
        Thanks you were right I would never have been able to debug it on one line :) Aaron
        Message 3 of 3 , Sep 2, 2003
        • 0 Attachment
          Thanks
          you were right I would never have been able to debug it on one line :)
          Aaron
          >
          > You might like to try placing each command on a separate
          > line in a separate file, and then sourcing the file. You
          > don't have to sacrifice the convenience of a map:
          >
          > nno ;po :so complicated-cmds.vim<CR>
          >
          > If there is still a problem, you might find this easier to
          > debug than one long map.
          >
          > Antony
        Your message has been successfully submitted and would be delivered to recipients shortly.