Skip to the content.

Vim Editor

vi or vim is an editor which uses cli interface for editing files interactively.

Vim Configuration (~/.vimrc)

vi ~/.vimrc
" Basic settings
set number            " Show line numbers
set ruler             " Show line/column
set showcmd           " Show (partial) command in status line
set incsearch         " Incremental search
set hlsearch          " Highlight search matches
syntax on

" Colors and appearance
set t_Co=256          " 256-color support
set termguicolors     " True color support (for modern terminals)

On Terminal Connection Freeze

Example: Add Domain To Apache Config File

ssh root@IPADDRESS
ssh root@domain.name
ssh [user]@[server]
ls /etc/apache2/
ll /etc/apache2/.tr
ll /etc/apache2/sites-available/
cd /etc/apache2/sites-available/
sudo cp 000-default.conf mysite.com.conf
sudo vim mysite.com.conf
sudo a2ensite mysite.com.conf
sudo service apache2 restart
ping mysite.com
sudo vim /etc/hosts
ping mysite.com
sudo a2dissite mysite.com.conf
sudo service apache2 restart