ipython-notebook: Syntax highlighting and autosave - syntax-highlighting

I am working a lot with ipython-notebook. Is there any way to highlight open and closed brackets? I am asking because I saw in some videos with Wes McKiney that he used some kind of syntax highlighting for brackets. Moreover, is there any way to autosave in ipython-notebook?
Finally, do you have any other modifications or browser extensions which you can recommend for ipython-notebook?
Best Regards
Andy

I am working a lot with ipython-notebook. Is there any way to highlight open and closed brackets? [...] Moreover, is there any way to autosave in ipython-notebook?
All this should be on development version.
Finally, do you have any other modifications or browser extensions which you can recommend for ipython-notebook?
You can also look for tricks and extension on IPython Wiki. There are a bunch of those.

Related

Colour coding comments in RStudio

I am a very visual person and would like a distinction between #a command I commented out and a ##message for myself or co-worker on the file. I had a look around if RStudio supports different kinds of comments but it doesn't seem like it. Does anyone know a way around this?
Thanks!
You can use
#'* some colorfull comment *
to comment in color.
-R version 3.6.3
-RStudio ‘1.2.5033 "Orange Blossom"
As noted, this isn't an R question but an RStudio question (I've edited as such). RStudio doesn't currently have user-modifiable themes, just the built-in ones. That is apparently an in-development feature.
In the meantime, apparently you can hack away at the .css file that defines a theme to perhaps add what you're after - https://support.rstudio.com/hc/en-us/community/posts/200644098-appearance-Editor-theme
Otherwise, you could use a different editor that allows you to specify your desired syntax highlighting.
#'[Red]
#'#Purple
#'*Green*

Sublime Text 3 Doesn't Recognize %i in ruby

I'm using the latest build of Sublime Text 3. When typing %i[foo bar] Sublime does not seem to recognize this and I don't get the proper highlighting.
Has anyone else experienced this? If so, is there a way I can fix this on my end or is this something that Sublime HQ would have to fix?
The %i[foo bar] # [:foo :bar] literal notation for a symbol array was only implemented in Ruby 2.0, while the Ruby language definition that ships with ST3 is mostly focused on 1.9 and earlier. I searched around a bit, but unfortunately I couldn't find any .tmLanguage files that are updated for 2.0, let alone include this literal notation, so I can't point you to a ready-made solution. But, I do have a few suggestions.
First, head over to the unofficial Sublime Text Issues tracker and post a bug report. We're not sure how much attention is paid to this list by the developer, but it at least broadens the issue's visibility and may prompt someone to post a fix. You can also reply to this thread on the Sublime Text forum and perhaps reference your issue.
The second option, if you have good regex-fu, is to hack the Ruby.tmLanguage file and add support yourself. I was going to post directions on how to do it, but then I tried it myself and it seemed to work, so feel free to use my work:
Go to Preferences -> Browse Packages to open up the Packages folder in your system's file explorer.
Create a folder called Ruby2.
Copy the contents of this gist into a new file, and save it in your Ruby2 directory as Ruby2.tmLanguage.
Restart Sublime, switch to your problematic code, and select View -> Syntax -> Ruby2. Both lines should now be highlighted the same way. Here's a before and after screenshot using the Neon Color Scheme:
I hope this helps. I'm not a Rubyist, so if I made any blatant errors please let me know.
From my (brief) research there definitely seems to be a need for an updated version of Ruby.tmLanguage for all the new features in 2.0, so hopefully any issues you post will prompt someone to start/publish a project. I've already done something similar for Python, but my Ruby skillz just aren't there for this project :)
Good luck!

color code editor for sass scss windows

I am looking for the simple color code software to edit scss file for windows.
I am sorry if the question is repeated but i am tired of searching and found mostly broken files.
Please Suggest
I'm making the assumption that you are asking for a windows text-editor that supports SCSS syntax highlighting, and not a color-picking utility.
If so, I would recommend
notepad++ with user defined SCSS hightlighting [EDIT - old link broke, swapping out for new one] that you can download here or another here
or, if you are willing to pay $60, Sublime Text 2 is the best windows/mac/linux text editor (IMHO). There is a SCSS Plugin that should have everything you need.
If that is not what you are looking for, please clarify your question so we can help you better.

How to turn on syntax highlighting in etherpad

There are many free etherpad implementations since it went open source. Does etherpad support syntax highlighting or is some kind of add-on available?
I tried
http://typewith.me/
http://sync.in/
http://www.piratenpad.de/
You can install a plugin in Etherpad called "Syntax highlighting".
To install the plugin simple visit /admin/plugins on your Etherpad deployment and then search for "syntax" and click Install.
For details on the plugin see https://npmjs.org/package/ep_syntaxhighlighting
UPDATE: Syntax highlighting is available as a plugin in the current Etherpad -- see John's answer below.
The original etherpad creators were working on highlighting, but complex sync-problems made them abandon that feature -- as documented in a .txt file in the source code.
Many etherpad sites run on a mostly standard etherpad.org release. If highlighting would get added, you'd probably see it quickly adopted at sketchpad.cc. Perhaps watch them and wait? Or if you really want highlighting, a good first attempt/experiment would be the read-only view. Example: http://sketchpad.cc/sp/pad/view/BACfNDybki/latest
Try to use some existing highlighting javascript library to highlight the text inside DIV#padcontent or perhaps $('DIV#padcontent')[0].textContent
The complexity is getting the highlighted text formatting back into the DB. For this you might need to use operational transformations (which is the foundations of etherpad and as of recently also used in the Google Docs word processor). A tutorial: http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation
The etherpad plugin ep_codepad provides syntax highlighting - based on highlight.js - for etherpad.
https://www.npmjs.com/package/ep_codepad

BlogEngine.Net Code Formatting Extension that works?

For months now I've been trying to find a code syntax formatting extension that works for BlogEngine.Net. I'm not fond of the behavior of the default formatting extension, and have tried a couple of others (manoli is among them), but they always seem to interact badly with the TinyMCE editor. Does anyone know of an extension that works, or a different approach that will allow me to make code samples pretty on my blog without hacking the crap out of the HTML myself?
Thanks.
I would try using Windows Live Writer along w/ the Paste From Visual Studio plugin. One you go WLW, you'll never go back to that damn TinyMCE interface.
WLW here:
http://get.live.com/writer/overview
Plugin here:
http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&l=8
Thanks, Rafe. Thanks to this post that Hanselman put up the day after I asked the question, I downloaded WLW and am now using it. As far as getting prettily formatted code, I'm using cut-and-paste from a little tool developed and available on manoli.net.
Check out SyntaxHighlighter.. Works excellent. For easy integration into BlogEngine have a look at my blog post.

Resources