Recent

Author Topic: turn off autocomplete begin...end  (Read 5411 times)

anonim

  • New Member
  • *
  • Posts: 13
turn off autocomplete begin...end
« on: June 03, 2013, 11:52:30 am »
Is there a way to turn off autocomplete for begin...end?
 "end" is usually inserted at random positions, almost every time I have to find the line where is the not needed "end".

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: turn off autocomplete begin...end
« Reply #1 on: June 03, 2013, 12:14:22 pm »
Somewhere in Options you can do that.

But more important.
Can you please provide an example where it goes wrong?
And also tell which Lazarus version.

This way, if it can be reproduced, it can be fixed.

Bart

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: turn off autocomplete begin...end
« Reply #2 on: June 03, 2013, 12:22:17 pm »
Example: if you have an {$IFDEF} block, starting begin before the block will lead to end being inserted after the {$IFDEF}.
laz trunk.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: turn off autocomplete begin...end
« Reply #3 on: June 03, 2013, 02:48:28 pm »
@BigChimp: I know and this has already been reported.
I thought that perhaps TS had other examples (not yet known).

Bart

anonim

  • New Member
  • *
  • Posts: 13
Re: turn off autocomplete begin...end
« Reply #4 on: June 03, 2013, 03:07:18 pm »
Somewhere in Options you can do that.

But more important.
Can you please provide an example where it goes wrong?
And also tell which Lazarus version.

This way, if it can be reproduced, it can be fixed.

Bart
I could not find that in the Options. I had a few nested loops and then added one new lines "if (some_var) then begin" pressed Enter and a new "end" appeared somewhere below a few lines in the middle of the column with variable initialization. It would better to turn off begin..end autocomplete as it is sometimes difficult to find the place where new "ends" were inserted. I had to use winmerge to find differences with my previous copy.

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: turn off autocomplete begin...end
« Reply #5 on: June 03, 2013, 03:15:47 pm »
IDE Options dialog:
Editor->Completion and Hints->
uncheck "Add close statement for pascal blocks"

Also, this wouldn't be a problem if code is properly indented. For example
Code: [Select]
if case1 then begin
  if case2 then begin
    DoSomething;
  end;
end;
end; // Indented on same position as upper line, so you know it is extra.

Also if you place cursor on word "begin", it will show rectangle highlight on the matching "end" to it.

anonim

  • New Member
  • *
  • Posts: 13
Re: turn off autocomplete begin...end
« Reply #6 on: June 03, 2013, 03:38:44 pm »
Thanks!

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: turn off autocomplete begin...end
« Reply #7 on: September 25, 2014, 11:28:21 am »
i think is the same issue with this one
 [http://forum.lazarus.freepascal.org/index.php/topic,25934.msg158410/topicseen.html#new]
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

 

TinyPortal © 2005-2018