LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   VIM Setup- No 'insert' mode (https://www.linuxquestions.org/questions/linux-software-2/vim-setup-no-insert-mode-183739/)

uveraser 05-20-2004 10:36 AM

VIM Setup- No 'insert' mode
 
My text editor of choice is VIM. In Mandrake it worked fine out of the box, but I have just installed Slackware and there is one major problem: I cannot properly edit text. Considering you can't really edit any config files without one, a working text editor could be quite useful (I would have thought that both the developers of slackware and vim would have made sure it worked properly on install). I have read the first few lines of the 'getting started' section of the vim manual and failed on the first hurdle. It says press 'i' to switch from normal mode to insert mode. Pressing 'i' does nothing. In mandrake the insert key worked as well and '--INSERT--' or '--REPLACE--' would appear in white in the lower left of the screen. The insert key also does nothing- in fact, I have pressed every key on the keyboard and cannot enter insert mode.

Please help- I cannot really setup anything else until this is fixed.
Simon

uveraser 05-25-2004 10:44 AM

OK, in case anybody else has the same problem here is the solution I found:
Since version 5.0, VIM runs in Vi compatible mode by default, unless you have a '.vimrc' file in your home directory. There are other exceptions (see the VIM readme), so for simplicity, create a '.vimrc' file in your home directory and add the following line:
set nocompatible
(to temporarily change the setting whilst VIM is running type ":set nocompatible" <enter>)

You will probably notice that even in nocompatible mode, backspace does not function as you would expect it to. To fix this, add the following line into your .vimrc file:
set backspace=2
(this is a short version of "set backspace=indent,eol,start")


All times are GMT -5. The time now is 01:09 PM.