Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › Issue with vim.tiny in ROXTerm
- This topic has 12 replies, 5 voices, and was last updated Apr 26-7:27 am by sybok.
-
AuthorPosts
-
November 5, 2021 at 10:42 am #70288Member
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!
November 6, 2021 at 12:06 pm #70395Member
Xecure
::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.November 6, 2021 at 1:59 pm #70407Member
sybok
::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-8November 6, 2021 at 6:55 pm #70437Membermcpderez
::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?
November 6, 2021 at 9:54 pm #70444Member
seriousness
::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?
November 7, 2021 at 1:43 am #70453Membermcpderez
::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.
November 7, 2021 at 8:34 am #70463Member
sybok
::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.November 9, 2021 at 11:35 am #70600Member
seriousness
::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.
November 12, 2021 at 11:54 pm #70833Membermcpderez
::Confirmed this workaround worked for me. Thanks @seriousness. This raises the question if the default TERM setting should be gnome-256color instead of xterm.
November 15, 2021 at 8:12 am #70976Member
seriousness
::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.November 15, 2021 at 8:16 am #70977Membermcpderez
::Even better! It seems like it would be a good idea for antiX to come with this setting.
November 27, 2021 at 6:31 am #71789Anonymous
::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.
April 26, 2023 at 7:27 am #105432Member
sybok
::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.
-
AuthorPosts
- You must be logged in to reply to this topic.