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

Re: [vim] Problem with `inoremap jj '

Expand Messages
  • Gary Johnson
    ... Oh, PuTTY. Now I understand. I ve never been able to configure PuTTY to behave like a real xterm--I m not sure it s even possible-- but I seldom use it
    Message 1 of 19 , Jan 30, 2012
    • 0 Attachment
      On 2012-01-30, Clark J. Wang wrote:
      > On Mon, Jan 30, 2012 at 15:38, Gary Johnson wrote:
      >
      > On 2012-01-29, Clark J. Wang wrote:
      > > On Monday, January 30, 2012 2:56:37 PM UTC+8, Gary Johnson wrote:
      > >
      > > On 2012-01-29, Clark J. Wang wrote:
      > > > As recommended by other people I have 'inoremap jj <ESC>' defined
      > in my
      > > vimrc
      > > > and it works well for most of the time.
      > > >
      > > > A few days ago when I copy-n-paste a lot of text into vim, the
      > result was
      > > > always wrong. It took me quite a while before I figured out that
      > there
      > > was a
      > > > substring "jj" included in the text to be pasted. For now I often
      > :set
      > > paste
      > > > before copying large text to avoid unexpected behavior.
      > >
      > > How are you copy-n-pasting? If you are using a vim with the X11 and
      > > xterm-clipboard features enabled, have mouse=a, and are pasting with
      > > a mouse in a suitable terminal such as GNOME Terminal or xterm, Vim
      > > will detect that you are pasting and disable mappings.
      > >
      > >
      > > I usually use vim without X11 from a terminal and the TERM var may be set
      > to
      > > linux (for Linux), dtterm (for Solaris), xterm-color (for OS X) or screen
      > > (within GNU screen).
      >
      > What do you mean by "a terminal"? Are you not in an X11
      > environment, or are you just using a vim without X11?
      >
      >
      > By "terminal" I mean a "pseudo terminal" opened by PuTTY when I ssh to a
      > server. I seldom use X11 enviroment for work and I use gvim only on Windows. :)

      Oh, PuTTY. Now I understand. I've never been able to configure
      PuTTY to behave like a real xterm--I'm not sure it's even possible--
      but I seldom use it in a situation where I need to copy and paste so
      I'm not very motivated. When I have to paste, I do what you've
      done: :set paste; paste; :set nopaste.

      > I've never used dtterm--I just built
      > xterm for Solaris.
      >
      >
      > Could you tell me how to build xterm for Solaris? I find TERM=xterm does not
      > work well by default on Solaris 11 and TERM=dtterm works fine.

      From my notes (from 2005), it was pretty simple:

      cd /home/garyjohn/src/SunOS/xterm-165
      tar zxf xterm.tar.gz
      cd xterm-165/
      ./configure --prefix=/home/garyjohn/src/SunOS/xterm-165
      make
      ln -s /home/garyjohn/src/SunOS/xterm-165/xterm-165/xterm ~/bin

      I wasn't allowed to install anything in the official places on that
      system.

      The Solaris system I used also did not support color xterms, so
      there were no color xterm terminfo entries. I installed xterm's
      terminfo entries under TERMINFO=$HOME/terminfo. An easier solution
      may be to put the proper terminfo/termcap definitions in your
      ~/.vimrc.

      Regards,
      Gary

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Chris Lott
      ... Because unless I am pasting some kind of computer generated jibberish rather than text made of words (language), the sequence jj doesn t appear-- in
      Message 2 of 19 , Jan 30, 2012
      • 0 Attachment
        >> it's become a habit for me to do :set paste before
        >> dumping in really odd pieces of non-language text just in case.
        >
        > Why only non-language text--and what do you mean by "non-language"?
        >

        Because unless I am pasting some kind of computer generated jibberish
        rather than text made of words (language), the sequence 'jj' doesn't
        appear-- in English it exists in only one word (and a couple of its
        variations), and those are actually, in my experience, usually
        misspelled so as not to contain the 'jj' sequence anyway.

        So if, for some reason, I'm copying non-language text, I just
        automatically paste/nopaste. But it's so rare that it's hardly a
        burden.

        c
        --
        Chris Lott <chris@...>

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Eric Weir
        ... Thanks, Chris. Seems to be as I guess it might. ... Eric Weir Decatur, GA USA eeweir@bellsouth.net -- You received this message from the vim_use
        Message 3 of 19 , Jan 30, 2012
        • 0 Attachment
          On Jan 30, 2012, at 12:10 PM, Chris Lott wrote:

          >>> it's become a habit for me to do :set paste before
          >>> dumping in really odd pieces of non-language text just in case.
          >>
          >> Why only non-language text--and what do you mean by "non-language"?
          >
          > Because unless I am pasting some kind of computer generated jibberish
          > rather than text made of words (language), the sequence 'jj' doesn't
          > appear-- in English it exists in only one word (and a couple of its
          > variations), and those are actually, in my experience, usually
          > misspelled so as not to contain the 'jj' sequence anyway.

          Thanks, Chris. Seems to be as I guess it might.

          ------------------------------------------------------------------------------------------
          Eric Weir
          Decatur, GA USA
          eeweir@...




          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        Your message has been successfully submitted and would be delivered to recipients shortly.