You are not logged in.
Hi, I am having a problem with my vim. When I switch to insert mode and use my arrow keys, vim will just insert A, B, C, or D and a newline. This has nothing to do with my config, as I already tried running a freshly installed vim without a .vimrc-file and ran into the same problem. Strangely, everything works just fine when I run vim with root privileges. Also, vim only behaves like this if its executed in urxvt. When i run vim using the gnome-terminal for instance, it works fine, regardless of the user privileges.
Last edited by obi (2016-03-09 19:54:17)
Offline
That's normal behaviour for legacy vi on Unix systems. I don't know if I've ever seen it in vi on Arch, but I'm sure I've never seen it in vim. So for starters, are you sure you're running vim and not vi?
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Yes, I am 100% sure, because vi is not even installed on my system. I'm also using the newest version of vim.
Offline
Please paste your .vimrc
Offline
Yeah, I didn't see your edit before posting; that pretty much ruled out my suspicion.
Is there anything in the environment related to terminal that changes when sudo is used: 'env' vs 'sudo env' ?
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Here's my .vimrc:
set nocompatible
"---Visuals---
syntax enable
set background=dark
colorscheme default
set encoding=utf8
set t_Co=256
set showmatch
set mat=2
set number
"---Text & Indents---
set expandtab
set smarttab
set ai
set si
set shiftwidth=4
set tabstop=4
"---Filetypes---
filetype on
au BufNewFile,BufRead *.rs set filetype=rustOffline
Offline
Is there anything in the environment related to terminal that changes when sudo is used: 'env' vs 'sudo env' ?
No, I don't think so.
Offline
This sounds to me like you've set compat in your .vimrc.
This was my thought (and what it defaults to without a config); but OP has edited their first post to say it works fine in other terminals, just not in Urxvt.
What is the value of $TERM in urxvt?
Offline
Also, OP originally said he tried without .vimrc...
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Hah, that solved my problem, ty guys.
I have just set TERM to 'xterm-256color', and works.
Offline
Don't set your TERM: it will just break more things... Your terminal should be able to pick up the appropriate terminfo, unless you have forced it somwehere in your shell initialisation files.
Offline