VIM v19-01-18steemCreated with Sketch.

in #linux5 years ago
VIM v19-01-18
ctrl:a...z
• ctrl g
• ctrl e
• ctrl [u][d]
• ctrl n
nu nonu
relativenumber
hls nohls
• z
• zz
• z -


BASICS
• <esc> j k h l


SCREENS
$ vim -o dummy1.txt dummy2.txt
$ vim -O dummy1.txt dummy2.txt
• ctrl-ws ctrl-wv ctrl-wr ctrl-wc ctrl-wq


CONFIGURATION
:find .bashrc
$ vim ~/.bashrc
01  EDITOR=/usr/bin/vim
02  VISUAL=$EDITOR
03  export EDITOR VISUAL

$ vim ~/.vimrc
01  " GENERAL
02  syntax on
03  set number
04  set relativenumber
05  set ruler
06  set mouse=a
07  set hls
08  set background=dark
09  set encoding=utf8
10  " INDENT
11  set autoindent
12  " TABs
13  set tabstop=3
14  set softtabstop=3
15  set shiftwidth=3
16  set expandtab
17  " MAPs
18  nmap <leader>w :w!<cr>
19  map <F2> :echo 'Current time is ' . strftime('%c')<CR>


DOCUMENTATION & TUTORIAL
:help user-manual
$ man vim
$ vimtutor
• file:///usr/share/doc/vim-doc/html/index.html
• vim.org/docs.php
• vim-adventures.com
• vim.org


INSTALLATION
# apt-get install vim vim-doc vim-scripts 
$ dpkg -L vim-doc
# update-alternatives --config editor
$ vim --version | less

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64266.94
ETH 3077.24
USDT 1.00
SBD 3.87