Search the web
Sign In
New User? Sign Up
vim · Vim (Vi IMproved) text editor users list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 109684 - 109713 of 109713   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries   (Group by Topic) Sort by Date ^  
#109684 From: Gary Johnson <garyjohn@...>
Date: Thu Nov 26, 2009 7:44 am
Subject: Re: Filetype plugins strategy
garyjohn@...
Send Email Send Email
 
On 2009-11-26, Tony Mechelynck wrote:
> On 26/10/09 21:23, Charles Campbell wrote:

> > Don't modify the global filetype.vim -- next time you upgrade, your
> > modification(s) will be overwritten.
> >
> > Modify/create   $HOME/.vim/filetype.vim  .  An example of a typical entry:
> >
> > if exists("did_load_myfiletypes")
> >   finish
> > endif
> > let did_load_myfiletypes= 1
> >
> > augroup filetypedetect
> >
> >   au BufNewFile,BufReadPost *.dif,*.diff,ptch  setf diff
> > augroup END
> >
> >
> > Now, about $HOME/.vim/ftplugin/python.vim -- in the typical loading
> > sequence, it will be loaded before the global file(s)  (see  :echo&rtp
> > to get an idea of your loading sequence).  So it *won't* override the
> > global one.  If you want to override global plugins, may I suggest that
> > you put it in   $HOME/.vim/after/ftplugin/python.vim  instead.  It will
> > then be loaded after global plugins and will have a chance to override.
> >
> > Regards,
> > Chip Campbell
>
> Oh, but it will override the global one, because the global filetype.vim
> uses (just as in the above example) the ":setfiletype" command, which
> will only set a filetype if it isn't already set.
>
> In an after-plugin, you should use
>
>  au BufRead,BufNewFile foobar setlocal filetype=whatever
>
> instead.

I think you're confusing setting the filetype with setting
other option values for a particular filetype.  You could put
an "au BufRead,BufNewFile ..." command in your ~/.vimrc,
~/.vim/filetype or ~/.vim/ftdetect/<filetype>.vim file, but you
would not put one in a ~/.vim/ftplugin/<filetype>.vim or
~/.vim/after/ftplugin/<filetype>.vim file because because it
wouldn't be triggered until the _next_ BufRead or BufNewFile
event after the one that caused the filetype plugin to be
sourced.

Best regards,
Gary



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

#109685 From: parag <parag.paul@...>
Date: Thu Nov 26, 2009 7:45 am
Subject: How to add all the lines in file all toegterh
parag.paul@...
Send Email Send Email
 
suppose there is a file which looks like this

1
b
c
d

I want the fil to looke 1bcd
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#109686 From: Srikanth Venkateswaran <srikanth.venkateswaran@...>
Date: Thu Nov 26, 2009 7:48 am
Subject: Re: Coding in Java using Vim
srikanth.venkateswaran@...
Send Email Send Email
 
Hi,
 Thanks for all the replies. I didn't expect so many and so quick.

>> Eclim probably won't solve the speed issues for you.

Actually it partly did. The background eclipse runs on the server (half the world away) and doesn't have to transport the entire GUI across the n/w since the frontend s only a terminal vi..

>> log into the server and work using  a terminal.
Exactly what I do.

>>Maybe you can implement kind of file caching so that accessing files is
faster ?
>> Maybe you can start using a version control system so that you can keep
a local copy of the source code.

Uh Oh... This is company code so strictly no checkouts allowed locally (at home). Of course we check out a local copy in the office so there is no problem using Eclipse/Netbeans there. At home, even connecting to the local server is slow.
 
>>  What is your real problem?
Can't checkout code at home (officially atleast)

Currently using Eclim at home is sufficient for me, so thanks for all the help. This thread can be closed.

Thanks,
Srikanth
On Sun, Nov 22, 2009 at 8:58 PM, Marc Weber <marco-oweber@...> wrote:

