On Jul 21, 8:20 am, John Sampson <jrs....@ntlworld.com> wrote:
> Hello -
>
> I didn't understand the 'noh' part, nor why ':map' wouldn't do but it
> has to be ':nnoremap',

Well, technically just :map should also work. The main trick is
probably making sure you include the ':' at the beginning and the
"<CR>" at the end. You didn't provide the map command you attempted to
use, so I'm just guessing one of those may have caused a problem. So,
stolen from John, this should also work:

:map <F8> :s/\([^\|]*\)\|\([^\|]*\)\(.*\)/\2\|\1\3/<CR>

The main difference between :map and :noremap is that :noremap uses
the built-in functionality of each part of the right-hand-side,
whereas :map uses any other maps you may have defined.

You can refine this further by adding a mode descriptor. :nmap
and :nnoremap define mappings that only take effect in "normal
mode", :vmap and :vnoremap in "visual mode", etc. So using :nnoremap
instead of :map is a good idea (though not strictly necessary) because
it only takes effect in normal mode, and it doesn't do anything
unexpected if you ever define another mapping using some of right-hand-
side of this mapping.

> Perhaps Vim is not for me.

Vim has a very steep learning curve, and there's not much we can do to
change that. Once you've mastered it, however, it will make you far
more efficient, paying for your initial time investment many times
over.

It looks like you have general idea what you're doing, so I imagine
you've already ran the tutorial. If not...do so. You can also learn a
great deal just reading emails or archives on this list, by reading
through chapters of the :help, or by following the "Random page" link
on vim.wikia.com a few times a day. Stick with it. You'll be glad you
did.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to