Re: underscores in command names.

2009-08-10 Thread Efraim Yawitz
On Mon, Aug 10, 2009 at 8:55 AM, Edward Peschko horo...@gmail.com wrote:


  
   Try :help user-commands. It will answer all the above questions.
Vim
   help is very comprehensive, so make the most of it.
  
  yeah, I've seen that section. I understand why no lower case letters,
  but not having underscores is really odd. They are great at making
  things a lot cleaner, especially for those of use who do not like
  camel case.

Anyway, you have the source.  I just tried changing this and it seems to
work after changing a line in the function ex_command() from
while (ASCII_ISALNUM(*p))
to
while (ASCII_ISALNUM(*p) || *p == '_')
and making the exact same change to a line in find_command().

Both functions are in ex_docmd.c

Now maybe someone (Bram?) can tell me why this is not a good idea...

Ephraim

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



RE: underscores in command names.

2009-08-10 Thread Gene Kwiecinski

yeah, I've seen that section. I understand why no lower case letters,
but not having underscores is really odd. They are great at making
things a lot cleaner, especially for those of use who do not like
camel case.

Agreed, but just as a hunch, it may have something to do with
iskeyword() or somesuch, that in some contexts it may be a valid
character in a function-name, variable, etc., and others (eg, TeX) it
may represent an operator (such as subscript).

Making it /verboten/ across the board may reduce/eliminate situations
where it breaks in some contexts but works in the majority of others.

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



Re: underscores in command names.

2009-08-09 Thread googler



On Aug 8, 11:46 pm, meino.cra...@gmx.de wrote:

 But it is not always easy / possible especiialy for beginners
 to find what one search for. One example :

 How to know the difference between

     :h command-line

 and

     :h commandline

 without knowing the contents in beforehand?

If you type :h command and then press ctrl-D, it will show the list of
all tags with the word 'command' in it. Then you can choose the ones
that look related to what you are looking for.

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



Re: underscores in command names.

2009-08-09 Thread Efraim Yawitz
On Sun, Aug 9, 2009 at 9:00 AM, googler pinaki_...@yahoo.com wrote:


 If you type :h command and then press ctrl-D, it will show the list of
 all tags with the word 'command' in it. Then you can choose the ones
 that look related to what you are looking for.


I'm a +10Y user, and I didn't know that!  I guess I should have started with

:help help

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



RE: underscores in command names.

2009-08-09 Thread John Beckett

googler wrote:
 If you type :h command and then press ctrl-D, it will show the
 list of all tags with the word 'command' in it. Then you can
 choose the ones that look related to what you are looking for.

Yes, and for the really keen, you could enter a command like:

  :helpgrep \cunderscore

to search all of help for underscore (the \c makes it case
insensitive).

John


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



Re: underscores in command names.

2009-08-09 Thread Edward Peschko

 On Aug 8, 6:31 pm, Edward Peschko horo...@gmail.com wrote:
 This seems to be due to the underscore. Are underscores not allowed in
 command names? And if so, why? I'd like to have multiple 'modules',
 commands that all have the same prefix, followed by underscore,
 followed by command name. What characters are legal?
 And shouldn't underscore be one of them?

 Thanks,

 Ed

 Try :help user-commands. It will answer all the above questions. Vim
 help is very comprehensive, so make the most of it.

yeah, I've seen that section. I understand why no lower case letters,
but not having underscores is really odd. They are great at making
things a lot cleaner, especially for those of use who do not like
camel case.

Ed

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



underscores in command names.

2009-08-08 Thread Edward Peschko

hey all,

I just tried to define a bunch of commands in vim, all having '_' as a
delimiter, ie:

command! GREP_WORD ..
command! GREP_FILE ..

and got

E182: Invalid command name

This seems to be due to the underscore. Are underscores not allowed in
command names? And if so, why? I'd like to have multiple 'modules',
commands that all have the same prefix, followed by underscore,
followed by command name. What characters are legal?
And shouldn't underscore be one of them?

Thanks,

Ed

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



Re: underscores in command names.

2009-08-08 Thread googler


On Aug 8, 6:31 pm, Edward Peschko horo...@gmail.com wrote:
 This seems to be due to the underscore. Are underscores not allowed in
 command names? And if so, why? I'd like to have multiple 'modules',
 commands that all have the same prefix, followed by underscore,
 followed by command name. What characters are legal?
 And shouldn't underscore be one of them?

 Thanks,

 Ed

Try :help user-commands. It will answer all the above questions. Vim
help is very comprehensive, so make the most of it.

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



Re: underscores in command names.

2009-08-08 Thread meino . cramer

googler pinaki_...@yahoo.com [09-08-09 05:26]:
 
 
 On Aug 8, 6:31 pm, Edward Peschko horo...@gmail.com wrote:
  This seems to be due to the underscore. Are underscores not allowed in
  command names? And if so, why? I'd like to have multiple 'modules',
  commands that all have the same prefix, followed by underscore,
  followed by command name. What characters are legal?
  And shouldn't underscore be one of them?
 
  Thanks,
 
  Ed
 
 Try :help user-commands. It will answer all the above questions. Vim
 help is very comprehensive, so make the most of it.
 

But it is not always easy / possible especiialy for beginners
to find what one search for. One example :

How to know the difference between

:h command-line

and

:h commandline

without knowing the contents in beforehand?

 


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