* New Ocaml indentation for VIm @ 2005-02-06 2:31 David Baelde 2005-02-25 10:22 ` [Caml-list] " Olivier Grisel 0 siblings, 1 reply; 11+ messages in thread From: David Baelde @ 2005-02-06 2:31 UTC (permalink / raw) To: caml-list Hi list, I'm developping a new Caml indentation for VIm, which looks like tuareg a lot, plus performs nice things like folding. I believe it's already good enough for being used, but I'm looking for testers, for bug finding but also discussing some points where I don't follow tuareg. The main scripts are at: http://www.vim.org/scripts/script.php?script_id=1196 and you may wish to take a look at an alpha-version of a code annotation lookup utility at: http://www.vim.org/scripts/script.php?script_id=1197 I hope it will be useful. -- David ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-06 2:31 New Ocaml indentation for VIm David Baelde @ 2005-02-25 10:22 ` Olivier Grisel 2005-02-25 10:58 ` Sven Luther 2005-02-25 18:55 ` David Baelde 0 siblings, 2 replies; 11+ messages in thread From: Olivier Grisel @ 2005-02-25 10:22 UTC (permalink / raw) To: david.baelde; +Cc: caml-list David Baelde wrote: > Hi list, > > I'm developping a new Caml indentation for VIm, which looks like tuareg > a lot, plus performs nice things like folding. I believe it's already > good enough for being used, but I'm looking for testers, for bug finding > but also discussing some points where I don't follow tuareg. Hi, and thanks a lot, this looks nice (especially the folding support :) I have just tried it for a few seconds and I found the following identation a bit too wide: let f = function | [] -> foo | x::l -> bar but I would prefer the following: let f = function | [] -> foo | x::l -> bar Anyway, thanks a lot. I will test it more extensively this WE and let you know if I find bugs. Regards, Olivier ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-25 10:22 ` [Caml-list] " Olivier Grisel @ 2005-02-25 10:58 ` Sven Luther 2005-02-25 14:18 ` Olivier Grisel 2005-02-25 18:55 ` David Baelde 1 sibling, 1 reply; 11+ messages in thread From: Sven Luther @ 2005-02-25 10:58 UTC (permalink / raw) To: Olivier Grisel; +Cc: david.baelde, caml-list On Fri, Feb 25, 2005 at 11:22:32AM +0100, Olivier Grisel wrote: > David Baelde wrote: > >Hi list, > > > >I'm developping a new Caml indentation for VIm, which looks like tuareg > >a lot, plus performs nice things like folding. I believe it's already > >good enough for being used, but I'm looking for testers, for bug finding > >but also discussing some points where I don't follow tuareg. > > Hi, and thanks a lot, this looks nice (especially the folding support :) > > I have just tried it for a few seconds and I found the following identation > a bit too wide: > > let f = function > | [] -> foo > | x::l -> bar > > but I would prefer the following: > > let f = function > | [] -> foo > | x::l -> bar > > Anyway, thanks a lot. I will test it more extensively this WE and let you > know if I find bugs. Yeah, that or 4 space indents. BTW, any hope of seing this new mode migrate upstream (or just in the debian package ?). Friendly, Sven Luther ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-25 10:58 ` Sven Luther @ 2005-02-25 14:18 ` Olivier Grisel 0 siblings, 0 replies; 11+ messages in thread From: Olivier Grisel @ 2005-02-25 14:18 UTC (permalink / raw) To: Sven Luther; +Cc: caml-list Sven Luther wrote: > On Fri, Feb 25, 2005 at 11:22:32AM +0100, Olivier Grisel wrote: >>I have just tried it for a few seconds and I found the following identation >>a bit too wide: >> >>let f = function >> | [] -> foo >> | x::l -> bar >> >>but I would prefer the following: >> >>let f = function >> | [] -> foo >> | x::l -> bar > Yeah, that or 4 space indents. Maybe there is a config option to set this behaviors ? > BTW, any hope of seing this new mode migrate upstream (or just in the debian > package ?). +1 Best, Olivier ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-25 10:22 ` [Caml-list] " Olivier Grisel 2005-02-25 10:58 ` Sven Luther @ 2005-02-25 18:55 ` David Baelde 2005-02-26 8:16 ` Stefano Zacchiroli 2005-03-07 15:57 ` Markus Mottl 1 sibling, 2 replies; 11+ messages in thread From: David Baelde @ 2005-02-25 18:55 UTC (permalink / raw) To: caml-list; +Cc: Olivier Grisel [-- Attachment #1: Type: text/plain, Size: 2052 bytes --] Olivier Grisel wrote: > I have just tried it for a few seconds and I found the following > identation a bit too wide: > > let f = function > | [] -> foo > | x::l -> bar That was a known issue, I had a (not so visible) page on my website about that. It was the "relative vs. incremental dilemn"... With a naive implementation, I couldn't base the indentation of line 2 on the beginning of line 1, so I based it on the keyword "function". Here is an idea of what you get if you base the indentation on the beginning of the line of the base keyword, without taking care: let _ = something first_arg second_one (if a then foo bar else bar foo) This week I was away from the network, but kept coding a bit... I tried to figure out what tuareg does (cannot read that amount of elisp), and did the same in OMLet. I will release it soon on vim.org. I also added customization. The current implementation base the indentation on the beginning of the line, or the last "(", "[" or "{" before the keyword, on the same line, if there's one. As far as I've tried, it's a good trick. The 4 spaces proposed by S. Luther a nice compromise between the strict old indentation and the tricky and meaningless (but nice) new indentation. But I think it would require more work for me, and for the script, which is already so slow... And I don't think people want it so much. Regarding integration of omlet with the official ocaml support, as far as I'm concerned I think it could be done within a few months, when OMLet will be considered stable. But Markus Mottl didn't give me his advice. There's only a very minor issue about code annotations, because I don't like being warned that my VIm is not compiled with python support everytime I open a OCaml file, and I'd like to find a good solution without Python. Also, I didn't work at all on .mll and .mly support. Packaging omlet separately is OK. Samuel Mimram could do that. I would just suggest to wait a bit. Hope you'll like release 0.7! -- David [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 256 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-25 18:55 ` David Baelde @ 2005-02-26 8:16 ` Stefano Zacchiroli 2005-02-26 8:39 ` Sven Luther 2005-03-07 15:57 ` Markus Mottl 1 sibling, 1 reply; 11+ messages in thread From: Stefano Zacchiroli @ 2005-02-26 8:16 UTC (permalink / raw) To: Inria Ocaml Mailing List On Fri, Feb 25, 2005 at 07:55:42PM +0100, David Baelde wrote: > advice. There's only a very minor issue about code annotations, because > I don't like being warned that my VIm is not compiled with python > support everytime I open a OCaml file, and I'd like to find a good > solution without Python. Also, I didn't work at all on .mll and .mly Well, is "just" a matter of parsing code annotation in vimscript. I've never had the willingness to do it and thus I did it in python, if you consider it as a showstepper though, I will be happy to work on it. > Packaging omlet separately is OK. Samuel Mimram could do that. I would > just suggest to wait a bit. Couldn't we just add omlet to the ocaml-tools package? -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-26 8:16 ` Stefano Zacchiroli @ 2005-02-26 8:39 ` Sven Luther 2005-02-26 9:51 ` Samuel Mimram 0 siblings, 1 reply; 11+ messages in thread From: Sven Luther @ 2005-02-26 8:39 UTC (permalink / raw) To: Inria Ocaml Mailing List, debian-ocaml-maint On Sat, Feb 26, 2005 at 09:16:37AM +0100, Stefano Zacchiroli wrote: > On Fri, Feb 25, 2005 at 07:55:42PM +0100, David Baelde wrote: > > advice. There's only a very minor issue about code annotations, because > > I don't like being warned that my VIm is not compiled with python > > support everytime I open a OCaml file, and I'd like to find a good > > solution without Python. Also, I didn't work at all on .mll and .mly > > Well, is "just" a matter of parsing code annotation in vimscript. I've > never had the willingness to do it and thus I did it in python, if you > consider it as a showstepper though, I will be happy to work on it. > > > Packaging omlet separately is OK. Samuel Mimram could do that. I would > > just suggest to wait a bit. > > Couldn't we just add omlet to the ocaml-tools package? Yep, i vote for that. Samuel, do you feel like doing it ? Friendly, Sven Luther ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-26 8:39 ` Sven Luther @ 2005-02-26 9:51 ` Samuel Mimram 2005-02-26 10:48 ` Sven Luther 0 siblings, 1 reply; 11+ messages in thread From: Samuel Mimram @ 2005-02-26 9:51 UTC (permalink / raw) Cc: Inria Ocaml Mailing List, debian-ocaml-maint Sven Luther wrote: > On Sat, Feb 26, 2005 at 09:16:37AM +0100, Stefano Zacchiroli wrote: > >>On Fri, Feb 25, 2005 at 07:55:42PM +0100, David Baelde wrote: >>>Packaging omlet separately is OK. Samuel Mimram could do that. I would >>>just suggest to wait a bit. >> >>Couldn't we just add omlet to the ocaml-tools package? > > > Yep, i vote for that. Samuel, do you feel like doing it ? Ok. I'll add omlet to ocaml-tools until it's integrated in vim. Regards, Samuel. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-26 9:51 ` Samuel Mimram @ 2005-02-26 10:48 ` Sven Luther 0 siblings, 0 replies; 11+ messages in thread From: Sven Luther @ 2005-02-26 10:48 UTC (permalink / raw) To: Samuel Mimram; +Cc: Inria Ocaml Mailing List, debian-ocaml-maint On Sat, Feb 26, 2005 at 10:51:18AM +0100, Samuel Mimram wrote: > Sven Luther wrote: > >On Sat, Feb 26, 2005 at 09:16:37AM +0100, Stefano Zacchiroli wrote: > > > >>On Fri, Feb 25, 2005 at 07:55:42PM +0100, David Baelde wrote: > >>>Packaging omlet separately is OK. Samuel Mimram could do that. I would > >>>just suggest to wait a bit. > >> > >>Couldn't we just add omlet to the ocaml-tools package? > > > > > >Yep, i vote for that. Samuel, do you feel like doing it ? > > Ok. I'll add omlet to ocaml-tools until it's integrated in vim. Cool. Friendly, Sven Luther ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-02-25 18:55 ` David Baelde 2005-02-26 8:16 ` Stefano Zacchiroli @ 2005-03-07 15:57 ` Markus Mottl 2005-03-23 22:37 ` Olivier Grisel 1 sibling, 1 reply; 11+ messages in thread From: Markus Mottl @ 2005-03-07 15:57 UTC (permalink / raw) To: david.baelde; +Cc: caml-list, Olivier Grisel Hi David, On Fri, 25 Feb 2005, David Baelde wrote: > Regarding integration of omlet with the official ocaml support, as far > as I'm concerned I think it could be done within a few months, when > OMLet will be considered stable. But Markus Mottl didn't give me his > advice. Sorry for the long delay, but I'm currently having a huge backlog of mails that need to be answered. I have now found time to take a closer look at your work, and I think it looks very promising. I have just integrated your changes into my distribution of Vim-files (see signature for link to my new site). The two indentation styles are still separate, but I think that once OMLet is stable, we can make it the default. I'll keep using it as default in my projects to track down potential problems, but it looks great so far. Thanks a lot for your work! Best regards, Markus -- Markus Mottl markus.mottl@gmail.com http://www.ocaml.info ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] New Ocaml indentation for VIm 2005-03-07 15:57 ` Markus Mottl @ 2005-03-23 22:37 ` Olivier Grisel 0 siblings, 0 replies; 11+ messages in thread From: Olivier Grisel @ 2005-03-23 22:37 UTC (permalink / raw) To: Markus Mottl, david.baelde; +Cc: caml-list Markus Mottl wrote: > Hi David, > > Sorry for the long delay, but I'm currently having a huge backlog of > mails that need to be answered. > > I have now found time to take a closer look at your work, and I think > it looks very promising. I have just integrated your changes into my > distribution of Vim-files (see signature for link to my new site). > > The two indentation styles are still separate, but I think that once OMLet > is stable, we can make it the default. I'll keep using it as default in > my projects to track down potential problems, but it looks great so far. > Thanks a lot for your work! To all vimist-ocamlers around here, Something I find rather useful when programming in ocaml with vim, is to add all the .cm* suffixes to your suffixes variable, eg: set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.cmi,.cmo,.cma,.cmx,.cmxa,.omc (The .omc is only useful when using omake as a [great!] building tool). This line is both useful when using vim's file explorer or the tab completion. It would be nice if something similar could be included by default in David's omlet or Markus' ftplugin/ocaml.vim file. Best, Olivier ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-03-23 22:37 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-02-06 2:31 New Ocaml indentation for VIm David Baelde 2005-02-25 10:22 ` [Caml-list] " Olivier Grisel 2005-02-25 10:58 ` Sven Luther 2005-02-25 14:18 ` Olivier Grisel 2005-02-25 18:55 ` David Baelde 2005-02-26 8:16 ` Stefano Zacchiroli 2005-02-26 8:39 ` Sven Luther 2005-02-26 9:51 ` Samuel Mimram 2005-02-26 10:48 ` Sven Luther 2005-03-07 15:57 ` Markus Mottl 2005-03-23 22:37 ` Olivier Grisel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox