Tuesday, June 29, 2010

question about lua source navigation

I'm just learning lua and I use vim to navigate some lua projects. I  use ctags to generate tags using a map:
map <F12>  <Esc>:!ctags -R .<CR>
but it rarely helps. When I want to jump to some function definition, it always errs. Then I checked the generated tag and it seems fine. So my question is just is there a better way to navigate lua project?(esp. jumping to function definition?)

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: percentage of vim users running python

On Tuesday 29 June 2010 20:20:27 Ted wrote:

> I'm wondering if there are some figures somewhere that would
> provide some sort of estimate of the percentage of vim users
> who have python installed, or would be free of objections to
> installing it if a module required it. I'm working on some
> vim modules, to be released for general use, that are
> threatening to become pretty complicated, and would prefer to
> write them in python. Is it likely that this would lock out
> a significant portion of the vim user population? Is it
> frowned upon to use external languages in cases where it's
> not entirely necessary? Python is more or less ubiquitous on
> linux installs, but I don't feel like I could guess at how
> many vim users on other platforms would be unable or
> unwilling to install it.

i'd like to count myself among those who like a lean build
with no extra languages compiled in and as few plugins running
as possible

whatever your modules do i would not consider them if they
require a python enabled vim

sc

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: percentage of vim users running python

On Tue, Jun 29, 2010 at 6:32 PM, AK <andrei.avk@gmail.com> wrote:
> On 06/29/2010 09:20 PM, Ted wrote:
> > I'm wondering if there are some figures somewhere that would provide
> > some sort of estimate of the percentage of vim users who have python
> > installed, or would be free of objections to installing it if a module
> > required it.  I'm working on some vim modules, to be released for
> > general use, that are threatening to become pretty complicated, and
> > would prefer to write them in python.  Is it likely that this would
> > lock out a significant portion of the vim user population?  Is it
> > frowned upon to use external languages in cases where it's not
> > entirely necessary?  Python is more or less ubiquitous on linux
> > installs, but I don't feel like I could guess at how many vim users on
> > other platforms would be unable or unwilling to install it.
> >
> > The modules themselves are relatively general purpose; my motivation
> > to code them in Python stems partly from this very generality: it's
> > advantageous to have that code available outside of the context of
> > vim.  I also find that I tend more and more toward a functional
> > programming style that doesn't work particularly well in vimscript.
>
> Do you mean Vim compiled with python or just python installed on the
> system? If I understand right, windown installer for Vim comes with
> python compiled into Vim. Same goes for Vim in Ubuntu. On other
> distributions, I'm not sure, I believe I heard that Redhat's Vim does
> not have Python compiled in.
>
> If you're using python from Vim, it might make sense to use compiled in
> interpreter because there's closer integration with Vim rather than
> outside interpreter. If you haven't done this already, read :help python.

The Windows build refers to a Python DLL and will load it if it can find
it. However, Python itself is not included with Windows Vim and must be
separately installed. It must also be the same version of Python (e.g.,
python26.dll) and the DLL must be in the search path, :h python-dynamic

The average Vim user on Windows is, I suppose, somewhat likely to already
have Python, and, if not, will likely be amenable to installing it
-- especially if it gets them some useful Vim extensions.
But this is all supposition; I know of no way to get meaningful numbers on this.
--
/George V. Reilly  george@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: percentage of vim users running python

On 06/29/2010 09:20 PM, Ted wrote:
> Hello folks,
>
> I'm wondering if there are some figures somewhere that would provide
> some sort of estimate of the percentage of vim users who have python
> installed, or would be free of objections to installing it if a module
> required it.  I'm working on some vim modules, to be released for
> general use, that are threatening to become pretty complicated, and
> would prefer to write them in python.  Is it likely that this would
> lock out a significant portion of the vim user population?  Is it
> frowned upon to use external languages in cases where it's not
> entirely necessary?  Python is more or less ubiquitous on linux
> installs, but I don't feel like I could guess at how many vim users on
> other platforms would be unable or unwilling to install it.
>
> The modules themselves are relatively general purpose; my motivation
> to code them in Python stems partly from this very generality: it's
> advantageous to have that code available outside of the context of
> vim.  I also find that I tend more and more toward a functional
> programming style that doesn't work particularly well in vimscript.
>
> Cheers
> -Ted
>


Do you mean Vim compiled with python or just python installed on the
system? If I understand right, windown installer for Vim comes with
python compiled into Vim. Same goes for Vim in Ubuntu. On other
distributions, I'm not sure, I believe I heard that Redhat's Vim does
not have Python compiled in.

If you're using python from Vim, it might make sense to use compiled in
interpreter because there's closer integration with Vim rather than
outside interpreter. If you haven't done this already, read :help python.

   -ak

--
 Python plugins for vim: outliner, todo list, project manager, calendar,
 expenses tracker, sortable table, and more |
 http://lightbird.net/pysuite/


percentage of vim users running python

Hello folks,

I'm wondering if there are some figures somewhere that would provide
some sort of estimate of the percentage of vim users who have python
installed, or would be free of objections to installing it if a module
required it. I'm working on some vim modules, to be released for
general use, that are threatening to become pretty complicated, and
would prefer to write them in python. Is it likely that this would
lock out a significant portion of the vim user population? Is it
frowned upon to use external languages in cases where it's not
entirely necessary? Python is more or less ubiquitous on linux
installs, but I don't feel like I could guess at how many vim users on
other platforms would be unable or unwilling to install it.

The modules themselves are relatively general purpose; my motivation
to code them in Python stems partly from this very generality: it's
advantageous to have that code available outside of the context of
vim. I also find that I tend more and more toward a functional
programming style that doesn't work particularly well in vimscript.

Cheers
-Ted

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Conditional imap

>Ok, I admit, I don't understand, why you need to check for 3 columns in
>front of the cursor. But hey, if it works, I won't complain ;)

Well in the \[ or the $$ environment, I need to check, if there is a
delimiter one space in front of the cursor, a delimiter two before cursor
and a non-math environment before that. Thet's why I need to check 3 columns
before the cursor.
--
View this message in context: http://old.nabble.com/Conditional-imap-tp29008528p29027684.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Re: Conditional imap

Hi gitterrost4!

On Di, 29 Jun 2010, gitterrost4 wrote:

> Indeed it was latex-suite overriding the map from my tex.vim file. I fixed
> this by appending the line
>
> exe 'source '.fnameescape('~/.vim/ftplugin/tex.vim')
>
> to the file $VIM/ftplugin/latex-suite/main.vim
>
> I do not know, if this could be solved better, but now it works...
>
> I also had to adapt the matching, because your suggestion would only match
> if the cursor was between math characters, but not if the cursor was at the
> end of the line or after a math delimiter. It now boiled down to:
>
> inoremap <expr> ( synIDattr(synID(line('.'), col('.')-1, 1),
> "name")=~"texMath" ? "\\left(" : synIDattr(synID(line('.'), col('.'), 1),
> "name")=~ "texMath" ? "\\left(" : synIDattr(synID(line('.'), col('.')-1, 1),
> "name")=~"Delimiter" ? synIDattr(synID(line('.'), col('.')-2, 1),
> "name")=~"Delimiter" ? synIDattr(synID(line('.'), col('.')-3, 1),
> "name")!~"texMath" ? "\\left(" : "(" : synIDattr(synID(line('.'),
> col('.')-2, 1), "name")!~"texMath" ? "\\left(" : "(" : "("

Ok, I admit, I don't understand, why you need to check for 3 columns in
front of the cursor. But hey, if it works, I won't complain ;)

regards,
Christian
--

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php