On 20/12/08 00:26, Leandro N. Camargo wrote:
> I'm not having success to make these two key mappings to work:
>
> noremap<silent> <C-,> <Esc>:call cursor(line('.'), 1)<CR>i
> noremap<silent> <C-.> <Esc>:call cursor(line('.'), col('$'))<CR>i
>
> Since my cmd+arrow(left/right) shortcuts doens't work inside my bash
> terminal (I don't have Home/End keys on my macbook) I've tried to make
> this workaround at least for vim.
>
> I've put both inside my .vimrc (and loding into my vim using :source)
> and I wasn't succeeded.
> I've tried imap and inoremap there as well.
>
> Anyone know what is the catch?
>
> Best regards,
> Leandro.
Among all thinkable Ctrl-printable key combinations, only those for
"printable keys" in the range 0x40-0x5F are reliably mappable, plus
Ctrl-lowercase letters (because case doesn't matter) and Ctrl-? which
maps to 0x7F. The culprit is not Vim, not even vi, but ASCII which
defined only those combinations, so only these can be seen (as 0x00-0x1F
plus 0x7F) when using "cooked" keyboard input, as Vim does. Of the
Ctrl-unprintable key combinations, some of them can be seen, others not;
and some of them are ambiguous as to the presence or absence of the Ctrl
modifier; it all tepends on your keyboard interface.
On the Mac, there are both a Ctrl and a Cmd modifier; one of them is
represented as <C-something>, the other as <D-something>. If one of them
doesn't work, try the other.
Best regards,
Tony.
--
William Safire's Rules for Writers:
Remember to never split an infinitive. The passive voice should never
be used. Do not put statements in the negative form. Verbs have to
agree with their subjects. Proofread carefully to see if you words
out. If you reread your work, you can find on rereading a great deal
of repetition can be avoided by rereading and editing. A writer must
not shift your point of view. And don't start a sentence with a
conjunction. (Remember, too, a preposition is a terrible word to end a
sentence with.) Don't overuse exclamation marks!! Place pronouns as
close as possible, especially in long sentences, as of 10 or more
words, to their antecedents. Writing carefully, dangling participles
must be avoided. If any word is improper at the end of a sentence, a
linking verb is. Take the bull by the hand and avoid mixing
metaphors. Avoid trendy locutions that sound flaky. Everyone should
be careful to use a singular pronoun with singular nouns in their
writing. Always pick on the correct idiom. The adverb always follows
the verb. Last but not least, avoid cliches like the plague; seek
viable alternatives.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---