Vim Tips Wiki
(Move categories to tip template)
(Remove html character entities)
 
Line 16: Line 16:
 
" Edit the -e "script" before pressing return to filter thru Perl.
 
" Edit the -e "script" before pressing return to filter thru Perl.
 
" Script below works shell=sh, and add line numbers to the file.
 
" Script below works shell=sh, and add line numbers to the file.
:amenu Mo1.Format.NumberLines<TAB>:!perl :1,$!perl -ne \"printf(\\"\%3d:\%s\\",\$.,\$_);\"
+
:amenu Mo1.Format.NumberLines<Tab>:!perl :1,$!perl -ne \"printf(\\"\%3d:\%s\\",\$.,\$_);\"
 
</pre>
 
</pre>
   
Line 22: Line 22:
   
 
==Comments==
 
==Comments==
 
----
 

Latest revision as of 08:57, 29 September 2008

Tip 569 Printable Monobook Previous Next

created September 30, 2003 · complexity basic · author mosh · version 6.0


" Create a menu item to call Perl on the file.
" Edit the -e "script" before pressing return to filter thru Perl.
" Script below works shell=sh, and add line numbers to the file.
:amenu Mo1.Format.NumberLines<Tab>:!perl :1,$!perl -ne \"printf(\\"\%3d:\%s\\",\$.,\$_);\"

See Insert line numbers for other methods.

Comments[]