Csound Csound-dev Csound-tekno Search About

[Csnd] csound-vim update

Date2020-02-18 00:37
Fromluis jure
Subject[Csnd] csound-vim update
The csound-vim plugin has finally been updated, please do "git pull" in
your .vim/bundle/csound-vim directory.

I apologize for taking so long, I've had this lying around for ages. I
wanted to wait until I had a major new and improved version of the plugin,
but it's better to release what I have so far.

A loose list of changes would be:

- overall minor improvements in syntax highlighting
- accepts a user-defined file with macro definitions
- accepts a user-defined file with list of opcodes for highlighting
- scripts for generating the above file, in two versions: bash and Python

I haven't tagged this as a "release" yet, because I would need some help
with:

- testing the scripts, specially the python version. It works on my
  computer, but I know virtually nothing about python (or anything related
  to programming, for that matter), so I have no idea whatsoever what this
  script might do on other computers, specially Windows of OSX. (I guess
  the bash script should more or less work on any normal Linux system);

- read the README and tell me if anything needs clarification or what
  parts should be translated into real English.

Happy Csounding, and happy Vimming.



--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-18 08:02
Fromjoachim heintz
SubjectRe: [Csnd] csound-vim update
hi luis -

could you please send the URL again?

and wouldn't it be good to have this as part of the csound organization as
	https://github.com/csound/csound-vim ?

cheers -
	joachim



On 18/02/2020 01:37, luis jure wrote:
> The csound-vim plugin has finally been updated, please do "git pull" in
> your .vim/bundle/csound-vim directory.
> 
> I apologize for taking so long, I've had this lying around for ages. I
> wanted to wait until I had a major new and improved version of the plugin,
> but it's better to release what I have so far.
> 
> A loose list of changes would be:
> 
> - overall minor improvements in syntax highlighting
> - accepts a user-defined file with macro definitions
> - accepts a user-defined file with list of opcodes for highlighting
> - scripts for generating the above file, in two versions: bash and Python
> 
> I haven't tagged this as a "release" yet, because I would need some help
> with:
> 
> - testing the scripts, specially the python version. It works on my
>    computer, but I know virtually nothing about python (or anything related
>    to programming, for that matter), so I have no idea whatsoever what this
>    script might do on other computers, specially Windows of OSX. (I guess
>    the bash script should more or less work on any normal Linux system);
> 
> - read the README and tell me if anything needs clarification or what
>    parts should be translated into real English.
> 
> Happy Csounding, and happy Vimming.
> 
> 
> 
> --
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-18 22:05
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-18 a las 09:02 joachim heintz escribió:

> could you please send the URL again?

Well, I don't know, Joachim. Last time I checked, you were an infidel...

But here it is (you are a friend, after all, even if you're not a vimmer):

https://github.com/luisjure/csound-vim
 
> and wouldn't it be good to have this as part of the csound organization
> as https://github.com/csound/csound-vim ?

I'm not sure that would be an advantage. I think it's cleaner to have the
plugin in its own repository, just like any other vim plugin. 



--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-19 20:31
Fromluis jure
SubjectRe: [Csnd] csound-vim update
I just commited an update, adding support for Haiku (thanks to Pete
Goodeve).

Has anyone else tested the plugin and the scripts? If I receive reports
that everything is working on Windows and OSX, I could tag this as a
release. Suggestions for any minor changes or improvements before I do so?
(The keyword is "minor").



--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-20 00:39
Froms
SubjectRe: [Csnd] csound-vim update
hola

On 2/19/20 3:31 PM, luis jure wrote:
> Has anyone else tested the plugin and the scripts?

i just set it up (had done it once before on a different machine) and it 
works like a charm. the syntax highlighting alone is a great gift! (also 
folding)

btw, i used the method of just linking the repo to the right folder 
within ~/.vim/ (in case you have not tested this mechanism, i can report 
it works just fine)

i look forward to trying some of the macros when i am next using csound 
for music making.

thank you!

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-20 01:01
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-19 a las 19:39 s escribió:

> i just set it up (had done it once before on a different machine) and it 
> works like a charm.

great, good to know. what OS are you using?


> btw, i used the method of just linking the repo to the right folder 
> within ~/.vim/ (in case you have not tested this mechanism, i can report 
> it works just fine)

yes, linking works, of course, its another option.



--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-22 23:36
Froms
SubjectRe: [Csnd] csound-vim update
hola

On 2/19/20 8:01 PM, luis jure wrote:
> great, good to know. what OS are you using?

(debian 10.3)
% uname -a
Linux bit-farmer 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) 
x86_64 GNU/Linux

thx again for your helpful work.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-23 23:23
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-22 a las 18:36 s escribió:

> Linux bit-farmer 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) 
> x86_64 GNU/Linux

OK, thanks for the report. Anyone on Windows or OSX?


--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-24 10:13
FromSteven Yi
SubjectRe: [Csnd] csound-vim update
Hi Luis,

Things work here on macOs and I like the additional syntax coloring, but it seems like it gets a bit slow on large files and flickers when I page through. For example, my livecode.orc file here:


Should show what happens. It also takes a moment to load the file.

Thanks!
Steven

On Sun, Feb 23, 2020, 18:24 luis jure <ljc@internet.com.uy> wrote:
el 2020-02-22 a las 18:36 s escribió:

> Linux bit-farmer 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26)
> x86_64 GNU/Linux

OK, thanks for the report. Anyone on Windows or OSX?


--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-02-24 14:22
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-24 a las 05:13 Steven Yi escribió:

> it seems like it gets a bit slow on large files and flickers when I page
> through. 

hi, steven, thanks for the report. i downloaded your file, but i'm afraid i
can't replicate any of the problems you describe. everything runs smoothly
on both vim (terminal) and gvim. i made a copy of your file with the
extension .c, and i can't see any difference in performance.

