My terminal emulator is configured for Unicode character encoding and my .vimrc contains the line
set encoding=utf-8
but when I try pasting
The solution was to uncheck the "Escape non-ASCII input" checkbox in the Advanced tab of the Terminal.app settings.
Instead of copying the character from the clipboard and pasting it into the text editor, you can add it to the file using vim's digraph feature.
So, with default settings, using your example, you could enter insert mode, then hit Control-k, and type e'. The result will be é.
You can see the list of defined digraphs by running
:digraphs
and general help by running
:help digraph
which also explains how to customize your mappings.
If you are truly set on pasting the characters in, Shift-Insert has always worked for me.
How to type a non ASCII code into vi
You'll have to know what your encoding is to enter the proper codes, I assume you left VI at the default.
In VI, go into insert mode, while in insert mode, press
Ctrl-v 172
That should insert the Logical Not (sideways and inverted L) character defined here:
http://www.htmlhelp.com/reference/charset/iso160-191.html
xclip -o|xclip -i
workaround (add -sel clip
for clipboard).