VIM v19-02-02steemCreated with Sketch.

in #linux7 years ago

VIM
homepage documentation manual reference faq wiki

Screenshot from 2019-01-30 12-40-47.png
Image source: Willi Glenz - Screenshot vim

VIM-SESSION

lfdactivitycommands
01learning vim$ firefox vim-adventures.com &
02learning vim$ vimtutor
03documentation$ firefox file:///usr/share/doc/vim-doc/html/index.html &
04documentation$ man vim
05documentation:help user-manual
06files$ vim -O ~/.vimrc ~/.bashrc ^ww ^wr ^wc ^wq
07files$ vim ~/.bashrc ~/.bashrc :args :ls :next :previous :n :N :bn :bp
08cursorj ^n • k h l
09cursorzz z<enter> z-
10window:set nu nonu • relativenumber norelativenumber • hls nohls * • ruler noruler • linebreak nolinebreak
11window^ws ^wv ^wr ^wc ^wq
12windowgg G • ^g 50% • ^e ^y ^n • ^u ^d ^f ^b
13editing[InsertMode] ^n
14abbreviate:ab :abc :unab
15foldingzf5j zo zc zd
16undeleteu U ^r
17visual^v
99file:wq

ABBREVIATIONS

:ab psvm public static void main(String[] args) {<CR>}<Esc>ko
:ab sysout System.out.println("");<Esc>2hi



~/.bashrc

EDITOR=/usr/bin/vim
VISUAL=$EDITOR
export EDITOR VISUAL



~/.vimrc

" GENERAL
syntax on
set number
set relativenumber
set ruler
set mouse=a
set hls
set background=dark
set encoding=utf8
" INDENT
set autoindent
" TABs
set tabstop=3
set softtabstop=3
set shiftwidth=3
set expandtab
" MAPs
nmap <leader>w :w!<cr>
map <F2> :echo 'Current time is ' . strftime('%c')<CR>
" ABBREVIATIONS
:ab psvm public static void main(String[] args) {<CR>}<Esc>ko
:ab sysout System.out.println("");<Esc>2hi



INSTALLATION

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

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.091
BTC 62729.55
ETH 1760.53
USDT 1.00
SBD 0.39