Re: [Csnd] Vim/emacs event editor
"Iain Duncan" <[email protected]>
| Newsgroups | gmane.comp.audio.csound.tekno |
|---|---|
| Message-ID | <012701c3c233$cf38e980$e8dce8d8@xornot> |
Ok, here is an example of a very simple python script and a test file that shows what a grid might look like. In Vim you can select a block of the file in visual mode or visual block mode, and then execute my python script to turn all the numbers into 0s, without touching any markers or screwing up your column alignment. Hopefully the script can be used as is in Emacs too. Further instructions for Vim: select your lines in visual mode, then hit the colon. Your command line will then say: :'<,'> You add an ! to it to run a shell command: :'<,'>! c:/path/python c:/path/zero.py And presto they all become 0s. Deliberately simple example here! Don't forget that if you're in Vim and you're using visual block ( not just visual ) you need to download this patch: http://www.erols.com/astronaut/vim/vimscript/vis.vim and then your command should have a capital B in there too. Just select it and instead of typing :!, you type :B !. ie :'<,'>B ! c:/path/python c:/path/zero.py I know that looks ugly, but remap it to an unused keystroke or combo and then it's dead quick. I mapped F2 so I could just grab stuff with a mouse and automatically get popped into visual block and execute the script. Turn F2 into "grab and zero". :map <F2> <C-V> :B ! c:/path/python c:/path/zero.py <CR> Enjoy! ; ) Iain ----- Original Message ----- From: "Stéphane Rollandin" <lecteur-JzcQqk2NLvvfG2/[email protected]> To: <[email protected]> Sent: Sunday, December 14, 2003 1:09 AM Subject: Re: [Csnd] Vim/emacs question & answers > > >I think the key to making all this really useful will be to make sure that > >the script functions are totally oblivious of what the matrix is for, and > >then add export functions to turn them into whatever score format one wants. > >Once I have a vim script example done I can put it up online somewhere if > >others are interested. Perhaps Stefane could do a mirror for Emacs? And > >maybe a perl hacker might want a perl example? > > > I'll participate in this as much as I can, but at the moment I am rather > confused about what you are actually doing :) > > once you have a python script working fine with vim (or a perl one), please > send it to me and I will see how I can have emacs handle it. it's easier to > work from code rather than from ideas... > > > Stef > > -- > Send bugs reports to [email protected] > (or to http://www.cs.bath.ac.uk/cgi-bin/csound ) > To unsubscribe, send email to [email protected] _______________________________________________ csoundtekno mailing list [email protected] Subscribe, unsubscribe, change mailing list options: http://plot.bek.no/mailman/listinfo/csoundtekno