VIM v19-02-26 UpdatesteemCreated with Sketch.

in #linux5 years ago

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



VIM
A short summary of my daily used VIM commands.
homepage documentation manual reference faq wiki



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



SESSION

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 :helpgrep
03buffer$ ^xe :edit
$ 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.
07macroqa :reg a @a
08search/ f * #
:set incsearch :nhls
09change~
:%s/one/two/g
:set hls <enter> * cw n :set nohls <enter>
ci( ci{ ci<
10deletex d$ diw dit di" dip das
11undo redou U ^r
12match[InsertMode] ^n
13abbreviate:ab :abc :unab ^v
14markm1 '1 `1 marks
15foldzf5j zo zc zd
16visualv ^v
17text 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
^v      : deaktivate ab

~/.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>
map <F6> :setlocal spell! spelllang=en_us<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


Sort:  

Congratulations @wglenz! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published a post every day of the week

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

You can upvote this notification to help all Steemit users. Learn why here!

Hello @wglenz! This is a friendly reminder that you have 3000 Partiko Points unclaimed in your Partiko account!

Partiko is a fast and beautiful mobile app for Steem, and it’s the most popular Steem mobile app out there! Download Partiko using the link below and login using SteemConnect to claim your 3000 Partiko points! You can easily convert them into Steem token!

https://partiko.app/referral/partiko

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 62831.42
ETH 3123.16
USDT 1.00
SBD 3.85