Re: VimWin

2007-04-21 Thread Dimitar
* A.J.Mechelynck <[EMAIL PROTECTED]> [070421 10:20]:
> Zhichao Hong wrote:
> >I am aware of the the cream project.  Unfortunately they are the gnu
> >compilers.  As I have a professional Visual C++ compiler, and Vim is
> >such as great tool, I would like to compile it with the latest
> >professional tool.  I don't intent to stir flame war between gnu and
> >microsoft compilers.  Also, cream does not always update to the latest
> >patch.  There is a delay sometimes I could not wait.
> [...]
> 
> It doesn't hurt to have more than one supplier for a single product, so your 
> contribution is welcome. However, 
> please understand that the higher price tag on the VC++ compiler, or the 
> "Professional" label on its box, don't 
> necessarily make it a higher-quality product than the open-source gcc 
> compiler. Tagging a product "Professional" 
> and upping its price are purely "commercial" ("merchandising", "marketing") 
> methods to make the gullible customer 
> _believe_ that the product is of a higher quality. In my experience, when it 
> goes about the computer world, more 
> often than not the product in question is of _lower_ quality than the 
> open-source (almost-)free equivalent.
> 
> Cases in point:
> - Microsoft Windows XP Professional (I haven't tested Vista, but from what I 
> hear it could also serve here) vs. 
> openSUSE Linux.
Sorry for the off topic.

I have nothing against Linux at all.(I'm using it as my standard
operating system).
But I must admit that Windows and MacOS are far ahead from Linux in
the graphics area. The X server is somehow not worthy to compare with
the graphic environments of the other two. 
OpenOffice is usable and has a lot of futures but it just looks bad.
Free Software is in the most cases not as good as proprietary,
especially when the X server is involved.  

Exceptions:
> - Internet Explorer vs. Firefox.
> - Notepad vs. gvim.
  - Visual Studio vs. Eclipse
> - Etc...

So stay realistic, you are not aware of if and how much Mingw is
better then Microsoft's compiler. 

Best Regards,
Dimtar

> 
> 
> Best regards,
> Tony.
> -- 
> Mollison's Bureaucracy Hypothesis:
>   If an idea can survive a bureaucratic review and be implemented
> it wasn't worth doing.


Re: VimWin

2007-04-20 Thread Dimitar
* A. S. Budden <[EMAIL PROTECTED]> [070420 20:50]:
> Dear Zhichao,
> 
> On 20/04/07, Zhichao Hong <[EMAIL PROTECTED]> wrote:
> >Hi, all,
> >
> >I have been using Vim on the Win32 platform for a few years (since
> >version 5.0).  I enjoyed this program greatly.  The Win32 build
> >normally does not get patched frequently and the users on that
> >platform cannot take the advantages of the bug fixes as frequently as
> >UNIX user could have.  So I normally maintains my own vim build with
> >the latest patches for my personal use.  Now I would like to share
> >this with the users.  The result from this effort is that I have
> >created the the vimwin project at sourceforge (
> >http://sourceforge.net/projects/vimwin).

The Cream project also provides binaries for windows:
http://cream.sourceforge.net/
There are also some other binaries for windows out there.

> >
> >Here is the project will help:
> >  * Compile Vim on Win32 with the latest VC++ compiler (VC8.0)
> >  * Compile Vim with the latest patches
> >  * Add misc enhancement that are not available from the original vim.
> > And the source code for the changes/enhancement are always made open
> >and available.
> >
> >The first release I created has the Vim compiled using VC8.0 with
> >patches up to 224.  It has the enhancement that can toggle the vim
> >into/out of full screen mode.   The F11 is the magic key.
> >
> >You can try this by downloading the software from
> >http://sourceforge.net/projects/vimwin and please provide feedback.
> 
> I have just installed your version of vim, but I can't figure out how
> to switch it into full screen mode.  I currently have F11 mapped (and
> I don't wish to change this), so I guess that this is part of the
> problem, although I have tried removing that line from my _vimrc and I
> still can't get into full screen mode.  If I run "gvim -u NONE" it
> works okay.
> 
> I have tried 'grepping' first the doc/ dir and then the whole vim70
> directory, but I can find no relevant mention of full ?screen, so I'm
> not sure how I can get this to work with my vimrc.
> 
> Can you tell me the command that  is linked to in the default
> build so that I can test it and/or assign it to another key
> combination please?  I've tried running "gvim -u NONE" and then typing
> "map ", but it says "no mapping found", implying there is
> something more cunning going on that I don't understand!

I think on Windows :simalt ~x should do it.

> 
> Many thanks in advance,
> 
> Al


Re: [Help]How can I add some char before a block?

2007-04-13 Thread Dimitar
I normally use a plugin for commenting:
http://www.vim.org/scripts/script.php?script_id=23
For inserting chars before a block I use ctrl-v 
and then I to insert code.

,
Dimitar


* 陈方荣 <[EMAIL PROTECTED]> [070413 07:10]:
> Hi all,
>     How can I add some char before a block?
>     Just like C++ comment.
>     
>     Before:
>     Comment line1
>     Comment line2
>     Comment line3
>     Comment line4
> 
>     After:
>     //Comment line1
>     //Comment line2
>     //Comment line3
>     //Comment line4
>     
> Thanks.
> 
> ---
> Best regards
> chenfangrong
> 
> 


Re: meta offtopic: UTF-8/vim/mutt/mrxvt

2007-04-13 Thread Dimitar
Hi,
you can look at this manual here:
http://wiki.mutt.org/?MuttFaq/Charset

I think it is your terminal or your locale settings.
It didn't work for me with normal xterm so I had to use uxterm.
You can try if it works for you too.
Secondly, some email clients don't set the charset correctly.
Mutt has to guess it, so may be you have to set:

set config_charset=utf-8

in your .muttrc
But read the wiki and the manual it is explained more detailed there.

Some text for testing:

Jede Frau möchte lieber schön als klug sein, weil es so viele dumme
Männer gibt und so wenig blinde. 
Françoise Rosay, französische Schauspielerin

and translated in Cyrillic:

Всяка жена иска по-добре да е красива отколкото умна, защтото има
толкова много глупави мъже и толкова малко слепи.

The encoding of this email has to be utf-8
I hope this helps,
Dimitar





* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [070413 07:10]:
> Hi,
> 
>  sorry for this meta offtopic question...but I need informations about
>  some internals of vim...
> 
>  I am using mutt to compose and read mail. The editor for this is vim
>  (surprised? :) Mutt/Vim are running on/in/at/on top off/with (or what
>  else the correct preposition is... X-) mrxvt. And all this is running
>  on a Linux 2.6.20.6 Gentoo Linux.
> 
>  Now: When I am receiving mail containing german umlauts, they will be
>  displayed as "\" inside mutt.  Inside vim these mails are
>  displayed correctly when cited -- most of the times. But in some
>  cases the umlauts also get corrupted.
> 
>  Entering umlauts in vim is also no problem.
> 
>  Entering umlauts on the commandlind (zsh/mrxvt) also displayed them
>  correctly. Filenames containing umlauts are displayed...hrmmm...
>  encrypted but will be correctly expanded () when using the zsh
>  completion system.
> 
>  These mix of "it works" and "it does not work" confuses me.  Would
>  vim be able to display german umlauts correctly if the system
>  completly ignores/does not know of  UTF-8 ?
> 
>  What is the trick I am missing to display german umlauts correctly
>  with mutt? There are recipes out there in the internet which
>  discribes the _complete_ change from ASCII to UTF-8 for mutt. But
>  these recipes describes more or less the change either on base of a
>  totally UTF-8 aware system (which seems not applicable in my case) or
>  the a complete recompilation of the whole system as a migration 
>  from ASCII to UTF-8 ... which seems not to be needed in my case.
> 
>  The basic question is for me: How can vim display german umlauts
>  correctly if the world outside of vim seems not to be completly
>  UTF-8 aware? What do I need to change in the chain ?
> 
>  Thank you very much for your help in advance!
>  Keep editing!
>  mcc
> 
> 
> 
> 
> -- 
> Please don't send me any Word- or Powerpoint-Attachments
> unless it's absolutely neccessary. - Send simply Text.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> In a world without fences and walls nobody needs gates and windows.


Re: replace word from buffer

2007-04-06 Thread Dimitar
A search and replace would be of course sometimes better:

:%s/old_word/new_word/gc

:help :s
:help s_flags

Dimitar



* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [070406 09:00]:
> Hi,
> 
>  is there a way to do this more effectively?
> 
>  I often get in the situation of yanking a word
>  into the buffer, search another word I want to
>  replace with the contents of the buffer, delete
>  the found word and paste the contents of the buffer
>  at the place of the previously found word.
> 
>  Despite the fact, that -- without the yank-ring
>  script -- you have to keep an eye on what is
>  in what buffer, it would be more effective
>  if one could do the following:
>   
>  yw"yank replacement word
>  /word "find word ("word") to be replaced
>  cw"change word under cursor with that in buffer
> 
>  I know, that "cw" is another command, which is "wrong" in 
>  this case...I only needed a name for what I want to do and
>  cw keeps track of the length of the replaced word and the
>  replacement.
> 
>  Thank you very much for any helpful hint :)   !
> 
>  Keep editing!
>  mcc
> -- 
> Please don't send me any Word- or Powerpoint-Attachments
> unless it's absolutely neccessary. - Send simply Text.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> In a world without fences and walls nobody needs gates and windows.


Re: replace word from buffer

2007-04-06 Thread Dimitar
What I do is

ye " yank
/word  " search
vep" paste

Gruss,
Dimitar

* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [070406 09:00]:
> Hi,
> 
>  is there a way to do this more effectively?
> 
>  I often get in the situation of yanking a word
>  into the buffer, search another word I want to
>  replace with the contents of the buffer, delete
>  the found word and paste the contents of the buffer
>  at the place of the previously found word.
> 
>  Despite the fact, that -- without the yank-ring
>  script -- you have to keep an eye on what is
>  in what buffer, it would be more effective
>  if one could do the following:
>   
>  yw"yank replacement word
>  /word "find word ("word") to be replaced
>  cw"change word under cursor with that in buffer
> 
>  I know, that "cw" is another command, which is "wrong" in 
>  this case...I only needed a name for what I want to do and
>  cw keeps track of the length of the replaced word and the
>  replacement.
> 
>  Thank you very much for any helpful hint :)   !
> 
>  Keep editing!
>  mcc
> -- 
> Please don't send me any Word- or Powerpoint-Attachments
> unless it's absolutely neccessary. - Send simply Text.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> In a world without fences and walls nobody needs gates and windows.


