PascalScript: Looking for something like OnBeforeLineExec and OnAfterLineExec - delphi

I am writing a small IDE with Single Steps using the Debugdemo.
Now I need an Event before and after a line is executed.
I would like to disable my Editor while the current Line is executed.
I found the OnLine Event but did not find out in what cases it is fired or how I can use it.
Any hints are welcome.
Greetings Klaus

The OnLine event is meant to alter the interpretation of code.
It is not meant for debugging purposes.
If you want to do that use the BreakPoints in TPSScriptDebugger.
Put a breakpoint on the line and after the line.
Now you will get a signal before and after the line is executed.

Related

awful.util.spawn executes the command twice - Awesome WM

I have written awful.util.spawn("vncviewer") in rc.lua. But this results in two vncviewer instances (windows) in the startup. What is the reason?
Without more details, my guess is as good as yours. However the odds are that you put the line in a signal callback that gets called twice (like for each screen or something).
Can you pastebin your rc.lua in a comment so I can update my message with a more accurate answer?

Line control statement in swift

i am reading swift from apple docs and learning about statements. but couldnot find any information about the Line Control Statements.
According to the docs
A line control statement is used to specify a line number and filename
that can be different from the line number and filename of the source
code being compiled. Use a line control statement to change the source
code location used by Swift for diagnostic and debugging purposes.
A line control statement has the following forms:
#sourceLocation(file: filename, line: line number)
#sourceLocation()
My question is when should i use it? The docs lags an example about the topic.Any links or some hints would be helpful.
This isn't the sort of thing you'd ever need as a beginner, and you could probably go through an entire career without using it. It seems to be meant for use in tools that generate source code. See the comments in the original feature proposal for the complete story.
TL/DR: Don't worry about it, you'll never need it.

To enable line wrap in syntax highlighter?

I would like to enable code line wrap in Alex Gorbachev syntax highlighter.
Read a thread here to do it..
But I am not able to bring it into action.
Anyone knows how to?

Syntax completion based on snippets for rails project in vim

I wonder if exists some plugin which offers syntax completion based on rails snippets (from snipmate).
Example:
Being on specs, I provide shou, press hotkey and I got list of possible completions (like for Ctrl-p). Selecting anything from list, will insert a snippet.
Does something like this exists?
You can hit <C-r><Tab> in insert mode to pop up a list of available snippets, hit <Enter> to select the right one and hit <Tab> to expand the snippet. But the menu doesn't provide a description.
This is not specific to SnipMate, but you might also find Vim's line completion feature useful here. While in insert mode, Ctl-xCtl-l will offer possible completions for the whole line. So if you already have something like the following in your open buffers:
it { should belong_to(:user) }
it { should validate_presence_of(:title) }
and you start typing
it {Ctl-xCtl-l
... you will get a list of possible full line completions to match.

Moving up a line in FSI.exe

Ok, We all love fsi, but I hate it when I type in the wrong thing and then I want to go up a line and it won't let me....
Is there some kind of shortcut I am missing?
For example, here is a mutually recursive discriminated union. Oh crap, I screwed it up. I want to go back, but I can't.
How do I go up one line and fix stuff?
If you've already committed the line, you can either redefine it (you can define the same types/functions as many times as you want in FSI), or start over. That's why the preferred way to use FSI is: write the code in a script file and 'Send to Interactive'. That avoids this issue.

Resources