Excerpts from Srikanth Venkateswaran's message of Sun Nov 22 10:33:16 +0100 2009:
>
> Hi,
>  I code Java in Vim using Vjde
> (http://www.vim.org/scripts/script.php?script_id=1213). But I am not
> able to use many of the features because the documentation is entirely
> in Chinese, with a brief tutorial in English.
> 1) While it recognizes standard packages ( java.* ) for code
> completion, it does not recognize my custom packages. I am following
> the ctags instructions specified in the script homepage exactly as far
> as I can understand them.
> 2) The auto-import feature works for standard packages but not mine.
>
> Questions:
> 1) Is there any other tool for coding Java in Vim other than Vjde?
> 2) Why am I using vim to code Java instead of Eclipse? Well, I have to
> code java over a VPN halfway across the world and the bandwidth makes
> a full fledged Eclipse IDE very slow. My question is, if there was a
> full fledged java plugin for vim with as many features as Eclipse,
> wouldn't it be even slower, since it would have to do the parsing and
> matching in a language-generic way?
>
> Thanks,
> Srikanth

Yes, of course vim script is slower than Java. There is one plugin on
vim.org which implements a Java parser. However it wasn't updated within
the last year. And I think there are many reasons for it.
It is insane to duplicate the work which was done on Eclipse.
Eclim probably won't solve the speed issues for you.

Maybe you can look at your problem in a different way?
Maybe you can implement kind of file caching so that accessing files is
faster ?
Maybe you can start using a version control system so that you can keep
a local copy of the source code.

Why do you have to use files which are stored on a server having a slow
connection to you?

What is your real problem?

Be aware that Netbeans has very good vi keybindings. Eclipse also has a
vi-plugin.

Maybe try only reading .java files from the remote location while
linking Eclipse stuff to a local disk. Using ntfs you can create
different kinds of links etc.

Also be aware that you can't debug Java code as comfortable as in Elipse
or netbeans.

I'd also join #eclipse and ask how others work with a setup like yours.

There are alternative solutions: Eg log into the server and work using
a terminal. I don't know which works best for you. You have to try.

Good luck.
Marc Weber




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


#109687 From: "Christian Brabandt" <cblists@...>
Date: Thu Nov 26, 2009 8:03 am
Subject: Re: How to add all the lines in file all toegterh
cblists@...
Send Email Send Email
 
On Thu, November 26, 2009 8:45 am, parag wrote:
> 1
> b
> c
> d
>
> I want the fil to looke 1bcd

:%j!

regards,
Christian


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

#109688 From: Gary Johnson <garyjohn@...>
Date: Thu Nov 26, 2009 8:02 am
Subject: Re: Indenting ruby code
garyjohn@...
Send Email Send Email
 
On 2009-11-26, John Beckett wrote:
> Tuo Pe wrote:
> > What is the proper way and place to change this? After
> >
> >   :set sw=2
> >   :set ts=2
> >
> > indentation seemed to be alright. Anyway, what is the proper
> > way to change the indentation size?
>
> That's correct to use a tab for each indent. Read more here:

That may or may not be correct, depending on the expectations of
your readers and/or your compiler or interpreter.  If any of the
consumers of your code are expecting tab stops of, say, 8 spaces,
then using tabs with a tab-stop setting of 2 spaces may not be a
good idea.

I'm not saying setting ts=2 is always a bad idea; I'm just saying
that it's not always correct.

Regards,
Gary



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

#109689 From: Gary Johnson <garyjohn@...>
Date: Thu Nov 26, 2009 8:05 am
Subject: Re: How to add all the lines in file all toegterh
garyjohn@...
Send Email Send Email
 
On 2009-11-25, parag wrote:
> suppose there is a file which looks like this
>
> 1
> b
> c
> d
>
> I want the fil to looke 1bcd

     :%j!

See

     :help :j

Regards,
Gary



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

#109690 From: thgr <thgr@...>
Date: Thu Nov 26, 2009 8:11 am
Subject: Re: vim72 for redhat enterprise 4
thgr@...
Send Email Send Email
 
Thank you very much for your help! Sorry for the long delay in my
answer - i was very busy at work.

I did not have my own .vimrc file: after copying my standard gvimrc
the tab completion worked.

But the ":e ." to browse the file system still does not work. Tried to
install netrw.vim but that resulted in the error
"E492: Not an editor command: UseVimball" when :so % sourcing the .vim
file.

But on the M$ windows machines and on the 6.3 versions on linux ":e ."
works out of the box - am I missing here something too?