Re: creating your own indent markers

2007-04-05 Thread Dimitar
May be what you need is:

:help cinoptions-values

if you are using cindent

Regards,
Dimitar

* Eric Leenman <[EMAIL PROTECTED]> [070406 08:10]:
> Hi,
> 
> Is it possible to redefine (or adjust) some of the indent markers.
> I have code containing  ( at the end
> I.e:
> port map (
>  aa => bb,
>  cc => dd);
> 
> 
> when I indent the file with gg=G it get indented so that
> aa is below the ( character and not indented two spaces from port map.
> (I've showned it below but not sure it's aligned right when displayed in all 
> mail clients)
> port map (
>   aa => bb,
>   cc => dd);
> 
> Can you tell vim that it should indent from the p of port iso the (?
> 
> Rgds,
> Eric
> 
> _
> Download Messenger. Join the i?m Initiative. Help make a difference today. 
> http://im.live.com/messenger/im/home/?source=TAGHM_APR07


Re: mapping for jumping to a tag

2007-04-01 Thread Dimitar
* Tobia <[EMAIL PROTECTED]> [070401 11:30]:
> Dimitar wrote:
> > * Tobia <[EMAIL PROTECTED]> [070331 20:35]:
> > > :mapworks here.
> >
> > Did you try this in a help file?
> > :help
> > then go to a tag and press c-j
> 
> Yes, I tried it in a help window, both in console Vim and in GVim,
> before posting.  I don't know where else I can find tags!
> 
> Try starting vim -u NONE / gvim -U NONE and see if the problem persists.

It works. It seems to be a plugin I'm using.
Thanks for the help. I think I can fix it now.

Dimitar 

> 
> 
> Tobia


Re: mapping for jumping to a tag

2007-04-01 Thread Dimitar
* Tobia <[EMAIL PROTECTED]> [070331 20:35]:
> Dimitar wrote:
> > I also tried to map c-j to c-] but it also didn't work.
> 
> Uh?  :mapworks here.
Did you try this in a help file?
:help
then go to a tag and press c-j

 Works for me too but I hoped I can use the c-j, I do not know
why should there be a problem with nomodifiable files like vimhelp

Dimitar



mapping for jumping to a tag

2007-03-31 Thread Dimitar
Hello,
I have a small question here, hope someone helps.

I have the following mapping in my .vimrc:

nmap  :exe "tag ". expand("")

As you see I use ctrl-j to jump to a tag because on a German keyboard
for doing ctrl-] I have to break my fingers and press ctrl-altgr-9.

The mapping works fine for normal files but I cannot use it for the
vim help. The error I get there is:

E21: Cannot make changes, 'modifiable' is off

But ctrl-] works also in help files. I also tried to map c-j to c-]
but it also didn't work. Can someone help?

Thanks,
Dimitar



Re: Undo Levels Reset

2007-03-24 Thread Dimitar
* Vigil <[EMAIL PROTECTED]> [070323 22:20]:
> When a file is saved with :w, any changes in the undo history are lost and I 
> can't undo things to get back to a 
> state before I saved the file. 

It happens sometimes to me too. However I cannot reproduce it.

Yours,
Dimitar

>How can I prevent the history being lost?
> 
> -- 
> 
> .


Re: How to convert all the buffers into tab

2007-03-15 Thread Dimitar
* lin q <[EMAIL PROTECTED]> [070315 19:50]:
> Hi,
>  I usually have such problem: in VIM7 i have many files opened in old way, 
> meaning they are in buffers, now I want 
> to have them opened in TAB, each tab has one buffer.
> 
> Is there a simple way to do this?

