Hi all!
I have a problem with invisible characters here. E.g. writing perl code, I use || quite often. I produce this character on my Swiss German keyboard using Option-7. Normally, I put a space after || to increase readability. There it happens that I keep the option key pressed while pressing the space key - and this apparently produces some invisible character. In any case, perl complains:
Unrecognized character \xC2 at /Users/abonhote/test2.pl line 5.
I have turned on "show invisibles", but the extra character doesn't show up. How can I avoid typing these characters?
Thanks in advance!
André
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Bonhôte André wrote:
Hi all!
I have a problem with invisible characters here. E.g. writing perl code, I use || quite often. I produce this character on my Swiss German keyboard using Option-7. Normally, I put a space after || to increase readability. There it happens that I keep the option key pressed while pressing the space key - and this apparently produces some invisible character. In any case, perl complains:
Unrecognized character \xC2 at /Users/abonhote/test2.pl line 5.
I have turned on "show invisibles", but the extra character doesn't show up. How can I avoid typing these characters?
Thanks in advance!
André
You can create a new snippet in the bundle editor and use the following options:
Save: Nothing Commands: echo -n " " Input: None Output: Insert as Text Activation: Key Equivalent
Then go to the field next to Key Equivalent and press option space, like you would when you type accidentally the wrong character.
Close the bundle editor and every time you would write this character a space should be inserted.
Hope this helps, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229
Thanks, nice hint :-)
On 01.06.2007, at 14:42, Simon Ruderich wrote:
You can create a new snippet in the bundle editor and use the following options:
Save: Nothing Commands: echo -n " " Input: None Output: Insert as Text Activation: Key Equivalent
Then go to the field next to Key Equivalent and press option space, like you would when you type accidentally the wrong character.
Close the bundle editor and every time you would write this character a space should be inserted.
Hope this helps, Simon
- privacy is necessary
- using http://gnupg.org
- public key id: 0x6115F804EFB33229
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin)
iD8DBQFGYBQiYRX4BO+zMikRCnJPAKCmdfFWcC0iYKYKPJ148fY3p+je1gCguSeQ XOCRDxlCGVIhTN4GGjqO8ek= =+Rt8 -----END PGP SIGNATURE-----
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Please note:
OPTION+SPACE is the default keyboard shortcut to select the previous input source, i.e. if you enable more than one input method in System Preferences' International this shortcut won't work.
Maybe you create a real ;) snippet with "|| " (without the double quotes) and bind it to |. Then you | and press TAB to get || SPACE.
Hans
PS André's suggestion is not a snippet it is a command
On 1 Jun 2007, at 14:53, Bonhôte André wrote:
Thanks, nice hint :-)
On 01.06.2007, at 14:42, Simon Ruderich wrote:
You can create a new snippet in the bundle editor and use the following options:
Save: Nothing Commands: echo -n " " Input: None Output: Insert as Text Activation: Key Equivalent
Then go to the field next to Key Equivalent and press option space, like you would when you type accidentally the wrong character.
Close the bundle editor and every time you would write this character a space should be inserted.
Hope this helps, Simon
- privacy is necessary
- using http://gnupg.org
- public key id: 0x6115F804EFB33229
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin)
iD8DBQFGYBQiYRX4BO+zMikRCnJPAKCmdfFWcC0iYKYKPJ148fY3p+je1gCguSeQ XOCRDxlCGVIhTN4GGjqO8ek= =+Rt8 -----END PGP SIGNATURE-----
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
********************************************************** Hans-Joerg Bibiko Max Planck Institute for Evolutionary Anthropology Department of Linguistics Deutscher Platz 6 phone: +49 (0) 341 3550 341 D-04103 Leipzig fax: +49 (0) 341 3550 333 Germany e-mail: bibiko@eva.mpg.de **********************************************************
On Fri, 1 Jun 2007, Bonhôte André wrote:
I have a problem with invisible characters here. E.g. writing perl code, I use || quite often. I produce this character on my Swiss German keyboard using Option-7. Normally, I put a space after || to increase readability. There it happens that I keep the option key pressed while pressing the space key - and this apparently produces some invisible character. In any case, perl complains:
Unrecognized character \xC2 at /Users/abonhote/test2.pl line 5.
I have turned on "show invisibles", but the extra character doesn't show up. How can I avoid typing these characters?
That's a UTF-8 non-breaking space (it's actually the sequence 0xA0, 0xC2). I had hoped you could use the Perl "use utf8" or "use encoding 'utf8'" pragmas to convince Perl to accept the nbsp as a plain space, but no such luck.
Another alternative to the snippet suggestion would be to assign a macro to find all occurrences of the nbsp and replace them with a space.
FWIW, for me the "Show Invisibles" setting shows the nbsp character as dot, probably the Unicode code point 2022 BULLET character (•). Maybe you're using a font which doesn't contain this glyph?