Error editing VIM plugin description

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error editing VIM plugin description

Chamindra de Silva

I was trying to edit the description of my macro repository script
( http://www.vim.org/scripts/script.php?script_id=2154 ) after
uploading a new version just now and the site gives me the following
error description:

-----------------------
Vim Online Error

script: I couldn't find the script you requested (script_id=), are you
sure it exists?
-----------------------

Unfortunately the description is now out of sync with the new version
upload. Let me know if there is anything I might have done wrong and
if there is anything I can do to help..

thanks,

Chamindra de Silva

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Error editing VIM plugin description

Bram Moolenaar


Chamindra de Silva wrote:

> I was trying to edit the description of my macro repository script
> ( http://www.vim.org/scripts/script.php?script_id=2154 ) after
> uploading a new version just now and the site gives me the following
> error description:
>
> -----------------------
> Vim Online Error
>
> script: I couldn't find the script you requested (script_id=), are you
> sure it exists?
> -----------------------
>
> Unfortunately the description is now out of sync with the new version
> upload. Let me know if there is anything I might have done wrong and
> if there is anything I can do to help..

Strange, it looks like code that never actually worked.  I think I have
fixed it, try again.

--
From "know your smileys":
 ...---...   SOS

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Error editing VIM plugin description

Chamindra de Silva
Thanks for the quick response Bram. I can now get into edit page of the vim script, but when I submit it, it give me the following error:

"Vim Online Error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't remember those complex VIM macro sequences you use frequently? * Wish you ' at line 4"

Could it be an invalid character in the input. I attach the description and installation section below to help you debug it:

-------------- Description -------------------------------

MARVIM - MAcro Repository for VIM

"Give your most complex macros a name and store it for future recall and use"

Problem statement(s):
------------------------------
   * Can't remember those complex VIM macro sequences you use frequently?
   * Wish you could save those macros beyond your immediate session?
   * Wish you could share your VIM macros with each other?
   * Why not templates as well in the same script?

Features:
-------------
    * Recording of VIM macros into persistent storage for future use
    * Quick search based recall and load of stored VIM macros
    * Visually select and save templates into persistent storage
    * Quick search based insert of stored templates
    * Recursive search of macro repository directories
    * Macro namespaces, supporting the organization of macros
      (in sub-directories)
    * Supports a shared macro repository for a team on a shared directory
    * Cross share your macros with other users by copying repositories
    * Macro menu items for all main actions

Default Hotkeys
---------------
  <F2>           - Find and execute a macro or insert template from repository
  Visual <F2> - Replays last macro for each line selected
  <F3>            - Save default macro register by name to the macro repository
  Visual <F3> - Save selection as template by name to the macro repository

Tips
------
 o <Space> can be very effective as the macro find key
 o use a naming convention for your macros to make it easy to find. e.g.:

   php:if-block
   php:strip-tags
   php:mysql-select-block
   php:mysql-update-block

Bugs, Patches, Help and Suggestions
----------------------------------------------------
If you find any bugs, have new patches or need some help, please send and email to chamindra [at] opensource.lk and put the word marvim in the subject line. Also we welcome you to share your repositories.

Homepage: http://chamindra.googlepages.com/marvim

"Freeze? I'm a robot. I'm not a refrigerator" - Marvin the Paranoid Android

-------------- Installation -----------------

o Download Marvim to your VIM plugin ($VIMRUNTIME/plugin) directory or source it explicity. Below is an example if you place it in  the home directory

  source $HOME/marvim.vim

o Configure Macro with different macro hotkeys (default F2,F3),   repository location (see below) or macro register (deault register q)

  let marvim_store = '/usr/local/share/projectX/marvim'
  let marvim_find_key = '<Space>'
  let marvim_store_key = 'ms'
  let marvim_register = 'c'

o Start vim and this will automatically create the base marvim macro   repository in your home directory. Based on the OS it will be located as follows:

  UNIX      ~/.marvim 
  WINDOWS   C:\Document and Settings\Username\marvim

o (optional) Copy predefined macro/template directories into the base marvin macro directory. Marvim uses recursive directory search so you can nest the directories as you wish.
      
----------------------------------------------

I work quite a bit with PHP, so if there is anything I can do to help out on my favorite editor by far, let me know :-)

Chamindra de Silva


On Mon, Sep 22, 2008 at 1:41 AM, Bram Moolenaar <[hidden email]> wrote:

Chamindra de Silva wrote:

> I was trying to edit the description of my macro repository script
> ( http://www.vim.org/scripts/script.php?script_id=2154 ) after
> uploading a new version just now and the site gives me the following
> error description:
>
> -----------------------
> Vim Online Error
>
> script: I couldn't find the script you requested (script_id=), are you
> sure it exists?
> -----------------------
>
> Unfortunately the description is now out of sync with the new version
> upload. Let me know if there is anything I might have done wrong and
> if there is anything I can do to help..

Strange, it looks like code that never actually worked.  I think I have
fixed it, try again.

--
From "know your smileys":
 ...---...   SOS

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Error editing VIM plugin description

David Fishburn-2

On Sun, Sep 21, 2008 at 11:01 PM, Chamindra de Silva
<[hidden email]> wrote:
> Thanks for the quick response Bram. I can now get into edit page of the vim
> script, but when I submit it, it give me the following error:
>
> "Vim Online Error
>
> You have an error in your SQL syntax; check the manual that corresponds to
> your MySQL server version for the right syntax to use near 't remember those
> complex VIM macro sequences you use frequently? * Wish you ' at line 4"
...

I just ran into this same problem updating my Yankring description.

This line is your problem:
>    * Can't remember those complex VIM macro sequences you use frequently?

For some reason with the Sourceforge update, now you can't have
embedded single quotes in your text without first escaping it.

If you change the above line to (using 2 single quotes):
>    * Can''t remember those complex VIM macro sequences you use frequently?

The update should succeed.

This is a new very recent problem.

Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Error editing VIM plugin description

JohnBeckett

David Fishburn wrote:
> For some reason with the Sourceforge update, now you can't
> have embedded single quotes in your text without first escaping it.

Interesting. Something to do with a defence against SQL injection attacks, or a foul
up in that attempt?

http://xkcd.com/327/
http://en.wikipedia.org/wiki/SQL_injection

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Error editing VIM plugin description

Charles-14

On Sep 22, 1:14 pm, "John Beckett" <[hidden email]> wrote:
> David Fishburn wrote:
> > For some reason with the Sourceforge update, now you can't
> > have embedded single quotes in your text without first escaping it.
>
> Interesting. Something to do with a defence against SQL injection attacks, or a foul
> up in that attempt?

I think SourceForge is updating their PHP to PHP5 with no magic quotes
setting. With magic quotes, single
quotes get backslashed for free and can be used directly in mysql
query but with magic quotes off, it is up to
the developer to mysql_real_escape_quote the input data.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Error editing VIM plugin description

Bram Moolenaar


Peacech wrote:

> On Sep 22, 1:14=A0pm, "John Beckett" <[hidden email]> wrote:
> > David Fishburn wrote:
> > > For some reason with the Sourceforge update, now you can't
> > > have embedded single quotes in your text without first escaping it.
> >
> > Interesting. Something to do with a defence against SQL injection attacks=
> , or a foul
> > up in that attempt?
>
> I think SourceForge is updating their PHP to PHP5 with no magic quotes
> setting. With magic quotes, single
> quotes get backslashed for free and can be used directly in mysql
> query but with magic quotes off, it is up to
> the developer to mysql_real_escape_quote the input data.

It indeed looks like they have suddenly switched off the magic quotes
flag.  So now I need to go through all the PHP code and guess where
escaping is needed, great...

I have inserted addslashes() calls where it seemed to be needed.  I
don't have time to try out all the changed pages.  Please keep an eye
open for text with quotes that isn't stored properly.  Adding slashes
twice causes trouble.

--
From "know your smileys":
 (X0||)   Double hamburger with lettuce and tomato

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---