Whenever i type "if", can UE auto complete "end if" in a new line?
How can i do with macro?
thanks!
How can i do with macro?
thanks!
Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOn
Key LEFT ARROW
Key RIGHT ARROW
"~@1#"
Key HOME
Key HOME
StartSelect
Key END
Find RegExp "(--.*)~@1#"
Replace All SelectText "\1~@1#"
IfNotFound
EndSelect
Key HOME
StartSelect
Key END
Find RegExp "if~@1#"
Replace All SelectText "if (~@3#) then~@2#;"
IfFound
EndSelect
Key HOME
Find "~@2#"
"
end if"
Find Up "~@3#"
GetString "Condition :"
Key END
"
"
Else
Key HOME
Find "~@1#"
Replace "Error in macro IfComp if not found"
EndIf
Else
EndSelect
Find "~@1#"
Delete
Key RIGHT ARROW
EndIf
Code: Select all
HexOff
Key LEFT ARROW
SelectWord
Find "if"
Replace All SelectText "if"
IfFound
PlayMacro 1 "If_complete"
Else
....do another search for key word
EndIf
Code: Select all
//////////////////////////////////////
// Macro Name: VHDLCompletion
// This macro test for a VHDL keyword
// and execute the right complete macro
// if it found one.
// This macro is intended to be called by
// the "Space" macro, that means the char
// at the left of the cursor position is
// a space char (0x20).
HexOff
Key LEFT ARROW
SelectWord
Find "architecture"
Replace SelectText All "architecture"
IfFound
PlayMacro 1 "ArchitectureComp"
Else
Find "block"
Replace SelectText All "block"
IfFound
PlayMacro 1 "BlockComp"
Else
Find "case"
Replace SelectText All "case"
IfFound
PlayMacro 1 "CaseComp"
Else
Find "else"
Replace SelectText All "else"
IfFound
PlayMacro 1 "ElseComp"
Else
Find "elsif"
Replace SelectText All "elsif"
IfFound
PlayMacro 1 "ElsifComp"
Else
Find "entity"
Replace SelectText All "entity"
IfFound
PlayMacro 1 "EntityComp"
Else
Find "if"
Replace SelectText All "if"
IfFound
PlayMacro 1 "IfComp"
Else
Find "process"
Replace SelectText All "process"
IfFound
PlayMacro 1 "ProcessComp"
Else
Key RIGHT ARROW
Key LEFT ARROW
IfCharIs 32
Key RIGHT ARROW
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf