First thing. For those who use vim but might not have known about it: vim has a feature called digraphs which gives you a way to enter letters with diacritics (eg ä), symbols (eg ✓), and other characters that aren't on your keyboard. It does have its idiosyncracies, but it's fairly reasonable once you start to toy with it a bit.
How it works: first, enter the compose key, which by default is Control-K. Then enter the two characters of the digraph, and you'll get the single character that's defined in the digraphs table for that particular combination.
So, for instance:
- Ctrl-K + o + - ⇒ ō
- Ctrl-K + e + : ⇒ ë
- Ctrl-K + c + , ⇒ ç
- Ctrl-K + o + C ⇒ ℃
- Ctrl-K + P + d ⇒ £
- Ctrl-K + 1 + 2 ⇒ ½
The command :digraphs will show you everything in the digraphs table.
Last thing and the point of all that preparatory context above: there is a terrible problem with the set of digraphs as it ships with vim. Clearly the sequence < + 3 should compose to the character ♥, but it doesn't by default. To remedy this horrible shortcoming, add the line
digraph <3 9829
to your vim config file. (9829 is the unicode decimal identifier for the character ♥.)
no subject
no subject
all the years of vi and vim
For all the years I've been using vi and (later) vim, it never ceases to impress (or even amaze) me all can be done with what I'd like to think is the most versatile and powerful programmer's text editor in existence. I'm actually using it to comment on this post with the w3m WEB browser.
Thank you for posting this and Happy Friday everybody!
/\__/\ (='.'=) (")_(")Plain text is beautiful.Re: all the years of vi and vim
no subject
no subject
That's just "nice to have". Like that feature of TextMate, Emacs w/ an add-on and Sublime Text 2 when you can drag a file into the editor and it'll insert the appropriate snippet, like, dragging an image into html code = img src="that_image.png". Never actually used it.
no subject
Eh, YMMV. It's not something that's great for entering, say, swaths of Japanese (you want an IME or some such for that), but I find it handy for things like accents/diacritics. Si on écrivait en français, on l'utiliserait beaucoup.
Also, characters like ½, ℉, and © don't seem to be defined by default in any input method editor I've seen yet. I use the former two a lot in writing recipes, f'rinstance.
no subject
no subject
no subject
no subject
Heh, we've gotten to the same place by taking different roads. I've installed the It's All Text plugin, which lets you edit Firefox textareas using an external editor of your choice -- in my case, vim. =)
no subject
no subject
What I've done is instead of bothering with the magic necessary to launch vim in a terminal, I just run the GUI version of vim instead (gvim).
What platform are you using itsalltext on? On my linux box, I just tell itsalltext to run /usr/bin/gvim. On the Mac, calling gvim directly doesn't work for some reason; instead you have to tell itsalltext to use /usr/bin/open and then, in Finder, configure vim as the default app used to open text files. (open is the OS X command that opens a file with whatever app is configured to open it, just as if you'd double-clicked its icon in the Finder.)
no subject
no subject