2012/07/06

Recent entries from same category

  1. VimConf 2023 Tiny に参加しました
  2. Vim で Go 言語を書くために行った引越し作業 2020年度版
  3. Vim をモダンな IDE に変える LSP の設定
  4. ぼくがかんがえたさいきょうの Vim のこうせい 2019年 年末版
  5. VimConf 2019 を終えて


http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/Learn Vim Progressively



Uber leet use vim!

tl;dr: vim()

Vim60





vim使

4:


(一)

(二)

(三)

(四)vim使


vim

vim3vim使 32

1  



(一)vim

(二)vim

(三)


VimNormal Insert i

NormalESC

InsertNormal Normal:



i InsertESCNormal

x 

:wq  (:w, :q)

dd ()

p 
 

:


hjkl ()   (). : j

:help <>  <>:help使
 


5 使()2

Normal Ctrl使(Ctrl-c) Ctrl vimNormal modeCtrl

: 


Ctrl-λ<C-λ>

:<enter>:q:q<enter>

2  


:



Insert:



a 

o 

O 

cw 
 








0  

^  

$  

g_  

/pattern  pattern
 




/



P p

yy ddP
 




/



u 

<C-r>  
 




///()



:e <path/to/file>  

:w  

:saveas <path/to/file>  <path/to/file>

ZZor:wq  

:q!  :qa!

:bn (: :bp)  (: )()
 




   

3  


! 3vi


Vim:


(一).  () 

(二)N<>  N


:



2dd  2

3p  3

100i [ESC]                                                                                                      

.   100

3.  3 (300)
 


vim使


(一)NG N

(二)gg 1G

(三)G 


:



(一)w 

(二)e 
 

WORD WORD使


(一)W WORD

(二)E WORD
 

Word moves example



:



% : ({[

* (: #) : (: )
 


3


vi 使

<><><>

 : 0y$ 


0  

y 

$  


ye y2/foo2foo

y ()d ()v ()gU ()gu ()... 

4  Vim


使vim使 vim使

: 0 ^ $ fFtT, ;




0  

^  

$  

fa a, (: ;)(: )

t,  ,

3fa  3a

F T f t Line moves  


便tip: dt"  "

 <>a<>  <>i<>


使

<>a<> and <>i<>

d (), y(), v() : wwordW WORD (word)s , p"')}]

(map (+) ("foo"))o



vi"  foo

va"  "foo"

vi)  "foo"

va)  ("foo")

v2i)  map (+) ("foo")

v2a)  (map (+) ("foo"))
 


Text objects selection

: <C-v>


便 : 0<C-v><C-d>I-- [ESC]


^  

<C-v>  

<C-d>  (jjj  % )

I-- [ESC]  -- 


Rectangular blocks
Windows<C-v><C-q>使

: <C-n>  <C-p>


Insert<C-p>... Completion 

 : qa q@a@@


qaaregister @aa @@




11:



qaYp<C-a>q  


qa

Yp

<C-a> 

q
 


@a  12

@@  23

100@@103
 


Macros

: v,V,<C-v>

<C-v>使v  V :


J 

< (: >)  (: )

=  


Autoindent
:


<C-v> 

(jjj  <C-d>  /pattern  % )

$ 

AESC


Append to many lines

: :split  vsplit


:help split調



:split  (:vsplit )

<C-w><dir> : hjkl

<C-w>_ (: <C-w>|) : (: vertical split)

<C-w>+ (: <C-w>-) : (: shrink)
 


Split


使90 1223vim

Vim vim vimtutor : :help usr_02.txt

! vim
Posted at by | Edit