Hi all,
I'm coding in Haskell and find that if I type 'do' and then hit the <tab> key I get the a couple of lines of code for a C do/while loop. It looks like:
llvmVarOfExp2 (XUnbox t v) = do { } while ()
which is definitelu not Haskell code :-).
How do I switch this off? At least for Haskell.
Erik
On Sun, 8 Aug 2010 23:37:43 +1000 Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
I'm coding in Haskell and find that if I type 'do' and then hit the <tab> key I get the a couple of lines of code for a C do/while loop. It looks like:
llvmVarOfExp2 (XUnbox t v) = do { } while ()
which is definitelu not Haskell code :-).
How do I switch this off? At least for Haskell.
Yo can change this by removing just editing line do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor% inside your snippets.conf. E.g. you cna access them via Tools -> Configuration Files -> snippets.conf
Cheers, Frank
Frank Lanitz wrote:
Yo can change this by removing just editing line do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor% inside your snippets.conf. E.g. you cna access them via Tools -> Configuration Files -> snippets.conf
Thanks, yes, found them.
Should these snippets not be langauge dependent? Having this do expansion might be quite useful for C even if its is completely wrong for Haskell.
Erik
On Mon, 9 Aug 2010 06:43:43 +1000 Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Frank Lanitz wrote:
Yo can change this by removing just editing line do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor% inside your snippets.conf. E.g. you cna access them via Tools -> Configuration Files -> snippets.conf
Thanks, yes, found them.
Should these snippets not be langauge dependent? Having this do expansion might be quite useful for C even if its is completely wrong for Haskell.
Well, hard to say. In general snippets.conf do have both, language independent and a depending section. As the do-while-construct is quiet often used in this form I think its an good idea to have it inside the general section, but of course you are right when pointing out that this might not fit to every language. Well, thus I don't think we should change this.
Cheers, Frank
Frank Lanitz wrote:
Well, hard to say. In general snippets.conf do have both, language independent and a depending section. As the do-while-construct is quiet often used in this form I think its an good idea to have it inside the general section, but of course you are right when pointing out that this might not fit to every language. Well, thus I don't think we should change this.
Well this:
[Haskell] do=
disables it for Haskell.
Thanks, Erik
On Mon, 9 Aug 2010 06:55:56 +1000 Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Frank Lanitz wrote:
Well, hard to say. In general snippets.conf do have both, language independent and a depending section. As the do-while-construct is quiet often used in this form I think its an good idea to have it inside the general section, but of course you are right when pointing out that this might not fit to every language. Well, thus I don't think we should change this.
Well this:
[Haskell] do=
disables it for Haskell.
Kind of a hack but good idea ;)
Cheers, Frank
On Sun, 8 Aug 2010 23:10:15 +0200, Frank wrote:
On Mon, 9 Aug 2010 06:55:56 +1000 Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Frank Lanitz wrote:
Well, hard to say. In general snippets.conf do have both, language independent and a depending section. As the do-while-construct is quiet often used in this form I think its an good idea to have it inside the general section, but of course you are right when pointing out that this might not fit to every language. Well, thus I don't think we should change this.
Well this:
[Haskell] do=
disables it for Haskell.
Kind of a hack but good idea ;)
I don't consider it really a hack, rather a workaround and as such committed to trunk. Though maybe we could/should revise the default snippets at some time to be more generic in the Default section.
Regards, Enrico