Take a look at thisi, it may help:

http://www.vim.org/scripts/script.php?script_id=1639

http://www.vim.org/tips/tip.php?tip_id=1317



> 
> Thanks.
> 
> _
> Rates near 39yr lows!  $430K Loan for $1,399/mo - Paying Too Much? Calculate 
> new payment 
> http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226&moid=7581


Re: How can a script know if we're running without X ?

2007-03-14 Thread Dimitar
* A.J.Mechelynck <[EMAIL PROTECTED]> [070314 07:50]:
> How can a Vim script know if we're running without an X connection?

What about if has('gui') ?

> 
> Of course, some cases are obvious, such as
> 
>   if has('unix') && !has('x11')
> 
> meaning we're on Unix with no X11 support compiled-in.
> 
> But what about an X-enabled Vim running in console mode, either with the -X 
> command-line switch, or in a terminal 
> with no access to an X server?
> 
> For instance, I might want to map the following
> 
>   :map  cc+
> 
> in my vimrc, to replace the current line with the clipboard. However that 
> mapping should not be enabled if we have 
> no access to the clipboard. So I wrap it in
> 
>   if has("clipboard") && (&term != "linux")
>   :map  cc+
>   :imap  cc+
>   endif
> 
> which takes care of two cases:
> - running with no clipboard support compiled-in
> - running in the (non-X) linux console (aka /dev/tty)
> It doesn't take care, however, of the case when an X-enabled Vim was started 
> as "vim -X" in an xterm. Is there a 
> way to check for that in vimscript?
> 
> 
> Best regards,
> Tony.
> -- 
> The government [is] extremely fond of amassing great quantities of
> statistics.  These are raised to the _nth degree, the cube roots are
> extracted, and the results are arranged into elaborate and impressive
> displays.  What must be kept ever in mind, however, is that in every
> case, the figures are first put down by a village watchman, and he puts
> down anything he damn well pleases.
>   -- Sir Josiah Stamp


Re: Any way to have multiple setfiletype's?

2007-03-08 Thread Dimitar
* Kevin Old <[EMAIL PROTECTED]> [070308 18:40]:
> On 3/8/07, Kevin Old <[EMAIL PROTECTED]> wrote:
> >Hello everyone,
> >
> >I've recently found the new HTML.zip
> >(http://www.vim.org/scripts/script.php?script_id=453) utility and want
> >to use it with my setup.  By itself HTML.zip works fine.
> >
> >Thing is, I use HTML::Mason as my template language for Perl and I
> >have my setfiletype defined in filetypes.vim as:
> >
> >au! BufRead,BufNewFile *.htmlsetfiletype mason
> >
> >But, when it's defined this way, I'm not able to use the HTML.zip as
> >it's not loaded.
> >
> >Is there any way I can have the best of both worlds and have my mason
> >syntax highlighting and the usage of HTML.zip?
> >
> >Thanks for any help,
> >Kevin
> >--
> >Kevin Old
> >[EMAIL PROTECTED]
> >
> 
> After reading this, I think I should ask it a different way.  I'll
> want to set my filetype to html so that it gets the functionality from
> HTML.zip, but would like to keep my mason syntax highlighting.  To get
> this to work, each .html file I open I have to execute :set
> syntax=mason and I get what I want.

A way to do it would be to define a function:

function! AutoHTML()
   set filetype html
   set syntax=mason
endfunction

au! BufRead,BufNewFile *.htmlAutoHTML()


> 
> I'd like to figure out a way to do this automatically.
> 
> Thanks,
> Kevin
> 
> 
> -- 
> Kevin Old
> [EMAIL PROTECTED]

Regards 
Dimitar



search() in vim7

2006-04-21 Thread Dimitar Jordanov
Hello,
 I wanted to ask if something changed in the search() function in vim7
 I have a script that uses search('.') The problem is when search('.') is 
called from this script I lose the search I have done with /
 Has anyone an idea?
 Onemore question: Is it possible in vim7 to have the tablne to the right or at 
the bottom? I don't like it when it is above.
 
 Thanks for the answers
 Regards Dimitar




***SPAM*** winmanager vim7

2006-04-15 Thread Dimitar Jordanov
Hi there,
I find the winmanager a pretty useful plug-in. 
I think there is a bug in it that makes me lose my
last search pattern.
How I reproduce it:
Open gvim, open a file and search for something. Open
the winmanager :WManager. Split "sp ." Close the
winmanager and reopen it. Browse trough the directories.
The search pattern is lost. When I press n to find
the next match I get E486: Pattern not found
^\d{3}\/.
Im using gvim7.0d netrw v86 and the last version from
winmanager
I have no idea why it happens. Can somebody reproduce
it?

Regards Dimitar