Re: empty bufname('%') for quick fix, location list and preview window.

2013-05-14 Thread Shlomi Fish
Hi Zhao,

first of all:

Please don't start a new topic by replying to an existing message, because
this will put it under an existing thread in threaded, tree-like mailers.
Instead, write a new message to boston...@mail.pm.org .

The problem is that are the In-Reply-To headers:

https://duckduckgo.com/?q=%22in-reply-to%22%20header

On Sun, 12 May 2013 16:49:23 -0400
Zhao Cai zhao...@gmx.com wrote:

 Hello, :)
 
 `bufname('%')` for quickfix, location list and preview window are empty in my
 environment( MacVim ). Is it a bug? or by design? Do you have the same issue?
 or just me?

:echo bufname('%')

Seems to return the right thing for a regular file here on /usr/bin/gvim on
Mageia Linux 3. Are you trying it on special buffers?

Regards,

Shlomi Fish


-- 
-
Shlomi Fish   http://www.shlomifish.org/
Beginners Site for the Vim text editor - http://vim.begin-site.org/

He says “One and one and one is three”.
Got to be good‐looking ’cause he’s so hard to see.
— The Beatles, “Come Together”

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




gVim - Integrated development environment

2013-05-14 Thread contact . opc0de . fr
Hi,

I write sources codes in differents languages, and I'm looking for several 
things about gVim:

A plugin to create and manage my projects as an IDE (Visual Studio).

A plugin to use GDB and also to put Breakpoints from the lines of sources codes 
in gVim.

A plugin for the completion of sources codes, for example for functions and 
vars from libc, for functions and vars from extern lib and from my own sources 
files.

A plugin to build/compile a project.

Thank you very much.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: vim consume huge memory and can cause oom stty rows/columns 65535

2013-05-14 Thread Christian Brabandt
Hi jimmywang!

On Mo, 13 Mai 2013, jimmywang wrote:

 vi developers,
 
 With the following setting, vi can consume up to 40GB on my Linux (64 bit) 
 machine:
 
 stty rows 65535
 stty columns 65535
 vi /tmp/foo
 
 Please don't run as root as you may bring down your Linux machine (due to Out 
 Of Memory).
 
 I think this need to be fixed. Let me know your thoughts.

I see this too. Well, don't set your rows and columns to those insane 
values then.

regards,
Christian
-- 
Heute muß man seine Leute motivieren, anbrüllen allein nützt nichts mehr.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gVim - Integrated development environment

2013-05-14 Thread Tony Mechelynck

On 14/05/13 12:31, contact.opc0de...@gmail.com wrote:

Hi,

I write sources codes in differents languages, and I'm looking for several 
things about gVim:

A plugin to create and manage my projects as an IDE (Visual Studio).


not sure about that



A plugin to use GDB and also to put Breakpoints from the lines of sources codes 
in gVim.


you mean to run your compiled programs? Not sure about that. Of course 
as a prerequisite, the compiler  linker would have to produce symbol 
tables in a format that gdb understands. Wouldn't it be easier to run 
gdb in its own terminal window? If you put that and gvim in one 
[virtual] desktop you could switch between them by Alt-Tab.




A plugin for the completion of sources codes, for example for functions and 
vars from libc, for functions and vars from extern lib and from my own sources 
files.


Vim can already quite sophisticated completion, see :help 
ins-completion. For languages not yet known by Vim you might have to 
write a filetype-plugin |new-filetype| with a :setlocal statement for 
'dictionary' (q.v.). Completion from your own sources can be done in 
several ways at the same time (other files currently being edited, tags, 
included files, dictionary, thesaurus, ...), see :help 'complete'




A plugin to build/compile a project.


I think this one doesn't need a plugin, see :help quickfix.txt in 
general and its section 4 in particular. For source languages not yet 
known to Vim you may need to write a compiler plugin, see :help 
write-compiler-plugin


Thank you very much.



HTH
Tony.
--
Good news.  Ten weeks from Friday will be a pretty good day.

--
--
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

--- 
You received this message because you are subscribed to the Google Groups vim_use group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gVim - Integrated development environment

2013-05-14 Thread Charles Campbell

contact.opc0de...@gmail.com wrote:

(snip)

A plugin to use GDB and also to put Breakpoints from the lines of sources codes 
in gVim.