Again lots of thanks for your advice!

On Nov 12, 6:45 am, pansz <panshi...@...> wrote:
> thgr写道:
>
> > Hi vim users,
>
> > I want to use all the great features  of vim version 7 for redhat
> > enterprise linux 4 (comes with vim 6.3) - so i downloaded the sources
> > and compiled.
>
> > But now I am missing some great features - can anybody tell me how
> > they can be invoked (or tell me where I can find a neat .rpm that has
> > all the stuff)?
>
> 1. do you have your own ~/.vimrc ? if you are using the system wide
> version it usually at /etc, while the compiled vim usually search it at
> /usr/local/share/vim/vim72
>
> 2. type :version within your vim and give the output, it helps to
> identify your problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#109691 From: Steven Woody <narkewoody@...>
Date: Thu Nov 26, 2009 8:40 am
Subject: Re: mksess can not keep my color settings
narkewoody@...
Send Email Send Email
 
On Sat, Nov 7, 2009 at 4:52 PM, Tony Mechelynck
<antoine.mechelynck@...> wrote:
>
> On 09/10/09 15:45, Steven Woody wrote:
>> Hi,
>>
>> The colors I set in after/plugin/mycolor.vim can not be kept every time
>> when I load (:so) a  previously saved session file. How to overcome this?
>>
>> Thanks.
>
> To set colours more robustly, set them in a colorscheme. However, it is
> *not* possible to tweak an existing colorscheme by adding
> "after-commands" in a script in an |after-directory|, you have to write
> a full-fledged colorscheme (possibly by modifying an existing one), give
> it a new name and place it in the colors/ subdirectory of a directory
> named early in 'runtimepath' (e.g. $VIM/vimfiles/colors/ if you want to
> make it available to all users on your machine -- and have the
> permissions for it).
>
> My "almost-default" colorscheme
> http://users.skynet.be/antoine.mechelynck/vim/almost-default.vim started
> out as a "slight" modification of the default colorscheme: I notice that
> it has grown quite a lot since then. Use it as a source of inspiration
> if you want; you'll probably not use it "as-is" since some of the
> colours it sets (such as User1 and User2) are used by settings elsewhere
> (in this case, in the custom tabline defined by my vimrc
> http://users.skynet.be/antoine.mechelynck/vim/.vimrc ).
>
> See ":help :colorscheme".
>
>

Many thanks!

--
Life is the only flaw in an otherwise perfect nonexistence
     -- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (narkewoody@...)

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

#109692 From: Isaac <tingjun.li@...>
Date: Thu Nov 26, 2009 11:23 am
Subject: Re: A quick way to get abstract from a very _long_ article?
tingjun.li@...
Send Email Send Email
 
Hello, tim: 

thanks!

On Thu, Nov 26, 2009 at 9:03 AM, Tim Chase <vim@...> wrote:

Depending on the complexity of your document and how whitespace
is treated, you can do most of them pretty easily:

   :g/^Lesson \d\+//^Abstract/;/^-\@!/t$


with this command i get result like following:

------------------------------------------------------------------------------------------------
Abstract "This is what i want to get
-every abstrct point        "This is what i want to get
-will start with string '-'                "This is what i want to get
-... "This is what i want to get

Abstract
-tip1
-tip2
-tip3

Abstract
-tip1
-tip2
-tip3
-tip4
 ------------------------------------------------------------------------------------------------

I think it has solved my first problem, it's amazing~~

but I can't understand the expression very well, could you give me some more 
explanation about how you organize  the command and what every part stand for?

another question: "Lesson is disappeared?"

I will read and have a try of left of your reply now. thanks again!

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

#109693 From: Kazuo Teramoto <kaz.rag@...>
Date: Thu Nov 26, 2009 11:28 am
Subject: Re: Need help to design Vim T-shirts
kaz.rag@...
Send Email Send Email
 
On Wed, Nov 25, 2009 at 10:37 PM, Ismael Barros² <razielmine@...> wrote:
>
> The T-shirt is almost here. A little question: which font would look
> better for the ":wq!" on the back? The font in
> "http://www.vim.org/images/vim_header.gif" looks appropiate, does any
> of you know which one is it?
MyFonts say it is Courier Regular (http://www.myfonts.com/WhatTheFont/)

Kazuo

--
«Dans la vie, rien n'est à craindre, tout est à comprendre»
Marie Sklodowska Curie.

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

#109694 From: Isaac <tingjun.li@...>
Date: Thu Nov 26, 2009 12:34 pm
Subject: Re: A quick way to get abstract from a very _long_ article?
tingjun.li@...
Send Email Send Email
 
On Thu, Nov 26, 2009 at 7:23 PM, Isaac <tingjun.li@gmail.com> wrote:
Hello, tim: 

thanks!

On Thu, Nov 26, 2009 at 9:03 AM, Tim Chase <vim@...> wrote:

Depending on the complexity of your document and how whitespace
is treated, you can do most of them pretty easily:

   :g/^Lesson \d\+//^Abstract/;/^-\@!/t$


through the help of manual, i can get the following symbol's meaning now. 

^ To the first non-blank character of the line.
|exclusive| motion.

\d digit: [0-9] */\d*

\+ Matches 1 or more of the preceding atom, as many as possible. {not in
Vi}
Example matches ~
^.\+$ any non-empty line
\s\+ white space of at least one character

/;      E386    A very special offset is ';' followed by another search command. 

\@! Matches with zero width if the preceding atom does NOT match at the
current position. |/zero-width| {not in Vi}
Like '(?!pattern)" in Perl.

remained question: what does "//" mean?

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

#109695 From: Tim Chase <vim@...>
Date: Thu Nov 26, 2009 1:11 pm
Subject: Re: A quick way to get abstract from a very _long_ article?
vim@...
Send Email Send Email
 
>> :g/^Lesson \d\+//^Abstract/;/^-\@!/t$
>
> I think it has solved my first problem, it's amazing~~

Glad it mostly worked for you :)

> but I can't understand the expression very well, could you
> give me some more explanation about how you organize  the
> command and what every part stand for?

That's

   :g/           On every line that matches
   ^Lesson \d\+  "Lesson" at the beginning of the line
                 followed by one or more digits
   /             perform the following action(s)
                 [1]
   /^Abstract/   From the current match's line, search
                 forward for the word "Abstract" at the
                 beginning of the line
                 [2]
   ;             through [3]
   /^-\@!/       the next line that doesn't start with
                 a dash
   t             copy it ("it" = the range from "Abstract"
                 through the next non-dash line)
   $             to the end of the file


Notes:
[1] the form is ":g/pattern/action", where "action" in this case
is a form of "{range}command"...the range happens to be specified
relatively by searching instead of by absolute line counts

[2] If you didn't want the word "Abstract" to be copied to your
results at the bottom, you could use "/^Abstract/+1" to start the
range on the line *following* "Abstract"

[3] This was my side-note/complaint in my previous email...I'm
not really sure why this doesn't work with a "," instead of a ";"
because I'm fairly certain I've done stuff almost exactly like
this before using the comma and it's worked.


[from your other email]
> through the help of manual, i can get the following symbol's meaning now.
>
> ^ To the first non-blank character of the line.
> |exclusive| motion.
>
> \d digit: [0-9] */\d*
>
> \+ Matches 1 or more of the preceding atom, as many as possible.
>
> /;      E386    A very special offset is ';' followed by another search
> command.
>
> \@! Matches with zero width if the preceding atom does NOT match at the
> current position. |/zero-width| {not in Vi}
> Like '(?!pattern)" in Perl.
>
> remained question: what does "//" mean?

The "//" is actually the adjacency of the end of the ":g" command
and the beginning of a search relative-reference:

    :g/pattern/command
              ^ the first "/"

where "command" is (as mentioned above in [1])

    {range}t$

The "{range}" just happens to be "/^Abstract/;/^-\@!/"
                                    ^ the second "/"

> another question: "Lesson is disappeared?"

I'm not sure I understand how to interpret this:

1) You meant "'Lesson' is completely gone from my file?!"
No...if the file was big enough, the stuff dumped at the bottom
will fill the screen, hiding the original content (containing
"Lesson") at the top.  My Ex command(s) perform no deletion (only
copies), so the top half of the file should remain the same.  The
easiest way to see this is to put a bar at the bottom of your
original file (something like

    :$put=repeat('=', 50)
or
    G50A=<esc>

to put in a "=========="-type bar).  That way, you can see where
the original data ended and where the Abstract collection begins

