Presentation is loading. Please wait.

Presentation is loading. Please wait.

VIM Advanced 2001. 5. 7.. Why VIM? Easy to study Much easy to use Very easy to find from host You can defined it for yourself You can save.

Similar presentations


Presentation on theme: "VIM Advanced 2001. 5. 7.. Why VIM? Easy to study Much easy to use Very easy to find from host You can defined it for yourself You can save."— Presentation transcript:

1 VIM Advanced eungkyu@sparcs 2001. 5. 7.

2 Why VIM? Easy to study Much easy to use Very easy to find from host You can defined it for yourself You can save time Your hand will not be tired for long typing

3 Three Modes Input mode Command mode ex mode

4 Basic Motion –h, j, k, l, ^, $ –w, W, b, B –-, +, G, gg, % Delete - x, X, d, dd, D, J Insert - a, A, i, I, o, O, :r Undo and Redo - u, o

5 Chage Delete and Insert –r, R, c, cc, C, s, S, ~ Shift –, >> (shiftwidth) Filter –!, !!, =, == (equalprg) Regular Expressiong –:s/pattern/string/modifier

6 Yank and Paste Register, [ “ x] :reg, y, yy, Y, p, P Predefined registers –“. - last inserted text –“ % - current filename –“ : - recent excuted command-line

7 Repeat simple repeat -. complex repeat –q[0-9a-zA-Z] –q –@[0-9a-zA-Z] –@@

8 Remain Visual – v, V, ctrl-v :nu, :sh, :!{cmd}, :!!, :h

9 Compile and Error check :mak[e] – execute `makeprg ’ :gr[ep] – execute `grepprg ’ Display error –:cc [nr] – [nr] or current error –:cn – next error –:cp, :cN – previous error –:cnf – first error –:cf [nr] – [nr] or first error –:cla [nr] – [nr] or last error –:cl – list all error

10 Windows :sp, :new, :clo, :on ctrl w + –j, k, t, b – move to other window –r, R – rotation –x – exchange –-, =, + (:res [-+]N) – resize :qa, :wa

11 Indenting and Syntax highlighting :set autoindent :set smartindent :set cindent :syntax on :set syntax=perl :set background=[dark|light]

12 Various option autowrite – automatically write fileencoding – korea fileformat – dos, unix, mac textwidth – for writing mail –:set tw=78 autocmd – see the example :help gzip-example

13 Tab size issue First –:set tabstop=4 Second –:set tabstop=8 –:set softtabstop=4 –:set shiftwidth=4

14 Links http://www.vim.org/

15 References :help


Download ppt "VIM Advanced 2001. 5. 7.. Why VIM? Easy to study Much easy to use Very easy to find from host You can defined it for yourself You can save."

Similar presentations


Ads by Google