If you're using Linux, you can try gdbmgr 
(http://www.drchip.org/astronaut/vim/index.html#GDBMGR).


(snip)

Regards,
C Campbell

--
--
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

--- 
You received this message because you are subscribed to the Google Groups vim_use group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gVim - Integrated development environment

2013-05-14 Thread Erik Christiansen
On 14.05.13 15:30, Tony Mechelynck wrote:
 On 14/05/13 12:31, contact.opc0de...@gmail.com wrote:
 A plugin to use GDB and also to put Breakpoints from the lines of sources 
 codes in gVim.
 
 you mean to run your compiled programs? Not sure about that. Of course as a
 prerequisite, the compiler  linker would have to produce symbol tables in a
 format that gdb understands. Wouldn't it be easier to run gdb in its own
 terminal window? If you put that and gvim in one [virtual] desktop you could
 switch between them by Alt-Tab.

Some integration is within vim, but most is through the compatibility
of unix tools. Over several decades, I've used vi/vim together with
exuberant ctags for that IDE-ish jumping to function definitions
across files, etc., within vim, and GDB or DDD in another terminal for
debugging. Just use -g with gcc, for dubug info, and source-line
debugging should be within your grasp.

Someone said long ago, Unix is the IDE, and I've found it to be true.
(All the boxed-up commercial stuff lacks the unix mix  match freedom,
because they need to be monolithic, to keep you prisoner.)

Still, this:

http://vim.wikia.com/wiki/Use_Vim_like_an_IDE

was the first google match for vim gdb integration. There may be
something there, if the freedom of separate xterms does not appeal.

...

 A plugin to build/compile a project.

The tool is make, preferably the gnu one:

$ make --version
GNU Make 3.8

For integration with vim::help make

The O'Reilly make book is an easy way to get on top of it.

To avoid disappointment, it is worth remembering that we are talking
about Free Software. How you use the tools, and in what mix, is your
free choice. A new user has to break himself in, if he has only
used commercial packages previously.

Good luck with the new challenge! (It is certain to be stimulating, and
rewarding for the intellectually curious, and those who prefer freedom.)

Erik

-- 
Emacs is a nice OS - but it lacks a good text editor.
That's why I am using Vim.   - Anonymous

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gVim - Integrated development environment

2013-05-14 Thread Willy Gfn
contact.opc0de...@gmail.com wrote:
 A plugin to create and manage my projects as an IDE (Visual Studio).
Hi. First of all, vim is NOT an IDE, it's a text editor.
An IDE compiles many programs into a big one whereas vim is just a
(powerfull) text editor with many features.
For example, to see all your dirtree, :Sex or :Vex

 A plugin to use GDB and also to put Breakpoints from the lines of sources 
 codes in gVim.
Keep in mind that vim has built-in functionnalities, you do not need a
plugin for everything !
I once known a way to set breakpoints from within vim. Anyway, in the
same spirit, check :help quickfix. It gives you the errors issued from
compilation and lets you navigate the lines that caused the errors.

 A plugin for the completion of sources codes, for example for functions and 
 vars from libc, for functions and vars from extern lib and from my own 
 sources files.
:help ins-completion| all built-in completion (really powerfull)
:help ctags | generate tags file with ctags -R
| then, :set tags=/path/to/you/tags
:set omnifunc=syntaxcomplete#Complete
Ctrl-XCtrl-O| will complete with tag file and syntax
| specific stuffs.
Ctrl-XCtrl_I| will complete with included files (stdio.h,..)

 A plugin to build/compile a project.
That's what Makefiles are made for :)
:make to invoke makefile from within vim (note that 'make' can be tweak
to launch something else than 'make', like gcc, javac, perl, etc...


Obviously, those built-in function are well integrated into big
plugin to make them *prettier* and *easier to use*:
- project.vim
- NERDTree.vim
- BreakPts.vim
- SuperTab.vim
- SnipMate.vim
- ...

There are tons of plugins that do tons of things... BUT I suggest that
you first learn VIM, the editor, the powerfull editor.
Every thing done with a plugin can be done without it, with more or less
pain... But if you find that a task you do frenquently is painfull, you
might tough of creating a function or using a plugin.

Please, try to do stuffs before relying on plugins. Your vim experience
will be better :)

 Thank you very much.
You're welcome ;)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: evaluating vim functions in search mappings

2013-05-14 Thread Ben Fritz
On Tuesday, May 14, 2013 7:18:34 AM UTC-5, Charles Smith wrote:
 
 But I guess it's just not possible to invoke a vim function from
 
 within \{} - or maybe it's a lost art
 
 

What gave you that idea?

You tried using CTRL-R to get the expression register in a mapping, which can 
be done, but you forgot to also accept the expression register content to 
execute the expression by inserting a CTRL-M. So you could either do 
^R=somefunc()^M where ^R and ^M are literal CTRL-R and carriage return 
characters, or even better (in a mapping) use the map syntax C-R and 
CR/C-M/Enter. Even BETTER, is to use an expression mapping. :help 
:map-expr.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gVim - Integrated development environment

2013-05-14 Thread LCD 47
On 14 May 2013, contact.opc0de...@gmail.com wrote:
 Hi,
 
 I write sources codes in differents languages, and I'm looking for
 several things about gVim:
 
 A plugin to create and manage my projects as an IDE (Visual Studio).

If you absolutely must use a huge, slow, buggy, convoluted machinery
to accomplish some simple tasks:

http://eclim.org/

 A plugin to use GDB and also to put Breakpoints from the lines of
 sources codes in gVim.

You might consider doing it the other way around, with a GDB
frontend that runs (g)vim when necessary:

http://www.gnu.org/software/ddd/

But, again, if you must do it from Vim:

http://pyclewn.sourceforge.net/

(also see there for other similar projects).

 A plugin for the completion of sources codes, for example for
 functions and vars from libc, for functions and vars from extern lib
 and from my own sources files.

If the builtin completion is not enough for you, there are plenty of
plugins around, ranging from nice and simple to huge, slow, and complex.
Some popular choices:

https://github.com/msanders/snipmate.vim
http://www.vim.org/scripts/script.php?script_id=1879
https://github.com/c9s/perlomni.vim

 A plugin to build/compile a project.

The builtin make / quickfix works fine, but perhaps also take a look
at Syntastic:

https://github.com/scrooloose/syntastic

/lcd

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: empty bufname('%') for quick fix, location list and preview window.

2013-05-14 Thread Zhao Cai
Hi, Christian

I should state the purpose in the original post. What I was trying to do is to 
tell the difference between location list and quick fix and make a local 
powerline theme for each of them. But I can not find the way to differentiate 
quick fix window from location list.

Thanks. 

Cheers,
Zhao 

On May 14, 2013, at 7:16 AM, Christian Brabandt cbli...@256bit.org wrote:

 Hi Zhao!
 
 On So, 12 Mai 2013, Zhao Cai wrote:
 
 Hello, :)
 
 `bufname('%')` for quickfix, location list and preview window are empty in 
 my environment( MacVim ). Is it a bug? or by design? Do you have the same 
 issue? or just me?
 
 Of course. The quickfix, location list and preview windows don't have 
 names, unless you give them one (:h :file_f). But you usually don't need 
 that.
 
 The main question is, why do you think you need the buffer name of a 
 special window? So what problem are you really trying to solve?
 
 regards,
 Christian
 -- 
 Jede Generation lacht über Moden, aber folgt den neuen treu.
   -- Henry David Thoreau
 
 -- 
 -- 
 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
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 vim_use group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to vim_use+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: vim consumes huge memory with stty rows/columns set to 64K

