Issue with vim.tiny in ROXTerm

Forum Forums Official Releases antiX-21/22 “Grup Yorum” Issue with vim.tiny in ROXTerm

Tagged: , ,

  • This topic has 12 replies, 5 voices, and was last updated Apr 26-7:27 am by sybok.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #70288
    Member
    seriousness

      Hello,

      when I invoke vim.tiny as vi and press a key in command mode, characters like [>4;m appear. This does not happen when invoked with vim.tiny.
      In urxvt it works fine.

      This is my first antiX installation with runit and it boots fast as lightning! Thanks for this OS, that makes my 16 years old Medion PC run like a young one!

      #70395
      Member
      Xecure
        Helpful
        Up
        0
        ::

        I have zero experience with vi/vim, etc. If you get to discover anything related to roxterm configuration missing, please update the post.

        Worst case scenario is using a different terminal. Does anyone else experience this or know a workaround?

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #70407
        Member
        sybok
          Helpful
          Up
          1
          ::

          I did simply search the internet ‘vim “[>4;m”‘ and the 1st link may actually explain it:
          https://vi.stackexchange.com/questions/27399/whats-t-te-and-t-ti-added-by-vim-8

          #70437
          Member
          mcpderez
            Helpful
            Up
            0
            ::

            Does anyone else experience this or know a workaround?

            I experience this as well and had gotten to the same place as seriousness in troubleshooting —- that it seems to matter how vim.tiny is invoked and didn’t happen in urxvt. I’m not sure if it is a bug in vim.tiny or ROXterm. Since I cut my teeth on SCO Xenix, it’s hard to undo the muscle memory and replace vi with vim. (I suppose this might be a sign I should learn emacs.)

            I have not yet tried a shell alias instead of a link. Is there any other AntiX-specific customization that is mapping the vi command to vim.tiny apart from that link?

            #70444
            Member
            seriousness
              Helpful
              Up
              0
              ::

              I tried vi on tty and it works as usual.

              vi is a link to /etc/alternatives/vi which is a link to /usr/bin/vim.tiny – why does it make a difference which one I use in ROXTerm?

              #70453
              Member
              mcpderez
                Helpful
                Up
                0
                ::

                why does it make a difference which one I use in ROXTerm?

                I had the same question and it makes me think that vim.tiny itself is checking to see how it was invoked and when invoked with vi has different behavior related to what codes it sends to the terminal, perhaps running in the raw mode the stackexchange discussion linked above refers to. I haven’t had a chance to digest it and dig further.

                #70463
                Member
                sybok
                  Helpful
                  Up
                  0
                  ::

                  Hi, I use ‘vim’ in ROXTerm and I did not experience the issue.
                  Did not fully digest the link I have mentioned in my earlier post.
                  Nevertheless, the accepted answer provides 2 workarounds to handle it.

                  #70600
                  Member
                  seriousness
                    Helpful
                    Up
                    1
                    ::

                    The difference is, that ‘vi’ invokes vim.tiny in vi compatible mode.

                    Setting the Custom command
                    /usr/bin/env TERM=gnome-256color /bin/bash
                    in ROXTerm preferences (workaround 2.) did it.
                    Now it behaves like urxvt, which sets $TERM to rxvt-unicode-256color.

                    • This reply was modified 1 year, 5 months ago by seriousness.
                    • This reply was modified 1 year, 5 months ago by seriousness.
                    #70833
                    Member
                    mcpderez
                      Helpful
                      Up
                      0
                      ::

                      Confirmed this workaround worked for me. Thanks @seriousness. This raises the question if the default TERM setting should be gnome-256color instead of xterm.

                      #70976
                      Member
                      seriousness
                        Helpful
                        Up
                        2
                        ::

                        Forget what I wrote in Post #70600 and leave Command as it is set.

                        The TERM variable in ROXTerm can be set in Preferences –> edit Current Profile –> General .
                        In “TERM environment variable:” enter
                        gnome-256color
                        then Close and restart Terminal.

                        #70977
                        Member
                        mcpderez
                          Helpful
                          Up
                          0
                          ::

                          Even better! It seems like it would be a good idea for antiX to come with this setting.

                          #71789
                          Anonymous
                            Helpful
                            Up
                            0
                            ::

                            Just my grain of sand here.

                            I noticed the same things as well.
                            When invoked with “vi”, vim.tiny runs in compatibility mode; which doesn’t happen when invoked with “vim” or “vim.tiny”.
                            I’m still a bit surprised by it… Even with @seriousness ‘s explanation, I still find a bit weird that vim.tiny actually evaluates what exact name it was invoked with; after all, both “vi” and “vim” commands are just symlinks to the same “vim.tiny”, no?

                            Regarding possible workarounds, I made some tests.
                            First, workaround #1 in @sybok ‘s link works, with or without the empty double quotes. When invoked with “vi”, vim.tiny works, at least, like the “original modified” vim.tiny, which is still different from regular non-tiny vim.

                            By not modifying /etc/vim/vimrc.tiny at all, and instead just using xterm terminal, the same result is achieved. Just for note, the default set variable, at least for me, is TERM=xterm.

                            Also tried “unset TERM” command to temporarily clear the variable. Resulted in “vi” doing weird things, and not clearing terminal screen after exiting for all 3 cases “vi”, “vim”, “vim.tiny”.

                            For the note, in *all* cases -including by default- both “vim” and “vim.tiny” seem to behave like, or similar to regular non-tiny vim.

                            Finally, and being this a workaround I found a while ago, adding the lines “set nocp” and “set bs=2” to /etc/vim/vimrc.tiny makes “vi” behave like regular non-tiny vim, seemingly just like the other 2 cases.

                            Now I’d have a little doubt.
                            It seems regular vim has 2 configuration files: one system wide and the other user specific. First one seems to be /etc/vim/vimrc, and second one $HOME/.vimrc (or perhaps another additional one according to “vi –version” command).
                            Doesn’t vim.tiny have one for user specific? Tried $HOME/.vimrc.tiny, but didn’t work at all…

                            Thanks.

                            #105432
                            Member
                            sybok
                              Helpful
                              Up
                              0
                              ::

                              Hi, recently, I started to see ‘ESC[?4m’ in my ‘vim’ in ‘roxterm’ (‘lxterminal’ was not affected) in testing based on antiX-21_x64-full.
                              The same solution as mentioned by @seriousness solved it.
                              I simply filled the empty TERM value with ‘gnome-256color’, close the terminal and open a new one (to apply the refreshed preferences).

                              PS: This is a necro post but I can live with it since it is related.

                              EDIT: Damn, I just found out that it messes up using Midnight Commander – the sort by Name, Size or Modify time cannot be clicked upon to re-sort. 🙁

                              • This reply was modified 1 week ago by sybok.
                            Viewing 13 posts - 1 through 13 (of 13 total)
                            • You must be logged in to reply to this topic.