Tag Archives: vim

Vim and Jailkit

Recently I installed Jailkit on Ubuntu 12.04 and then tried to use the vim editor to edit files as the jailed user (specifically a user jailed with the bash shell) and vim was behaving oddly. The colors on the terminal were just a gray (default color) and a bold white. After a little digging I found out this is how vim does syntax highlighting when it thinks that only two colors are available. Also, I was having trouble with the arrow keys not working – I could move around with HJKL but there also seemed to be lag and vim was hanging or would hang sometimes and was not responsive. I typed in set terminal and it told me ansi which is the default, “dumb” terminal. You can change vim to another terminal type, like xterm a few ways. Inside vim type :set term=xterm and that should do it Edit your .vimrc file (in your home directory) and add set term=xterm Before launching vim type export TERM=xterm to set an environmental variable Add that last command (export TERM=xterm) into one of your startup files like ‘~/.profileor ‘~/.bashrc This fixed the issue with the arrow keys, the lag and hanging, but I still only had two colors. After many hours of digging I realized that with Jailkit on Ubuntu even if you do jk_init -v /home/jail editors to install joe and vim and emacs you still get this problem. I did a stack trace on vim and even turned on debugging … Continue reading

Posted in Server Admin | Tagged , , | Leave a comment

Vim Keyboard Messed Up

Is your Keyboard Messed Up when using Vim? Do the arrow keys do funky things? Do you get strange characters on your screen? If so, to fix this you need to set VIM into nocompatible mode. To do this, when using vim, type the colin key to get the menu at the bottom, and then type set nocompatible This should fix it! :) :set nocompatible

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment