VIM v19-02-09steemCreated with Sketch.

in #linux7 years ago

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


VIM
homepage documentation manual reference faq wiki

Ben McCormick - Learning Vim
Bram Moolenaar - Seven habits of effective text editing
Ben McCormick - Vim as Language

lfdtopiccommands
01tutorial$ firefox vim-adventures.com &
$ vimtutor
02documentation$ man vim
$ firefox file:///usr/share/doc/vim-doc/html/index.html &
:help user-manual • ^] ^o
:help edit ^d
03buffer$ ^xe
$ vim -O ~/.vimrc ~/.bashrc ^ww ^wr ^wc ^wq
$ vim ~/.bashrc ~/.bashrc :args :ls :next :previous :n :N
:buffers :badd :b1 :b2 :bn :bp :bf :bl
04cursorH M L
zt zz zb z<enter> z-
l h j k
05window:set nu nonu
:set relativenumber norelativenumber
:set hls nohls *
:set ruler noruler
:set linebreak nolinebreak
^ws ^wv ^wr ^wc ^wq
gg G ^g 50% ^e ^y ^n ^u ^d ^f ^b
06repeat.
07search/ f * #
:set incsearch :nhls
08change~
:%s/one/two/g
:set hls <enter> * cw n :set nohls <enter>
09deletex d$ diw dit di" dip das
10match[InsertMode] ^n
11abbreviate:ab :abc :unab
12markm1 '1 `1
13foldzf5j zo zc zd
14undo redou U ^r
15visualv ^v
16text objectsiw it i" ip as f F t T /
99buffer:wq :q!

TEXT OBJECTS

iw      : inner word
it      : inner tag
i"      : inner quotes
ip      : inner paragraph
i{      : inner brackets
as      : a sentence
f,F
t,T
/

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

syntax on           syntax off
set incsearch       noincsearch
set nu              nonu
set showmode        noshowmode
set showcmd         noshowcmd
set relativenumber  norelativenumber
set ruler           noruler
set hls             nohls
set background=dark
set encoding=utf8
set mouse=a

set autoindent

set tabstop=3
set softtabstop=3
set shiftwidth=3
set expandtab

nmap <leader>w :w!<cr>
map <F2> :echo 'Current time is ' . strftime('%c')<CR>

: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.10
TRX 0.31
JST 0.032
BTC 111061.89
ETH 3959.23
USDT 1.00
SBD 0.66