adding an icon next to the line number on slickedit - slickedit

I want to program a slick-C code that will add an icon next to the line number (similar to the one that happens if you add a breakpoint or a bookmark)
How do I do that?

Well, after A LOT of digging in the SE code I found the answer:
The short answer:
What you seek is the _LineMarkerAdd (it appears in the help so you can read about it)
The more complicated answer:
Probably if you want to do something like that you'll need some kind of database to save your points of interest and display them on the opened files
(look at annotations.e for a complicated but relevant example)
When you want to do that you might wanna look at _build_buf_list for your opened files)
Good luck!

Related

Vb.net project save not opening from anywhere by its original source

I've made a program for my assingment, and code it entirely from home. Obviously I need to submit it and work on it from college, i've got about 13 hours until it's due and I cannot for the life of me figure out what these errors mean, I'm guessing its something to do with the paths of the files. To make it clear, the program does not open and it is not the original copy. I do have other copies and I have tried the same approach with the exact same luck. Thank you in advance.
Okay, an update. As I said, I copied it from home, and pasted it in the folder location that it is calling below, however, it's calling an older version of the game which has no relevence to the game(number guessing game), from a location two files up from the actual vb files. Is there a way i can change what the project opens?
In your second picture just drag 'Form1.vb' to the solution Explorer. That way it can recognize your form. I have encountered this problem before and I just did what I said above.

How to copy a word document section-by-section

I have to update a word document to the most recent company template but that task is not so easy as it looks.
According to this site all it takes is to perform the described steps but after doing it the document remained as it was before, for instance, the footer and header remained the same, that is, they were not updated to the ones set in the new template.
After spending some time on how to accomplish that task I realized that both the header and footer are not related to the template but to the underlying section instead.
Then, I took another approach that boiled down to copy only the section content without the header and the footer to the already defined sections in the new template and apparently it gets the job done.
Therefore, I would like to know if there is any way to perform these section copying automatically - through VBA - or even other better approach I can take ?
Personally, I wouldn't use VBA unless the task was huge. By the time you've created some code, run it, failed, re-written it, you'll probably find that it could have been completed faster manually, especially if, as appears, this is a one-off job. Of course, if you encounter a task which you realise is repetitive and time-consuming, then you might make use of the Macro Recorder.
I obviously don't have the documents in front of me but:
Do a little planning. Work out how many sections there should be, and of what type (Next Page Section Break, etc.).
Use Draft View and Goto (Ctrl-G), Section to help discover them.
Scribble down an outline of what the final headers/ footers should contain.
If applicable, note down the Style names from both templates and work out which ones need to be replaced.
(I would) work on a copy of the new template and copy the content from the old one. This will copy the styles from the old template at the same time. This might be the wrong way round for you - you'll have to decide this. Try both and see which is easiest to work with.
You can use the Replace dialog (Ctrl-H) to swap one style for another.
Display the Styles Window as well (Ctrl-Alt-Shift-S).
From the Styles Window you can show the Style Manager. From here, and Import/Export, you can Delete, Rename and Copy Styles. Be careful about deleting styles as it is difficult to gauge what they will default to.
I would leave Headers and Footers until (second to) last and, when doing so, start at the beginning of the document and progress forward-only through the Sections, copying from the old template if necessary.
I would leave Bookmarks until the very end; by that time it should be easy to Insert them. If you have copied content from the old document then it should have carried the Bookmarks across as well, so it just a question of making sure that they are still in the right place.
Again, I don't have the templates in front of me, so I appreciate that some of this advice may not be relevant.
Hint: It might take a few attempts to get this right. If you get stuck at some point bear it mind that it might be better to start over - if it gets messy it is sometimes tricky to recover.

Set breakpoint in VBA code programmatically

I have a very large piece of code written in VBA (>50,000 lines - numerous modules). There is one array of interest to me, and I'd like to find all the conditions under which the value of any element of this array changes. The values can change in any module. Running the script line by line is not the most efficient option due to the size of the code.
I am looking for better ways to solve this problem. Two ways that come to my mind is to programmatically set a breakpoint (which I am not sure if can be done) or programmatically insert an if-block after each assignment that somehow alerts me that the value has changed. (not preferred).
So my question boils down to:
Is it possible to programmatically set breakpoints in VBA code?
If the answer to the above question is No, what is an efficient way to solve this problem?
UPDATE:
Thanks for the comments/replies. As I had implied, I am interested in the least amount of modification to the current code (i.e. inserting if-blocks, etc) and most interested in the break-point idea. I'd like to know if it's doable.
Use the keyword STOP to break te code if a certain condition is true.
There are Two Ways to do that:
Use Stop Key word. Example as given below, set a break point at Stop
if (x = 21 ) Then
Stop
End If
Using Add Watch
Go to Debug -> Select Add Watch
NB:I know this is an old topic but this could help others.
You could use Watches:
Right click on the variables you wish to monitor -> Add Watch...
In Watch Type: 'Break when value changes'
While you run your code, you can check the status of your Watches thanks to the Watch Window (accessible from the 'View' menu)
in the hope someone can benefit from this :
In such situations regardless of the programming language used - writing a few lines of code either in Perl, AWK or even shell scripts can solve the problem :
search for a regular expression containing the array name (ignoring case).
Once you export all modules and classes in the Workbook(s) into a given directory - the scripts can search those for you.

Saving a position while coding?

Back in olden times, I used to code with an editor that allowed you to mark where you were in the code with a keypress. You could jump to another point in the same or another file to check a reference or somesuch. When you were ready, you could hit another keypress and return to the point you saved.
I've long since migrated to Dreamweaver and wanted this functionality. Does it exist in DW? If so, I missed that part of the manual. If not, any suggestions on an editor that DOES have that functionality?
Scott.
There is no official way to do it, but you could use the code collapse feature to create something like a bookmark. Collapse the single line and DW will have a mark at that line number until you clear it.

How to use multiple tabs when tagging to a function in Vim

I use ctags with my Vim and I rely heavily on C-] and C-T to tag back and froth between various functions in my project.
But if the function is in a different file, I'd like Vim to automatically open it in a new tab instead of the current tab. If I pop my tag stack using the C-T, I'd like it go back to the original tab where I pressed by C-] instead of changing the file in the current tab. I don't like to have the same file opened in multiple tabs in Vim. This is the normal behavior for most IDEs and I am wondering if there is a way to do this in Vim?
nmap <C-Enter> <C-w><C-]><C-w>T
Does this help ? You could probably figure out something similar for the way back.
Well, we need to decide what would be the wanted behaviour. We can go back to the original tab (not sure how, still investigating) but then the above given mapping is gonna open a new tab next time. So you'll end up with a lot of tabs after a while.
Or we can do <C-w>C, which will close the opened tab and take us back to the original one. I, personally, prefer this way of working (that way I don't lose my position in the file)
I go to the function I want, make my corrections there then return to the original file from which I started.
Let me know, what would you like (this didn't fit in comments so I put the answer here).
This might point you in the right direction:
http://vim.wikia.com/wiki/Open_every_buffer_in_its_own_tabpage
So, this is a feature I would like to see as well.
I'm not sure if it's possible.
What I usually do is
:tabnew
:tag somepartsoffunction*
and press tab to use globbing to easily find tag.
Sure, it's not an ideal solution, but it works most of the time.
Unfortunately, with VIM tabbing isn't totally integrated since it's a new feature since 7.0. Most people I know that use VIM weren't even aware of tabs until I told them, so with that, I have a feeling there is no way to do it right now.
(I would love to be proven wrong)