2) You meant "I wanted to copy 'Lesson' down as well, but forgot
to mention that in my original post about copying Abstracts" :)
That's a bit more complex, but not too bad.  My first thought
(untested) would be something like changing my

   :g/^Lesson \d\+//^Abstract/;/^-\@!/t$
to
   :g/^Lesson \d\+/ka|t$|'a/^Abstract/;/^-\@!/t$

which

    ka      drops mark "a" on the Lesson line so we can come back
    |       then
    t$      copies the Lesson line to the bottom
            (which moves the current location to the bottom)
    |       and then
    'a      go back to the original Lesson line
    ...     and do the rest of the stuff to copy the Abstract


It does require tromping on one of your bookmarks, so if you have
something sacred marked as "a", you can choose another bookmark
letter to use in both places.


For help targets on all of this (some of which you mentioned
finding):

    :help :g
    :help :range       " especially about a page down on ";"
    :help :t
    :help :k
    :help :'
    :help :bar
    :help /^
    :help /\@!
    :help /\d
    :help /\+

Hope this gives you a clearer picture of how that command breaks
down and can be reworked.

-tim (the early-morning prolix pedagogue)





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

#109696 From: Isaac <tingjun.li@...>
Date: Thu Nov 26, 2009 1:26 pm
Subject: Re: A quick way to get abstract from a very _long_ article?
tingjun.li@...
Send Email Send Email
 
