Loading ...
Sorry, an error occurred while loading the content.

Re: Re(i)mapping word completion

Expand Messages
  • Tim Johnson
    * Andrew Pimlott [030802 09:09]: ... Yes! ... That s what I was looking for. Does the trick alright. ...
    Message 1 of 5 , Aug 2, 2003
    • 0 Attachment
      * Andrew Pimlott <vim@...> [030802 09:09]:
      <snip>
      > > Hi Andrew:
      > > I have done that at times, but it disables word completion.
      > >
      > > So then - is there a a method whereby I can get Word Completion
      > > and at the same time have Emacs-Style navigation in insert mode?
      >
      > Forgive me for not knowing exactly the emacs keybinding, but I
      > assume you mean something like, let <C-P> and <C-N> move up and down
      > a line in insert mode, and let some other key sequences (say, <F9>
      > and <F10>) do word completion. You can achieve this with

      Yes!

      >
      > :imap <C-P> <C-O>k
      > :imap <C-N> <C-O>j
      > :inoremap <F9> <C-P>
      > :inoremap <F10> <C-N>

      That's what I was looking for. Does the trick alright.

      > Use :help to read up on any of this that's unfamiliar.
      >
      > If you want it more emacs-esque, where you type M-x in insert mode
      > and then get to type in a function name, I'm sure you can
      > approximate this, but I'll let someone else figure out the details.

      http://www.vim.org/scripts/script.php?script_id=300

      > > (I have a greater goal here - not sure that it is noble, but
      > > I'm trying to put together a "stealth" method of acquainting
      > > students with vim)
      >
      > Good luck. ;-)

      Hahaha! All we can do is try. Right? Thanks for all your
      help.
      ~tj~

      --
      Tim Johnson <tim@...>
      http://www.alaska-internet-solutions.com
      http://www.johnsons-web.com
    Your message has been successfully submitted and would be delivered to recipients shortly.