So I'm attempting to print a show an image of a url using the 'image' command in shoes. The issue is that my url contains % characters. This would not be an issue most of the time since I could just escape it but Shoes does not behave like I would expect it to. I've looked through the manual and other sources from Shoes but none seem to mention how to print use special characters.
Essentially right now alert yields...
alert "%D" --> 2743522352
alert "\%D" --> 3439909232
but what I really want is
alert "%D" -->%D
how can I make this happen?
I am not able to reproduce this problem on red shoes. But I guess, to solve the problem, you should use single quotes instead of double quotes.
alert '%D' -->%D
Because in ruby, single quotes escape everything inside it.
Hope it helps :)
Related
Recently I've discovered a wonderful terminal multiplexing tool called gnu-screen.
I'm satisfied with it completely. But I've encountered one inconvenience I'd like to improve.
'C-a H' command makes screen log everything to a log file called named 'screenlog.*'.
But encodes control characters in a weird way. For example if you open the log file with 'less' you might see some cryptic characters and the log file is unreadable. You have to run 'less -r' or 'less --raw-control-chars' which helps to encode those control characters correctly.
So far so good. But if you want to edit the log or read it with vim then you encounter the same problem with control characters.
I've googled this problem and looked up at SO but I've been overwhelmed because there's so much info about vim and screen. Unfortunately I haven't found the solution yet.
Perhaps you know the solution for this problem or some workaround.
UPD
Thanks to Frédéric Hamidi's comment I discovered those characters are the terminal escape sequences of font color, etc. Vim as an editor sees them and by default edits them. The plugin Frédéric suggested tells vim to interpret them.
To provide an answer here and finally mark this fixed: The AnsiEsc plugin adds syntax highlighting for ANSI color sequences. So instead of seeing ^[[30m; the following text will be highlighting in the corresponding color, just like when using less --raw-control-chars.
With CKEditor I need to give the user keyboard entry of bullets, left-double-quotes and right-double-quotes.
I already provide the user with numbered and bulletted lists, they want stand-alone bullets.
When I say left-double-quote, I mean “ “ equivalent.
When I say right-double-quote, I mean ” ” equivalent.
The user wants the ability to type these characters directly into a CKEditor textarea.
How should I configure CKEditor to do this?
I solved this problem during the export to IDML by converting the quotes (""") to their respective ” and “ (&#nnnnn; equivalent) by evaluating the characters next to the quote.
So the user may input ", and I output the desired quote character in it's place.
I have a random problem which I personally find quite irritating. I use the terminal alot and have installed a theme and even toyed around with what is displayed on the prompt. However if I write a particularly line of text it does not start a new line in the terminal instead it will begin overwriting what is displayed on the screen in the current terminal line. I wondered if anyone knew a way to solve this so that it does show a new line and all input would be visible.
PS1 value
export PS1="\r\n\e[1;32mdave:\w $\e[0;37m "
Well, thanks to the post by #Joni, I believe the solution is:
PS1="\r\n\[\e[1;32m\]dave:\w $\[\e[0;37m\] "
That is, here the color codes \e[1;32m and \e[0;37m are enclosed within \[ and \], as #Joni suggested they should be.
Non printing characters, like escape codes for color, have to be surrounded with \[ and \] so that bash knows to exclude them when calculating the length of the line.
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/nonprintingchars.html
After the last update of Aptana it stopped to syntax highlight all of my JavaScript code. I tried to fix this for a couple of days with reinstalling the editor, using Eclipse and install Aptana as a plugin and also tweak different settings.
As you can see on the image all the code after line 224 turns white. And I have not found any specific code combination that seem to trigger this bug.
Worth mention is that some of the code starts to highlight again when you change something in the line and sometimes Aptana still highlights the code further down in the document.
I would really appreciate if someone has a solution on this issue.
my best ~ Pontus
had the same issue. it turned out that there was a "wrong" whitespace character. if you activate the option "show whitespace characters" you can differ between regular "space" characters (marked by a dot in middle of line) and other whitespace characters.
http://i.stack.imgur.com/3bMsg.png --> "wrong" whitespace character in condition (after the "||")
When I do shift key + single/double quote key on my mac using Sublime Text 2 I don't get parseable double quotes.
Here's a picture demonstrating the effect on the id=""'s of some HTML:
Does anyone know how to correct this? The correct double-quotes were generated by a different text editor.
I answered my own question. I had installed Sublime's Zencoding plugin which when I removed it, the double-quotes were normal again.
Update: Oddly, this double-quote issue still exists in my PHP files, but not my JS files. I'm not sure how to solve this yet but will update this answer when I do.
UPDATE #2
I finally solved the PHP file double-quote issue. Please see my answer on this SO thread.
I had a a key binding set to use these "typographical" quotes in my SublimeText2 preferences->key bindings->user