Wikia

Vim Tips Wiki

Changes: Listing buffers

Edit

Back to page

(Remove html character entities)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 4: Line 4:
 
|previous=1111
 
|previous=1111
 
|next=1114
 
|next=1114
|created=January 18, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=Matt Zyzik
 
|author=Matt Zyzik
Line 17: Line 17:
 
</pre>
 
</pre>
   
Press Alt-: to show the results of <tt>:ls</tt> for one second. Pressing Alt-: 3 times will show the <tt>:ls</tt> listing for 3 seconds.
+
Press Alt-: to show the results of <code>:ls</code> for one second. Pressing Alt-: 3 times will show the <code>:ls</code> listing for 3 seconds.
   
 
You can also hold down Alt-: to show the file list continuously, then press Ctrl-c when you're done. This can be very useful when working with many files.
 
You can also hold down Alt-: to show the file list continuously, then press Ctrl-c when you're done. This can be very useful when working with many files.

Latest revision as of 06:08, July 13, 2012

Tip 1112 Printable Monobook Previous Next

created 2006 · complexity basic · author Matt Zyzik · version 5.7


Use the following to list your buffers.

nnoremap <m-:> :ls\|sleep<CR><CR>

Press Alt-: to show the results of :ls for one second. Pressing Alt-: 3 times will show the :ls listing for 3 seconds.

You can also hold down Alt-: to show the file list continuously, then press Ctrl-c when you're done. This can be very useful when working with many files.

CommentsEdit

I'll try this for some days:

map <M-:> :<c-u>ls!<Bar>sleep <c-r>=v:count1<CR><CR><CR>

" alt-; display buffer list for 3 seconds
nnoremap <m-;> :ls<Bar>3sleep<CR><CR>

It should be noted that if 'lazyredraw' isn't set, the original mapping will cause the entire display to be refreshed for each <m-:> combination.


Around Wikia's network

Random Wiki