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 636  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: 216.73.216.168

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github