Key Combination to select procedure body lazarus / 9-Editor ---------------------------------------------------------------------- Never · 2014-11-01 23:03 is there a key compination to select procedure/function  body? ex: Code: [Select]line1:->procedure proc_do(); line2:  var var_i:integer; line3:  begin line4:  do_something1 line5:  do_something2 line6:  do_something3 line7:  do_something4 line8:  end;is there a key combination to auto select from line1 to line8 or line2 to line8 or line4 to line8?    didn't find anything in key mappings (Select paragraph thought it was related but selects random area, select code block is not doing the job)     recorded a macro but when replay will only select the num of lines recorded any ideas? ---------------------------------------------------------------------- Martin_fr · 2014-11-02 00:53 Pascal script macro. (see wiki). Then you can search in the text, and do what you want. If you position the caret at the "procedure name...", and if there are no nested procedure (and no comments containing the word "begin", before the real begin) then this will work as normal macro Code: [Select]ecIncrementalFind; ecChar('b'); ecChar('e'); ecChar('g'); ecChar('i'); ecChar('n'); ecLeft; ecFindBlockOtherEnd; ecRight; ecRight; ecRight; ecRight; ecStickySelection; ecLeft; ecLeft; ecFindBlockStart; ecFindBlockStart; ecStickySelectionStop; find the begin, go to end of block (equals end of procedure) start selecting (sticky), and go back to procedure. ---------------------------------------------------------------------- Never · 2014-11-02 01:16 Thank you @Martin_fr Added also at the top these lines and works from any place inside the procedure Code: [Select]ecFindProcedureDefinition; ecFindProcedureMethod; ecFindBlockStart;Code: [Select]begin ecFindProcedureDefinition; ecFindProcedureMethod; ecFindBlockStart; ecIncrementalFind; ecChar('b'); ecChar('e'); ecChar('g'); ecChar('i'); ecChar('n'); ecLeft; ecFindBlockOtherEnd; ecRight; ecRight; ecRight; ecRight; ecStickySelection; ecLeft; ecLeft; ecFindBlockStart; ecFindBlockStart; ecStickySelectionStop; end.  This assigned to Shift+1 and saves a lot of time  when  you want to search only inside the procedure or when you want to syncroedit