Difference between revisions of "Vi editor"
From Teknologisk videncenter
m |
m (→FAQ) |
||
| Line 1: | Line 1: | ||
= FAQ = | = FAQ = | ||
| + | |||
| + | == How can I see which mode I'm in == | ||
| + | Use ''showmode'' option. Shown below | ||
| + | <source lang="cli"> | ||
| + | [root@mars ~]# <input>echo "set showmode" >> $HOME/.vimrc</input> | ||
| + | </source> | ||
| + | Now you can see which mode you are in by looking at the bottom line | ||
| + | #In insert mode it will write '''-- INSERT --''' | ||
| + | #In replace mode it will write '''-- REPLACE --''' | ||
| + | #In line command mode it will write ''':''' | ||
| + | #In command mode - empty or everything else | ||
| + | |||
== VIM and FreeBSD malfunctioning arrow keys in insert mode == | == VIM and FreeBSD malfunctioning arrow keys in insert mode == | ||
Set ''vim'' to work in ''nocompatible'' mode. Not as old ''vi''. | Set ''vim'' to work in ''nocompatible'' mode. Not as old ''vi''. | ||
Revision as of 14:45, 25 May 2009
FAQ
How can I see which mode I'm in
Use showmode option. Shown below
[root@mars ~]# <input>echo "set showmode" >> $HOME/.vimrc</input>Now you can see which mode you are in by looking at the bottom line
- In insert mode it will write -- INSERT --
- In replace mode it will write -- REPLACE --
- In line command mode it will write :
- In command mode - empty or everything else
VIM and FreeBSD malfunctioning arrow keys in insert mode
Set vim to work in nocompatible mode. Not as old vi.
[root@mars ~]# <input>echo "set nocompatible" >> $HOME/.vimrc</input>