Notepad ++ How to create a Macro to Bookmark certain lines based on 5 different values - macros

I am wondering if it is possible to use Notepad ++ to create a macro that I can use to find the following values of "SUPP1, SUPP2, SUPP3, SUPP4, WAVSL" and bookmark the lines they are present on.
I have roughly 90 files to sift through and locate records within these files, copying them to another file. I know I can do this manually, but any time that can be saved here is appreciated. Let me know if you have any suggestions.
Thanks,
Brandon

Found out the answer here. Part of the issue was the version on the server for Notepad++ was around 5.6.9 before they had the "Mark All" feature and it was supported for scripting in macros. I found a newer version on another server that is around 6.8 or 6.9 and it worked recording the macro there for usage.
Thanks,
Brandon

Related

Opening .py files with micropython on TI Nspire

I uploaded Fabian Vogt's micropython port to my TI Nspire CX CAS, together with a couple of *.py.tns files to try. I can't find a way to load/launch those files.
As micropython does not include the os module, I can't use os.chdir to change the current directory and load the *.py files from the python shell. I tried from python shell: open("documents/mydirectory/myfile")
with different extensions .py or .py.tns, without success.
I don't think the Nspire has anything like the terminal commmand line either.
Thanks for your help,
There are 2 ways that you could do this, one easy way and one tedious way.
1. Map .py to micropython in your ndless.cfg
(ndless.cfg should be at /documents/ndless/ndless.cfg)
Like so:
ext.xxx=program-name
ext.xxx=program-name
ext.txt=nTxt
ext.py=micropython
ext.xxx=program-name
ext.xxx=program-name
You can edit this file either by copying it back and forth from your computer using TiLP or the official software, or you can edit it on-calc using nTxt. (This requires a bit of fiddling with making a copy of ndless.cfg so that the mappings still exist to open the copied file ndless.txt).
Ndless should come with a standard ndless.cfg containing basic bindings for nTxt and a few popular emulators. If you don't have one, get the standard one here. It will scan all directories (at least /documents/*, AFAIK) for programs. I've found that removing lines related to programs not on your Nspire will decrease load time.
2. Proper way to run a file in Python
To run a file in Python, you should do something like this:
with open("/documents/helloworld.py.tns","r") as file:
exec(file.read())
This will properly close the file after executing, which I've noticed is quite important on the Nspire, as leaving files open has given me trouble before. Of course, if you'd like, you can do exec(open("...","r").read()) and then handle closing the file yourself, but be warned: bad things can happen if you forget.
Also, you must remember to add the leading / and the .tns extension, or else strange things will happen, especially with writing to files.
That's about it! Feel free to ask more questions if needed, I'll be watching the ti-nspire tag.
(Just realized this question is quite old, but I guess it still might be helpful for others who end up on empty questions months later while trying to figure something out :P)

OmegaT: How to import already translated files?

My team has been using Notepad for translation purposes so far. Recently, we decided to use one of the CAT tools available on the Internet - OmegaT.
We've got source and manually translated files, and only values were ever touched.
Is it possible to import both to the same project, so that source phrases stay source, and our phrases become their translated counterparts?
Note: I don't know if it matters, but files are formatted as INI (key=value).
What you need is an alignment. It takes source and target files and creates a translation memory.
In your specific case (INI files), you can use OmegaT to do an automatic alignment with a command line:
http://omegat.sourceforge.net/manual-standard/en/chapter.installing.and.running.html#omegat.command.arguments
Sample command line:
java -jar OmegaT.jar "C:\OmegaTProject" --mode=console-align --alignDir="C:\OmegaTProject\align"
For more general purposes, and with a GUI, there's a prototype version of OmegaT with an aligner:
https://omegat.ci.cloudbees.com/job/omegat-prototype/26/
See the OmegaT development mailing list for information about this.
Didier
With currently Beta version of 4.* releases (currently 4.1.5), you can use nice visual aligner - https://www.proz.com/forum/omegat_support/306343-new_interactive_aligner_in_omegat.html

Diff merge : view difference between two folders and ignore file version number

I need some help. I have to view difference between two folders, but I need to ignore the file version number (project version number) which is in the header of the file. Like that:
#version Release: $Revision: 9939 $
And do you know the best diff merge software for doing that in Mac OSX and the most beautiful. I know diff merge and Kaleidoscope. I love Kaleidoscope but, it cannot make some difference between two folders.
Many thanks before.
Try going into DiffMerge → Preferences → File Windows → Rulesets. You can modify the existing ruleset for your file type (or add a new one if no ruleset exists already).
Edit the ruleset you're interested in, and go to Lines to Omit. In there you can add a regex to match that line #version.
What I'm having trouble with is getting the folder diff to honor this. I find that files with no diffs according to my rules still end up in the folder diff as a non-match, but when I open the file diff window it says Files are identical or equivalent under the current RuleSet. Not sure if this is a bug or I still have something configured wrong. If I go into Folder Windows → Equivalence Mode and dig into the help there, I think I have all the folder diff properties set correctly to honor my rulesets, but still no luck.
It's a pity you need MacOS. For Win32 there is WinMerge readily configurable via Tools/Filters/Linefilters where you simply enter a regular expression to be ignored.
http://manual.winmerge.org/Filters.html
For example, you might use line filters to ignore comments or certain type of generated code, like version control system timestamps
WinMerge 3 will be Qt based hence MacOS positive too, but current 2.x is not yet.

How do I get the scalaz IDEA live templates working for the symbolic methods?

Many of the methods in scalaz have symbolic unicode equivalents, such as forever and ∞ (of course, I have this the wrong way round, the symbolic methods really have ASCII equivalents).
The project contains a live templates XML file for IDEA so these can be auto-completed, I believe by using the forever+TAB shortcut (in the above instance).
I can't figure out how to import this live template into IDEA and actually use it, though. How can I do that?
Live Templates XML file should be placed under IDEA configuration directory, templates subdirectory.
IDEA configuration folder location would depend on your platform:
Windows: USERPROFILE\.IntelliJIdeaXX\config
Linux: ~/.IntelliJIdeaXX/config
Mac OS X: ~/Library/Preferences/IntelliJIdeaXX
Where XX is IDEA version (90 for IDEA 9.x).
Make sure to close IDEA before copying the XML into the templates directory.

Accelerator key for a date stamp

Here's an open ended question. I work on a lot of mssql files, and I like to have a date stamp on each. This is so I can know just by looking at the source of a stored procedure whether it's up to date or not.
I'd like to have a shortcut autocomplete key, that, if i type say, d-tab-tab, I get the current date printed to the file. And yes, I am that lazy. :)
So the question is:
Is there any way of getting around this problem entirely?
If not, how would you suggest solving it?
Clever ideas welcome.
Are these files in source control? If so, see whether your source control provider allows templates within the source file which get filled in with the time and date when you check in.
If you use Notepad (and this is possibly the only argument for using it) then F5 does the trick.
What about using version control for your files and including automatic keyword expansion.
Using CVS Keyword Expansion you could put $Date: $ in the file and it will get replaced with the date of the last checkin. No typing or updating needed, it's "auto-magic".