Sublime text 2 tail -f in windows - sublimetext2

I was wondering if sublime text 2 can "tail -f" file like in linux, I'm using windows btw.
I wanted to see apache error log file in xampp.
Notepad++ has it is there a plugin that can do it in sublime text 2?

I don't know if it's possible or not, but I usually use Baretail which handle pretty well like tail.
The thing I really love with Baretail, is the regex you can define to highlight some part of your log file. Like, put each with line with
error inside with a red background, bold and white text,
warning message, with an orange background, italic and white text,
etc ...
Otherwise, it seems you are not the only one who requested this kind of features (you should upvote the request on userecho).

There is a project called SublimeTail that is currently in development. Currently available to download in Alpha from Github.

For a simple solution, you can use in Windows SO GNU utilities for Win32. In this you can find tail -f of UNIX/Linux and another useful commands.

Related

Power just went off and my html code turned into binary (sublime text)

As I mentioned in the title, the power went of for 2 minutes, and my PC turned off while I was writing some HTML. After I turned it back on my code turned into binary and I don't know how to recover it. I use Sublime Text 3. I've also tried opening it in Notepad++, but it looks the same.
Sublime
Notepad++
Is this something that can help you?
I don't know if the binaries are the compiled HTML code or just plain text symbols calculated into binaries.
If the second one is the case then you might be able to recover it with something like the link above. Of course if sublime encodes with 16 or 32 bits "per sign" then you will have to use some other algorithm. This should not be too difficult to implement though (in Java for example).
If the text looks like
0101010001101000011001010010000001110001
then every sign is encoded with exacly the same number of bits so you can just try to split it every 8th bit (or 16th, or 32nd) and use the above or equal algorithm to decode that.
If your binaries is a compiled code then I am not aware of any way to decompile binaries into HTML although such algorithm should exist somewhere.
EDIT: Be aware that, since your editor broke unexpectedly, the file might be corrupt and the code will be slightly different or destroyed completely. In this case there is nothing you can do, unless the corruption can be undone.

Markdown for codes on webpage

I am experienced with CSS and a beginner in Python. In the past, while writing blogs/webpages with codes, I would simply just create a div with a particular class and make it a code bloc with different colour and font-family, etc.
However, these days I've seen so many beautiful applications of markdown such as github-markdown-css or dillinger. But I really don't know where to start learning. For instance, I am not even sure where to execute the installation instruction below...
$ npm install --global generate-github-markdown-css
If I really want to really go beyond linking html files/blog posts with CSS and do some nice-looking markups, what are the steps necessary?
To make it more solvable as a question in this forum: if I just have a html file and want to create a code bloc showed above by typing
> line 1
> line 2
instead of
<div class="codebloc">
line 1<br/>
line2
</div>
Where should I start?
For instance, I am not even sure where to execute the installation instruction below...
npm install --global generate-github-markdown-css
This command, which you can execute in your terminal, will install the specified npm package generate-github-markdown globally, making it available from anywhere on your system. To execute it you'll need npm installed on your computer. If you're not already familiar with npm, I suggest reading the official documentation or this guide on Sitepoint. Since it installs the package globally, you can execute the command from pretty much anywhere on your computer.
How do I make code blocks in Markdown?
Markdown will automatically convert text with for spaces in front to code, which looks like this:
console.log("This code is cool");
If the Markdown parser supports GitHub Flavoured Markdown, which most parsers do, you can also wrap your code with three back-ticks ```. If you want inline code you can use just a single back-tick ` on both side of the code.
If you want to learn more about how to do various things with Markdown, including some more examples on how to write code blocks, I recommend looking at this page.

How to install VHDL syntax highlighting for Sublime Text 2?

I am trying to install this VHDL highlighting package for my Sublime Text 2.
I already installed the elusive Package Control following the instructions here.
But when I search for the package within Ctrl + Shift + P, the package doesn't show up!
What do I do? According to the plugin's page, it should work for Sublime Text 2.
The plugin's description is out of date. If you look again at the plugin's Package Control page, you'll see an ST3 icon at the top, just to the right of the author's name. So, you'll need to upgrade to ST3 to use it, and I strongly suggest upgrading anyway. Even though ST3 is still labeled as a "beta", it's rock-solid and a great improvement over ST2 in a number of ways, not the least of which is an improved API that allows for all these great ST3-specific plugins. I've been using it exclusively for well over two years now without major issues.

Non-ascii character highlight in Sublime Text 2

I have been using Sublime for a few months with great enjoyment until yesterday when something was corrupted and I needed to reinstall.
Since I thought I had all the packages I used memorized, I didn't keep a backup and did a full uninstall/reinstall of the app and the application support folder.
One of the features I really liked was that if I pasted in copy from another source, like Word, all the characters like curly quotes, etc. would be highlighted in hot pink.
This is no longer working and I believe it must've been a package I installed and didn't realize it. It saves a lot of time if you have to convert text to HTML content.
Does anyone know what package that is or how to get that behavior back in ST2?
I have been all over Google and cannot figure out how this was working. My mistake for throwing my settings/packages away.
I recently wrote a plugin dedicated to this exact problem: highlighting non-ascii characters.
https://github.com/TuureKaunisto/highlight-dodgy-chars
The plugin works on a whitelist principle: all non-ascii characters that are not whitelisted in the settings get highlighted.
I think the package you're after is Highlighter. It highlights a few unicode characters in that hot pink you referred to. You can add more matches via settings (example).

How to highlighting differences between 2 html files

My web application has job descriptions. These job descriptions can be modified by some users. Each modification result in a new version of the job description.
The content of the job description is edited by the users, in html, directly in the textearea using the tinymce editor.
I want to be able to show a user the modifications made to the content from one version to another.
The simpler the better, for example, just a green background for added content and a blue background for removed content.
The application is a ruby on rails app and I have full access to my server (slicehost)
You might also look at differ.
This might be helpful http://markmcb.com/2008/11/04/ruby-on-rails-diff-text-to-html-ins-and-del/
This uses the diff utility available on most systems and formatting changes would be highlighted as well.
You should use a simple diff program. Here are some good ones:
OSX
FileMerge - Apples own. Installed with XCode
Changes - Good little app
Araxis Merge - Commercial but featureful
*Nix
Meld - Full featured
Kompare - KDE, very nice
Gdkdiff - Simple but effective
tkdiff - Unkown
simply use the diff command line command...
Win
Winmerge - One of the best