a quick reply as below:

On Thu, Nov 26, 2009 at 9:11 PM, Tim Chase <vim@...> wrote:

2) You meant "I wanted to copy 'Lesson' down as well, but forgot
to mention that in my original post about copying Abstracts" :)
That's a bit more complex, but not too bad.  My first thought
(untested) would be something like changing my

 :g/^Lesson \d\+//^Abstract/;/^-\@!/t$
to
 :g/^Lesson \d\+/ka|t$|'a/^Abstract/;/^-\@!/t$


=> it works!!
 

-tim (the early-morning prolix pedagogue)


I love you, man!!

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

#109697 From: Isaac <tingjun.li@...>
Date: Thu Nov 26, 2009 1:33 pm
Subject: Re: A quick way to get abstract from a very _long_ article?
tingjun.li@...
Send Email Send Email
 
people who use vim well are really amazing... and it indeeds saved a lot of time!

On Thu, Nov 26, 2009 at 9:26 PM, Isaac <tingjun.li@gmail.com> wrote:
a quick reply as below:

On Thu, Nov 26, 2009 at 9:11 PM, Tim Chase <vim@...> wrote:

2) You meant "I wanted to copy 'Lesson' down as well, but forgot
to mention that in my original post about copying Abstracts" :)
That's a bit more complex, but not too bad.  My first thought
(untested) would be something like changing my

 :g/^Lesson \d\+//^Abstract/;/^-\@!/t$
to
 :g/^Lesson \d\+/ka|t$|'a/^Abstract/;/^-\@!/t$


=> it works!!
 
===================================================================
Lesson 1 "This is what i want to get
Abstract "This is what i want to get
-every abstrct point        "This is what i want to get
-will start with string '-'                "This is what i want to get
-... "This is what i want to get

Lesson 2 
Abstract
-tip1
-tip2
-tip3

Lesson 77 
Abstract
-tip1
-tip2
-tip3
-tip4
===================================================================

i love this group~ happy vimming! ^-^

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

#109698 From: epanda <callingelvis@...>
Date: Thu Nov 26, 2009 2:06 pm
Subject: Correct easily if without block instructions code
callingelvis@...
Send Email Send Email
 
Hi,


I would like to know if I have to add instructions bloc in this case :

if ( cond1 &&
              cond2 )

/* general comment
    // a comment

*
*/

return result;


==> has to become

if ( cond1 &&
              cond2 )
{
     /* general comment
        // a comment

      *
      */
       return result;
}


Thanks
Best Regards

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

#109699 From: Ben Schmidt <mail_ben_schmidt@...>
Date: Thu Nov 26, 2009 5:06 pm
Subject: Sender header
mail_ben_schmidt@...
Send Email Send Email
 
