Lazarus IDE入门基础教程

delphi+cnpack用惯了,转移到lazarus有点难受是不是!其实,lazaurs的编辑器也是蛮强大的,支持代码补全,自动完成,模板编辑,多行缩进注释,选定代码后批量更改里面的单词!目前,我知道的就这些。

好,先第一个,代码补全!

按下键盘的Ctrl+W键!输入变量后按下这个键就OK啦~

第二个,自动完成!

自动完成的快捷键大多数都冲突了,解决方法是打开Tools->Option->Editor->Key Mappings->CodeTools commands->Identifier completion上右键edit,然后根据实际情况修改吧,我的是再勾选Alt,也就是说,我的热键是Ctrl+Alt+Space!不懂的看图!

第三个,模板编辑!

这个也蛮简单,按下键盘的Ctrl+J,然后输入class,回车!是不是很酷!

第四个,多行缩进注释!

缩进的:向左 -> Ctrl+U

向右 -> Ctrl+I(选中多行代码更爽)

多行注释:Ctrl+/

第五个,选定代码后批量更改里面的单词!

先选中一行代码,然后点击编辑器左边显示行号左边的那支笔,看看图哦。

这个时候你可以输入b,变量a就全部改为b,还可以按下tab跳到下一个单词。

到这里完了没有,嘿嘿~再送大家一个非常好看的东东!编辑器的高亮!

<?xml version="1.0"?>
<CONFIG>
  <EditorOptions Version="9">
    <Display DoNotWarnForFont="Ubuntu Mono" EditorFont="Ubuntu Mono" EditorFontSize="13">
      <MarkupCurrentWord NoKeyword="False"/>
    </Display>
    <KeyMapping>
      <default Count="1">
        <Version Value="6"/>
        <Item1>
          <KeyA Default="False" Key1="32" Shift1="5"/>
        </Item1>
      </default>
    </KeyMapping>
    <CodeTools CodeTemplateFileName="/home/lht/.lazarus/lazarus.dci" CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly" AutoDelayInMSec="104"/>
    <Mouse>
      <Default Version="1"/>
    </Mouse>
    <Color Version="9">
      <LangObjectPascal Version="9">
        <ColorScheme Value="Twilight"/>
        <SchemeTwilight>
          <Space Background="1973790" FrameColor="5000268" FrameStyle="slsDotted" FrameEdges="sfeBottom"/>
          <Number Foreground="7434751"/>
          <String Foreground="7337839"/>
          <Symbol Foreground="clYellow"/>
          <Comment Foreground="clSkyBlue"/>
          <Assembler Foreground="11715098"/>
          <Directive Foreground="22015"/>
          <Case_label Foreground="16541892"/>
          <IDE_Directive Foreground="1478752"/>
          <Reserved_word Foreground="1023473"/>
        </SchemeTwilight>
      </LangObjectPascal>
      <Globals Version="9">
        <SchemeTwilight>
          <ahaDefault Background="1973790"/>
        </SchemeTwilight>
      </Globals>
      <LangPython Version="9">
        <SchemeTwilight>
          <Float Foreground="8345087"/>
          <Octal Foreground="16755455"/>
          <Number Foreground="8345087"/>
          <String Foreground="8388522"/>
          <Symbol Foreground="clYellow"/>
          <Comment Foreground="clSkyBlue"/>
          <Hexadecimal Foreground="8345087"/>
          <SyntaxError Foreground="16755285"/>
          <Documentation Foreground="16755370"/>
          <Reserved_word Foreground="43775"/>
          <Non_reserved_keyword Foreground="8366847"/>
        </SchemeTwilight>
      </LangPython>
    </Color>
    <Misc PasExtendedKeywordsMode="True"/>
    <General>
      <Editor TabIndent="True" TabWidth="2"/>
    </General>
    <DividerDraw>
      <LangObjectPascal>
        <TypeSect>
          <TopColor Value="9157119"/>
        </TypeSect>
        <TypeGVar>
          <TopColor Value="9157119"/>
        </TypeGVar>
        <TypeGStruct>
          <TopColor Value="9157119"/>
        </TypeGStruct>
        <TypeProc>
          <TopColor Value="9157119"/>
        </TypeProc>
        <TypeLStruct>
          <MaxDepth Value="1"/>
          <TopColor Value="9157119"/>
        </TypeLStruct>
      </LangObjectPascal>
    </DividerDraw>
  </EditorOptions>
</CONFIG>

Ubuntu 13.04 下正常启动 Lazarus 1.0.8

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/17309.html