Subject: Silly Hack of the Week: Gvim as a front-end to xmms

From: Shlomi Fish <[email-masked]>
Date: Thu, 7 Feb 2002 14:54:31 +0200 (IST)

Getting tired of looking for a good file manager without any major
side-effects, when all I needed was the ability to scroll the mp3 list, I
decided to adapt gvim to the job. The result are the following two lines,
which one can add to his .vimrc file:

map <F3> 0"5y$:!xmms -e "<C-R>5"<CR><CR>
map <C-F3> 0"5y$:!xmms "<C-R>5"<CR><CR>

To use it, run "ls | gvim -", put the cursor on the line which
contains the filename you wish to play and press F3 to enqueue it or
Ctrl+F3 to play it. Known Bugs:

1. Not resistant to backslashes, double quotes, back quotes, and other
shell special characters. (maybe I should use a single quote?) Thinking
about it a filename that contains a backslash may turn these macros
into a security hazard. (I.e: my-file-`rm -rf $HOME`.mp3)

2. Not compatible with filenames that contain newlines.

3. May or may not work with other vi clones, or with SysV vi's.

Disclaimer:
1. I may possibly be re-inventing the wheel, but nonetheless having fun in
the process and I learn how to program Vim.
2. Don't tell me emacs has it, because I know it does.

Regards,

	Shlomi Fish

----------------------------------------------------------------------
Shlomi Fish        [email-masked]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [email-masked]

"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"

---

From: Oleg Goldshmidt <[email-masked]>
Date: 07 Feb 2002 14:58:46 +0200

Shlomi Fish <[email-masked]> writes:

> all I needed was the ability to scroll the mp3 list

<snip>

> To use it, run "ls | gvim -"

Have you thought of aliasing it to "mpls"? ;-)

-- 
Oleg Goldshmidt | [email-masked] 
"If it ain't broken, it has not got enough features yet."

---

From: Tzafrir Cohen <[email-masked]>
Date: Thu, 7 Feb 2002 15:15:45 +0200 (IST)

> the process and I learn how to program Vim.

See for yourself:

http://vim.sf.net/

Many, many gvim-related stuff. e.g: how to use gvim as the editor of
evoltion messages, how to get it to do inline spell-checking, generate
morse-code, and use bit-keeper.

Disclaimer: I haven't tested any of the above-mentioned scripts (except
the spell-checker, which works nicely)

-- 
Tzafrir Cohen                        /"\
mailto:[email-masked]        \ /  ASCII Ribbon Campaign
Taub 229, 972-4-829-3942,             X   Against  HTML  Mail
http://www.technion.ac.il/~tzafrir   / \

---

From: Shlomi Fish <[email-masked]>
Date: Thu, 7 Feb 2002 15:44:21 +0200 (IST)

> the spell-checker, which works nicely)

If the spell-checker ignores formatting style like Emacs' M-x
ispell-buffer does, then it would be highly useful. (I'm using Emacs to
check the spelling of my HTML and LaTeX documents). I'll look into it.
Thanks.

Regards,

	Shlomi Fish

> To unsubscribe from this group, send an email to:
> [email-masked]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>