It seems the 'Sender' header has gone missing from posts that are sent to me. It
used to always be included, with the list address as the sender, and today it
started no longer being included. My email filters now don't work.

Anyone know anything about this? A weird inexplicable Google Groups thing?
Something we could/should follow up? Something our list admins have changed?

One of these days I'll get a bit more active on the list again...just too much
on
this year to keep abreast of it all on the whole, unfortunately.

Ben.





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

#109700 From: Peter Berntsen <ptrber@...>
Date: Thu Nov 26, 2009 5:11 pm
Subject: Re: X11 selection mechanism fails in slackware 13.0 x86_64
ptrber@...
Send Email Send Email
 
>    :version
>
> and seeVIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 24 2009 20:12:41)
Included patches: 1-245
Compiled by <volkerdi@...>
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu +mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
+multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl +postscript
+printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
  -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
  -xterm_clipboard -xterm_save
    system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
       user exrc file: "$HOME/.exrc"
   fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fPIC -D_FORTIFY_SOURCE=
1    -D_REENTRANT -D_GNU_SOURCE  -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL
E_OFFSET_BITS=64  -I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE  -I/u
sr/include/python2.6 -pthread
Linking: gcc   -Wl,-E   -L/usr/local/lib -o vim       -lncurses -lacl -lgpm   -W
l,-E   -L/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE -lperl -lcrypt -
lutil -lc -L/usr/lib64/python2.6/config -lpython2.6 -lpthread -lutil -lm -Xlinke
r -export-dynamic

You are right. When Patrick Volkerding compiled this version- X11,
clipboard, xterm_clipboard was not defined.

>    alias vim="gvim -v"
>
> or a symlink, e.g.,
>
>    ln -s /usr/X11R6/bin/gvim ~/bin/vim

Thanks! This works for now. I'm thinking of compiling vim from source.
Looking for a thread on this group that has discussed that.
>
> You may need to "set mouse=a" to get this all to work as well.

:set mouse gives mouse=a so it is set.

Thanks Gary!

Peter

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

#109701 From: Francisco Dibar <frandibar@...>
Date: Thu Nov 26, 2009 5:36 pm
Subject: Re: Correct easily if without block instructions code
frandibar@...
Send Email Send Email
 
On Thu, Nov 26, 2009 at 11:06 AM, epanda <callingelvis@...> wrote:
> I would like to know if I have to add instructions bloc in this case :
>
> if ( cond1 &&
>             cond2 )
>
> /* general comment
>   // a comment
>
> *
> */
>
> return result;
>
>
> ==> has to become
>
> if ( cond1 &&
>             cond2 )
> {
>    /* general comment
>       // a comment
>
>     *
>     */
>      return result;
> }
>

