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

Vim xmms front-end Rev. 3

Expand Messages
  • Shlomi Fish
    The macros are now: map 0 5y$ji ki 5 :s/ / /ge 0 5y$:!xmms -e 5 ddk map
    Message 1 of 2 , Feb 12, 2002
      The macros are now:

      map <F3> 0"5y$ji<CR><ESC>ki<C-R>5<ESC>:s/'/'\\''/ge<CR>0"5y$:!xmms -e '<C-R>5'<CR><CR>ddk

      map <S-F3> 0"5y$ji<CR><ESC>ki<C-R>5<ESC>:s/'/'\\''/ge<CR>0"5y$:!xmms '<C-R>5'<CR><CR>ddk

      And the command to execute is again "ls | gvim -". Now single-quotes (and
      all other charactersare) are handled correctly and the code is fool-proof,
      and cannot execute arbitrary commands.

      What I did was copy the register to a new line. Exec a regex substitute on
      it to handle the single quotes. Then, yank it again and use it, and when
      everything is finished delete the line and position myself on the original

      I dare say these vi macros look like line noise, but the funny thing is I
      could spot some patterns there and understand it. I don't know how capable
      I am of reading other people's vi macros, but it's a start.


      Shlomi Fish

      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"
    Your message has been successfully submitted and would be delivered to recipients shortly.