> It also takes a moment to load the file.

i don't know how long it takes for you, here your file does indeed take a
little over a second to open, but that is just because of folding. setting
folding method to manual in the plugin, the file opens instantly, like
any other file of that size.

all this is on linux, using vim and gvim 8.2.0210-r1 (compiled using the
gentoo ebuilds).

i'll see later if i can test this on a windows machine.



--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-24 19:48
FromPete Goodeve
SubjectRe: [Csnd] csound-vim update
AttachmentsNone  

Date2020-02-24 23:21
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-24 a las 11:48 Pete Goodeve escribió:

> Just for another data point... I tried in Haiku, and it takes a *very*
> long time to load 

ugh, this is terrible! as i said before, i have no idea why this happens
and i can't replicate this behavior in my linux system. a big file like
steven's takes a little over a second here, due to folding. i tested on
windows10 running on a virtual machine (virtualbox), and it takes a little
longer, close to two seconds. which i think is not so bad for a large file
with lots of folding.

what happens if you change folding method to manual, instead of syntax?


--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-24 23:43
FromPete Goodeve
SubjectRe: [Csnd] csound-vim update
AttachmentsNone  

Date2020-02-25 00:17
FromPete Goodeve
SubjectRe: [Csnd] csound-vim update
AttachmentsNone  

Date2020-02-25 00:30
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-24 a las 15:43 Pete Goodeve escribió:

> I just tried the biggest csd I think I have (My Hammond simulator  40K)
> and it took ~10 sec. Not too worrisome.

not ideal, either...

> A quick look didn't show me any switch in the plugin.

no, for starters, i was thinking simply modifying the plugin.

go to syntax/csound.vim, and modify set foldmethod=syntax (line 27) to set
foldmethod=manual, just to confirm that folding is what's causing the
delay.


--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-25 00:52
FromJustin Smith
SubjectRe: [Csnd] csound-vim update
I tend to have syntax folding turned on, and use syntax as my fold
method, but arguably that the more user friendly way of doing things
is to let the end user opt into folding and fold-method (though it
might be nice to offer a hint that folding is especially useful with
your plugin...).

On Mon, Feb 24, 2020 at 4:30 PM luis jure  wrote:
>
> el 2020-02-24 a las 15:43 Pete Goodeve escribió:
>
> > I just tried the biggest csd I think I have (My Hammond simulator  40K)
> > and it took ~10 sec. Not too worrisome.
>
> not ideal, either...
>
> > A quick look didn't show me any switch in the plugin.
>
> no, for starters, i was thinking simply modifying the plugin.
>
> go to syntax/csound.vim, and modify set foldmethod=syntax (line 27) to set
> foldmethod=manual, just to confirm that folding is what's causing the
> delay.
>
>
> --
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-25 02:46
FromPete Goodeve
SubjectRe: [Csnd] csound-vim update
AttachmentsNone  

Date2020-02-25 03:02
FromSteven Yi
SubjectRe: [Csnd] csound-vim update
Thanks Luis for the tip. Using foldmethod=manual, the file loads
instantly and no longer flickers as I page through.  I added this to
my .vimrc file:

au BufRead *.orc setlocal foldmethod=manual


On Mon, Feb 24, 2020 at 7:53 PM Justin Smith  wrote:
>
> I tend to have syntax folding turned on, and use syntax as my fold
> method, but arguably that the more user friendly way of doing things
> is to let the end user opt into folding and fold-method (though it
> might be nice to offer a hint that folding is especially useful with
> your plugin...).
>
> On Mon, Feb 24, 2020 at 4:30 PM luis jure  wrote:
> >
> > el 2020-02-24 a las 15:43 Pete Goodeve escribió:
> >
> > > I just tried the biggest csd I think I have (My Hammond simulator  40K)
> > > and it took ~10 sec. Not too worrisome.
> >
> > not ideal, either...
> >
> > > A quick look didn't show me any switch in the plugin.
> >
> > no, for starters, i was thinking simply modifying the plugin.
> >
> > go to syntax/csound.vim, and modify set foldmethod=syntax (line 27) to set
> > foldmethod=manual, just to confirm that folding is what's causing the
> > delay.
> >
> >
> > --
> >
> > Csound mailing list
> > Csound@listserv.heanet.ie
> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > Send bugs reports to
> >         https://github.com/csound/csound/issues
> > Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-02-26 19:57
Fromluis jure
SubjectRe: [Csnd] csound-vim update
el 2020-02-24 a las 22:02 Steven Yi escribió:

> Thanks Luis for the tip. Using foldmethod=manual, the file loads
> instantly and no longer flickers as I page through.  I added this to
> my .vimrc file:
> 
> au BufRead *.orc setlocal foldmethod=manual

Well, that's a "solution" of sorts... I'm sorry about that. I have no idea
why this happens on some systems, it works fine here. Is it a problem with
some versions of Vim, or with the expressions I use for folding? I'd like
to think it's the former, because your file opens just fine here in three
different environments: Gentoo and Ubuntu linux, and Windows inside
virtualbox.

> On Mon, Feb 24, 2020 at 7:53 PM Justin Smith 
> wrote:
> >
> > I tend to have syntax folding turned on, and use syntax as my fold
> > method, but arguably that the more user friendly way of doing things
> > is to let the end user opt into folding and fold-method (though it
> > might be nice to offer a hint that folding is especially useful with
> > your plugin...).

That's a good idea, but unless this problem turns out to be more
generalized than I think, I'll do the opposite: I'll leave foldmethod set
to syntax by default in the plugin, and I'll add a note in the README on
how to disable it, as explained by Steven.


--

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here