2013-05-14 Thread LCD 47
On 14 May 2013, jimmywang jieming.w...@gmail.com wrote:
 Developers,
 
 On Linux (64 bit), the following tty settings will can cause vi to
 consume 40G, and can cause system to run out of memory:
 
 stty rows 65535
 stty columns 65535
 vi foo
 
 This need to be fixed (e.g., restrict columns to 512). Any comments.

If you're DoS-ing your own terminal, Vim won't save you from the
consequences.

/lcd

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: empty bufname('%') for quick fix, location list and preview window.

2013-05-14 Thread Christian Brabandt
Hi Zhao!

On Di, 14 Mai 2013, Zhao Cai wrote:

 I should state the purpose in the original post. What I was trying to
 do is to tell the difference between location list and quick fix and
 make a local powerline theme for each of them. But I can not find the
 way to differentiate quick fix window from location list.

Ah, I see the problem. The statusline for Quickfix Buffers contains '%t' 
which according to the help should output the buffer name, but the 
buffer name for quickfix and location lists is empty. That is, Vim 
treats those buffers special and in case of location and quickfix lists 
returns location list/quickfix list instead of the buffer name.

Anyway, I am not aware of any option you can check to differentiate 
between quickfix and location lists. You could try to check the 
w:quickfix_title variable, it could give a clue.

regards,
Christian
-- 
Die Keuschheit wohnt weder in den obern noch untern Ständen - sondern
in den mittlern.
-- Jean Paul

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Setting titleold does not work

2013-05-14 Thread Ryan
Hi,

I've tried to set the title as shown in the docs:

set title
let titlestring = titlestring
let titleold = titleold

The title string works just fine. But, the title old does not appear to work. I 
am using xterm in

Yakuake
Version 2.9.6
KDE Dev Platform 4.4.5

The title after a quit is Yakuake.

I moved my .vim dir and .vimrc file to .bkp_vim and .bkp_vimrc to make sure 
there were no scripts or plugins doing this. It appears this is vim doing it. 

Ryan

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.