sponsor Vim development Vim logo Vim Book Ad

AnyPrinter : Lets you insert a print statement quickly in any language

 script karma  Rating 5/4, Downloaded by 501  Comments, bugs, improvements  Vim wiki

created by
Adrien (Axioplase::Pied)
 
script type
utility
 
description
" This is a  simple script to quicky insert a print statement in your code.
" Currently supported languages are :
"       C
"       Scheme, Lisp , OCaml/Omlet, Haskell
"       Java
" It also indents current line and puts the cursor where you expect it to be, in
" insert mode of course !

For example, in C, it would insert a printf("X"); while in Scheme, you'd have a (display X), where X is the cursor position.

Mapped to <Leader>P in normal mode
abbreviated to pap in insert mode (as in "PrintAPrint")

TODO :
More languages to be added as I'm requested.
Some more idiomatic statements may replace those I chose, and the possibility to choose between several printers ? (print, display, pretty-print, show....)
 
install details
Simply drop in your plugin directory !
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
AnyPrinter.vim 0.1 2007-05-05 7.0 Adrien (Axioplase::Pied) Initial upload
ip used for rating: 18.190.217.134

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github