On Sun, 29 Apr 2007, Chris Rawnsley wrote:
On 29/04/07, Aditya Mahajan
wrote: Now after loading vim, add \definevimtyping [typePHP] [syntax=php, before={\bgroup \let\runvimsyntax\gobbleoneargument}, after={\egroup}]
and then use
\typePHP{copy.php}
I can't get it to work. Firstly, when I use \definevimtyping and then \typePHP the system cannot find the definition for \typePHP. If I use \definetypevimfile instead of \definevimtyping it works. Unfortuantely this doesn't actually save time as it loads ViM for whatever is required.
Well, then I need to make some more changes in the module. Since, you are up against a deadline right now, and are willing to suffer the delay caused by this module, I will trying hacks to make this work. Hopefully, the next release of vim module will have a robust solution.
Now for some general feedback.
At the moment, if a line wraps, the line number doesn't feature in the margin. I think the placement should be different, however. It currently looks something like:
11 require_once(BASE_DIR.'inc/html.php'); // HTML output 12 require_once(BASE_DIR.'inc/auth.php'); // Authorise user require_once(BASE_DIR.'inc/action.php'); // List of possi- 13 ble actions 14 require_once(BASE_DIR.'inc/calendar.php');
As you can see line 13 has wrapped but I would prefer it if the line number was on the line above. So like this:
11 require_once(BASE_DIR.'inc/html.php'); // HTML output 12 require_once(BASE_DIR.'inc/auth.php'); // Authorise user 13 require_once(BASE_DIR.'inc/action.php'); // List of possi- ble actions 14 require_once(BASE_DIR.'inc/calendar.php');
I know this, but I do not know how to correct it. For my input, I just indented the source file so that every line was 75 characters long. It is easier to do that on the source file, then to write code in TeX to to do that sensibly.
Also not all my lines are wrapping properly. For instance, a line like:
if(!defined('BASE_DIR')) define('BASE_DIR',realpath(dirname(__FILE__).'/../').'/');
Basically, TeX does not know where to break the line. As I said above, the easier way is to do the line breaking in your source by hand.
Other than that, I'm loving the output.
Great! Aditya