Vi in unbuntu

From 307 Lab Note
Jump to navigation Jump to search

Fixing hitting arrow keys adds characters in vi editor issue

Simpliest method

1. sudo apt-get install vim

2. Use vim instead of vi

Alternative method

1.E dit a file called vim.rc in your root folder. If it's not present create one.

vi ~/.vimrc

2. Add the following content to vim.rc. To start editing the file press i in the location where you want to start edit

set nocompatible
set backspace=2

3. Save the file via esc, then :qc.