I am using luadoc and running it on Unix and windows, unfortunately the output is different on each system because of the DOS/Unix line endings, this really confuses my source control as it thinks every file has changed (mercurial). How can I make lua use one or the other?
I know nothing about lua, but you might want to solve this at the SCM level, Mercurial has the EolExtension for that.
That being said, you're probably missing some feature of luadoc.
Mercurial FAQ 7.4
Related
Salutations
I am having an issue right now. Recently I have download Bioperl, but I made a mistake somewhere in the installation process. I dont know the correct terminology, but what I do know is that the perl modules I downloaded are suppose to be with the default perl (aka #!/usr/bin/perl) along with the use strict, and use warnings.
But they are located in this directory.
/Users/JamesPK/TerminalWork/lib/perl5/5.16.2/Bio/AlignIO/fasta.pm
So right now, I need to transfer all those modules from bioperl in the home directoy, to where ever the #!/usr/bin/perl is located.
Anybody have any ideas or insights to tackling this problem ?
Plus is there an effective unix command I can use for transfering these files? I am still getting use to programming on a Mac.
Cheers
I'm running a few different windows command scripts that all reference the same directory. The directory I want to reference changes from day to day depending on what I'm working on. I've looked into taking command line args, but I think the more elegant solution would be to have all the scripts reference some sort of config file, if such a thing is possible. Then I could change the directory address one place to change all of my standard command scripts. If it's not abundantly clear, I'm new to windows scripting.
Q: Is there a way to retrieve data from an external config in a windows command script?
PS - Don't be limited by my question, if you think you have a better solution for what I'm trying to do, I'm all ears.
The simplest thing would be to use an environment variable.
eg:
set my_path=c:\foo\bar
then in the script you can use %my_path% and it will be expanded for you.
I have a huge file with all the commands I use on and off the commandline. This file is getting harder to open and navigate as its size gets larger. I am looking for a commandline utility that makes this process easier. I found this gem, which does something similar to what I want, but it's terrible with long lines of code with multiple quotation marks.
What does everyone use to keep your code snippets and easily access it from your terminal?
I keep a similar file myself. This example isn't directly useful with your file. However when I find that I need to run a particular command I recently used, without looking it up again, I run a grep on history.
For example:
history | grep "svn co"
You may try Komandi, a multiplatform command snippets manager.
I do something like "svn diff > /mystuff/current.diff". I want to view this .diff file with syntax highlighting.
jEdit does it, but it's a huge beast and it takes a while to start up. I want something lightweight/native.
Smultron/Fraise, TextWrangler, TextEdit, Dashcode don't seem to highlight .diff files.
FileMerge seems to want to generate diff files, not show you existing ones.
TextMate does the trick, but it's not free. I'd feel happier dropping $50 US if I was going to take advantage of it for anything more than a diff viewer.
Are there any alternatives to jEdit or TextMate that I should consider?
You could try an OSX GUI for vim, like the full-featured MacVim or the lightweight vim-cocoa...
(For a rough feature comparison, you can see this mailing list comment comparing them...)
You might Versions, you can download a free demo version that will work for a limited time. You point it directly at you svn repository and you can compare versions.
http://www.versionsapp.com/
I currently use DiffMerge and it works really well for me. (I'm forced to use StarTeam and it integrates well with it)
Not an editor but you could use GIT or Mercurial and their Mac GUI clients to view the highlighted diffs in any files. The clients are free.
In a terminal, one can also use the command line version of vim (which I believe comes with the Xcode command-line developer tools).
Unfortunately, the command-line version of vim is not set up to do syntax highlighting by default, so there's a little bit of additional magic necessary.
For those not versed in vim, you need to know these three commands in order to view diff files:
vim <file> // open the file in vim
:syntax on // turn on syntax highlighting
:q // exit vim when you're finished
Vim is good at automatically recognizing diff files, so it's usually not necessary, but if for some reason vim doesn't recognize your diff as a diff, you can tell it which syntax to use:
:set syn=diff
If your diff is of source code, you might also occasionally want to toggle back and forth between syntax highlighting of the diff and syntax highlighting of the code; you can also set the syntax to java, c, php, mysql, or sh, among others.
Is there a diff tool that allows saving of the compare markup?
To clarify, I would like to save the actual comparison of the two files that shows the differences to send to someone for review.
EDIT
Lots of good answers here. In my case I already had a copy of Beyond Compare but didn't see the option. Thanks to John Saunders for pointing out the feature. It's "Session...Text Compare Report..." BTW.
My question was not specifically about Beyond Compare, so I am going to accept the answer that currently has the most up votes.
WinMerge is free and allows you to save the differences in various formats. It works well enough for me to not bother looking elsewhere, and I like the price.
There is also a portable version if you can't, or don't want to, install it.
You can do this with the command line diff if you're using Unix, though it sounds like you're not. Cygwin does bring a CLI diff, and Mac OS X ships with it.
$ diff <file> <other file> > mydiff.txt
Beyond Compare does this.
I use the Scintilla Text Editor (SciTE) to open a diff file generated by command line or WinMerge, and then export the RTF, and it preserves color highlighting of differences. I use this method especially when emailing short patches for review in-house, and I use Outlook, for example.
The process I used just now as an example:
# diff -U 1000 a.txt b.txt > diff.txt
# scite diff.txt
### Edit-Copy as RTF
### Paste into Outlook
http://imagebin.ca/img/nBG25am.png
WinMerge provides this functionality through the Tools->Generate Patch menu item. I use the MSYS tools on windows, so that I run GNU diff a lot, but once you get the output, I would use SciTE if you need something like the above.
ExamDiff does a comparison which is shown in a window. It can save a Unix-like formatted version of the differences. Also, the file-to-file comparison version of the program is free!