If I understood you well, you need to surround some lines of code
between braces. That can be done with the surround plugin as follows:
  - select the lines of text you wish to surround
  - type s{

To indent properly, you can type vi{ to select the block of text
between braces, and then type = (or shift+>) to indent correctly.

bye.

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

#109702 From: epanda <callingelvis@...>
Date: Thu Nov 26, 2009 5:44 pm
Subject: Re: Correct easily if without block instructions code
callingelvis@...
Send Email Send Email
 
Yes, I want to surround first line of code after if instruction ...

but with vimscript, not from normal mode

On 26 nov, 18:36, Francisco Dibar <frandi...@...> wrote:
> On Thu, Nov 26, 2009 at 11:06 AM, epanda <callingel...@...> wrote:
> > I would like to know if I have to add instructions bloc in this case :
>
> > if ( cond1 &&
> >             cond2 )
>
> > /* general comment
> >   // a comment
>
> > *
> > */
>
> > return result;
>
> > ==> has to become
>
> > if ( cond1 &&
> >             cond2 )
> > {
> >    /* general comment
> >       // a comment
>
> >     *
> >     */
> >      return result;
> > }
>
> If I understood you well, you need to surround some lines of code
> between braces. That can be done with the surround plugin as follows:
>  - select the lines of text you wish to surround
>  - type s{
>
> To indent properly, you can type vi{ to select the block of text
> between braces, and then type = (or shift+>) to indent correctly.
>
> bye.

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

#109703 From: Aman Jain <amanjain.nitrkl@...>
Date: Thu Nov 26, 2009 6:02 pm
Subject: multiple commands in ex mode
amanjain.nitrkl@...
Send Email Send Email
 
Hi

Is there a way to specify more than one command on ex mode (when i
type ":").
e.g. right now I have to do something like
:cscope kill 0
:cscope add /path/to/cscope.out /path/to/

But I want to do it on a single line, e.g something like
:cscope kill 0 ; cscope add /path/to/cscope.out /path/to/

I used ";" "," etc to separate the two, but it doesn't work

TIA
Aman Jain

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

#109704 From: Tinou <tinoucas@...>
Date: Thu Nov 26, 2009 6:10 pm
Subject: Re: multiple commands in ex mode
tinoucas@...
Send Email Send Email
 
Aman Jain a écrit :
> Hi
>
> Is there a way to specify more than one command on ex mode (when i
> type ":").
> e.g. right now I have to do something like
> :cscope kill 0
> :cscope add /path/to/cscope.out /path/to/
>
>
:he \|

--
Tinou

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

#109705 From: Benoit Mortgat <mortgat@...>
Date: Thu Nov 26, 2009 6:34 pm
Subject: Sort quickfix list
mortgat@...
Send Email Send Email
 
Hello, users of Vim!

Just to inform you that I have developed a script that sorts entries and removes duplicates in a quickfix list.
This can be useful when a cscope search gives out unordered results with twice the same entry in a header file.

You will find the function here, hope you like it.

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


--
Benoit Mortgat
39, cours Albert Thomas
69003 Lyon, France
+33 4 27 78 31 27 / +33 6 17 15 41 58

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

#109706 From: epanda <callingelvis@...>
Date: Thu Nov 26, 2009 7:42 pm
Subject: Detect when a return follow an if instruction without bracket
callingelvis@...
Send Email Send Email
 
Hi,


I would like to detect all returns that follow an if like that :


if (condition1
                  && condition 3 )
return

or


if (condition1
                  && condition 3 )
// COMMENT
/*
*
*  ANOTHER COMMENT
*
*/
return


Thanks

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

#109707 From: David Brown <vim@...>
Date: Thu Nov 26, 2009 7:56 pm
Subject: Re: Sender header
vim@...
Send Email Send Email
 
On Fri, Nov 27, 2009 at 04:06:32AM +1100, Ben Schmidt wrote:

>It seems the 'Sender' header has gone missing from posts that are sent to me.
It
>used to always be included, with the list address as the sender, and today it
>started no longer being included. My email filters now don't work.
>
>Anyone know anything about this? A weird inexplicable Google Groups thing?
>Something we could/should follow up? Something our list admins have changed?

Well, something weird definitely happened, since I seem to have been
magically resubscribed to this list after several years away.

David

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

#109708 From: epanda <callingelvis@...>
Date: Thu Nov 26, 2009 8:27 pm
Subject: Re: Detect when a return follow an if instruction without bracket
callingelvis@...
Send Email Send Email
 
On 26 nov, 20:42, epanda <callingel...@...> wrote:
> Hi,
>
> I would like to detect all returns that follow an if like that :
>
> if (condition1
>                  && condition 3 )
> return
>
> or
>
> if (condition1
>                  && condition 3 )
> // COMMENT
> /*
> *
> *  ANOTHER COMMENT
> *
> */
> return
>
> Thanks


I detect this case

if ()
return

with that regexp :       )\(\s\{0,20}\n\{0,20}\s\{0,20}\)\{0,20}return

How can I complete the rgexp to detect this case
if()
//
/* ***
********/
return

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

#109709 From: Ismael Barros² <razielmine@...>
Date: Thu Nov 26, 2009 9:17 pm
Subject: Re: Need help to design Vim T-shirts
razielmine@...
Send Email Send Email
 
On Thu, Nov 26, 2009 at 12:28 PM, Kazuo Teramoto <kaz.rag@...> wrote:
> MyFonts say it is Courier Regular (http://www.myfonts.com/WhatTheFont/)

Wow. awesome service, thanks a lot!

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

#109710 From: Aman Jain <amanjain.nitrkl@...>
Date: Thu Nov 26, 2009 9:23 pm
Subject: Re: multiple commands in ex mode
amanjain.nitrkl@...
Send Email Send Email
 
On Nov 26, 1:10 pm, Tinou <tinou...@...> wrote:
> Aman Jain a crit :> Hi
>
> > Is there a way to specify more than one command on ex mode (when i
> > type ":").
> > e.g. right now I have to do something like
> > :cscope kill 0
> > :cscope add /path/to/cscope.out /path/to/
>
> :he \|
This leads me to help of "pattern", but I think I don't need those.
I would like to run n ex commands in a single go, rather than
specifying them n times.
>
> --
> Tinou

TIA
Aman Jain

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

#109711 From: Tuo Pe <tuo_pe@...>
Date: Thu Nov 26, 2009 9:25 pm
Subject: <LocalLeader> & xmledit
tuo_pe@...
Send Email Send Email
 
Hello!

xmledit <http://www.vim.org/scripts/script.php?script_id=301> defines many
useful text-editing commands, one of them being "Delete Tag" (\d). However, I
would prefer some other "leader character", as '\' is cumbersome for me to type.
I would like to have ',' (comma) as the leader character for XML-files. How do I
change the setting?

I've read the page
<http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_3%29>. It
states that,
"Vim replaces <Leader> with the 'mapleader' value only when defining the map and
not when the map is invoked. This means that after several map commands are
defined if the 'mapleader' variable is changed, it will not affect the
previously defined maps."

So I figure that I need to change the setting in ~/.vim/ftplugin/xml.vim file,
before
  `nnoremap <silent> <buffer> <LocalLeader>'
commands. I tried to insert this line
  let maplocalleader = ","

right after the line
  let b:did_ftplugin = 1 (line 28 in my file).
But that didn't work. So what would be the correct place to make the change?

Thanks for anyone taking time with this.

Best vimshes,
Tuomas




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

#109712 From: Tim Chase <vim@...>
Date: Thu Nov 26, 2009 9:35 pm
Subject: Re: multiple commands in ex mode
vim@...
Send Email Send Email
 
Aman Jain wrote:
>>> Is there a way to specify more than one command on ex mode (when i
>>> type ":").
>>> e.g. right now I have to do something like
>>> :cscope kill 0
>>> :cscope add /path/to/cscope.out /path/to/
>> :he \|
> This leads me to help of "pattern", but I think I don't need those.
> I would like to run n ex commands in a single go, rather than
> specifying them n times.

The help location should have been

    :help :bar

-tim


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

#109713 From: Andy Wokula <anwoku@...>
Date: Thu Nov 26, 2009 9:55 pm
Subject: Re: Detect when a return follow an if instruction without bracket
anwoku@...
Send Email Send Email
 
epanda schrieb:
>
> On 26 nov, 20:42, epanda <callingel...@...> wrote:
>> Hi,
>>
>> I would like to detect all returns that follow an if like that :
>>
>> if (condition1
>>                  && condition 3 )
>> return
>>
>> or
>>
>> if (condition1
>>                  && condition 3 )
>> // COMMENT
>> /*
>> *
>> *  ANOTHER COMMENT
>> *
>> */
>> return
>>
>> Thanks
>
>
> I detect this case
>
> if ()
> return
>
> with that regexp :       )\(\s\{0,20}\n\{0,20}\s\{0,20}\)\{0,20}return
>
> How can I complete the rgexp to detect this case
> if()
> //
> /* ***
> ********/
> return

Pattern for a C-comment (with leading slash for the search command):
     /\/\*\_[^*]*\*\+\%(\_[^\/*]\_[^*]*\*\+\)*\/

Pattern for a Line-comment:
     /\/\/.*\n

You want something like:
     /)\_s*\%(\%(C-comment\|Line-comment\)\_s*\)\{-}return

Now, "C-comment" and "Line-comment" replaced with the real patterns:
/)\_s*\%(\%(\/\*\_[^*]*\*\+\%(\_[^\/*]\_[^*]*\*\+\)*\/\|\/\/.*\n\)\_s*\)\{-}retu\
rn

hth, no warranty.

--
Andy

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

Messages 109684 - 109713 of 109713   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help