Tony Mechelynck | 1 Jun 2009 04:18
Picon
Gravatar

Re: pressing <F1> saves the editing file without the possibility to undo


On 26/05/09 19:03, Matt Wozniski wrote:
[...]
> 'hidden' is definitely an option that I would recommend that everyone
> set in his vimrc.
>
> ~Matt

I wouldn't. I don't like having hidden, maybe unsaved, files, that 
aren't displayed in a window. Personally I set 'autowriteall', and it 
makes my editing more pleasant, but I wouldn't recommend that to 
everyone either: what this option does is save the file rather than hide 
it or |abandon| it. The alternative, with none of 'hidden', 'autowrite' 
or 'autowriteall', is the default behaviour: if you try to "abandon" a 
window which contains a modified file, and your ex-command doesn't end 
in an exclamation mark, Vim will protest and refuse to close the window. 
You can then decide whether to save the file (e.g. by using :wq or :x 
rather than :q, or :w|e foobar rather than :e foobar), or not (:q! or 
:e! foobar), before closing the window or reusing it for a different file.

What I would certainly _not_ recommend is forcing the help window to 
close all other windows, as the OP found that his after-plugin did: that 
would defeat the |+windows| feature of Vim: imagine a Vim version where 
you can open split-windows with no problem _but_ they all disappear if 
you use the help? The mere notion makes me shudder.

Rather, I use the following to have the help window (if any) positiopned 
more or less "predictably" (i.e. always at the bottom, unless of course 
I later open a new split-window under it):

(Continue reading)

wilson.m.liu | 1 Jun 2009 08:12
Favicon

How to repeat motion commands


Hi,
We can use "." to repeat the last editing command, however I do not know how we can repeat the last motion command.
Supposing that we are reading a long story and using CTRL+D/U to scroll, is there a better way instead of pressing the
keys again and again.

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

Picon

Re: How to co-editing?


Saluton Yue :)

On Sun 31 May 2009 02:07, Wu +0200, Yue <v... <at> gmail.com> dixit:
> On Sat, May 30, 2009 at 06:42:17PM +0200, Raúl Núñez de Arenas
> Coronado wrote:
>> If you think you need to show the changes dynamically (and
>> instantaneously, I assume), maybe VCS's are not the way to go, but on
>> the other hand maybe you should think again about your needs about
>> how to solve your problem.
>>
>> Again, if you could elaborate a bit more about your particular
>> problem, we would be more proficient giving you help. I understand
>> that maybe you cannot reveal details (if this is for some job, for
>> example), but if you can, tell us and probably we will be able to
>> help better :)
>
> For example, if I'm editing a file, and the file has been modified by
> external tool, say echo foo >> file, since the last time I haved
> saved, then now after I'm finishing the editings and want to write the
> file to disk, then vim will warn that file has been changed, what
> should I do? 1) Abandon my editing; 2) Abandon the changes by external
> tool. Both of them are not so good.

What I don't understand is why do you need to do things that way. I
mean, why your file may be modified by external tools or why another
person has to edit the same copy of the file you are editing too.

If both you and your coworkers need to edit the same files because
everybody is working in *different* parts of them (for example, when
doing collaborative development) then VCS is the best solution. Each
person has his own copy of the data and from time to time all of them do
commits, merges are performed, etc.

If the problem is that you have some files that anyone may edit at any
point in time, you actually *DO NEED* to see the changes other are
making in their copies and show them on YOUR copy. There is no easy
solution to this problem, specially on UNIX, because it is a very
dangerous thing to do.

In this case and in my humble opinion, you need a change in the way you
work to avoid having to modify files concurrently. It is dangerous
unless *everybody* uses the same tool for modifying the files *and* that
tool has been designed for such job (concurrent editing). I've read the
other messages you've written about the issue and from my point of view
the problem is that you shouldn't be doing concurrent edition ;)) If you
have to do it (we can't always choose how to work, unfortunately), look
for a tool designed to do concurrent edition or sooner or later you will
get a nasty surprise: lost data. If you want me to I can explain what
kind of data losing you may suffer, but I'll do in a private email
because that would be offtopic :)

--

-- 
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

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

Younes ZOuhair | 1 Jun 2009 07:47
Picon

Re: vim spelling check does not flag the typo "valueable"?


Peng Yu wrote:
> Hi,
> 
> The spelling check in the vim (7.0) that I'm using does not flag
> "valueable" as a typo. I'm wondering if this is a bug in the
> dictionary used by vim or it is because of some other problems.
> 
> Regards,
> Peng
> > 
> 

Maybe you don't have the right dictionary.

:set spelllang=en

If you don't have it it'll get downloaded.

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

wilson.m.liu | 1 Jun 2009 09:12
Favicon

Wildcard not available in sfind path?


Hi,
When I set a path by ":set path=..." and use "sfind" to edit one file in the directory, wildcard in the file name seems
not working. That is to say, when I type ":sf Sample.txt" for example, it opens the file successfully. However, when I
type ":sf Sam*.*"(This pattern uniquely refers to one file), it amazingly shows an error displaying no match. I am puzzled
whether we can use wildcard in sf path.
I am using Vim 7.2 on Windows XP.

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

Dominique Pellé | 1 Jun 2009 09:13
Picon

Re: Status Line


Ricky wrote:

> Hi
>
>   I want to see the caps lock's status more easily,  how to display caps
> lock status in status line?
>   It seems that vim don't support.

You can query the status of the LEDs (LED caps lock among other
things) with the Linux command "xset q".

I tried the following but it is not fully satisfactory.  Perhaps someone
can improve on it:

func! ShowCapsLockStatus()
  let xs = system('xset q')
  let mask = matchstr(xs, 'LED mask:\s*\zs\d\+')
  return ((mask % 2) == 0) ? 'off' : 'on'
endfunction

Then you can add something like this in your status line:

set statusline+=%{ShowCapsLockStatus()}        " show caps lock status

However, it is far from being ideal:
- the statusline is not refreshed immediately when pressing Caps-Lock
  (you need to move the cursor for example to see it being refreshed)
  There is no asynchronous event to notify when Caps-Lock key was
  pressed as far as I know.
- ShowCapsLockStatus() messes up display in xterm terminal
  when I move the cursor with the up, down, left, right keys.  I see some
  ^[OA or ^[OB showing up on the screen.  Why?
  Pressing CTRL-L or :redr! makes them disappear.
  I don't see that in gvim.
- And of course "xset q" will only work on Linux

Regards
-- Dominique

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

John Beckett | 1 Jun 2009 09:35
Picon

RE: Wildcard not available in sfind path?


wilson.m.liu wrote:
> When I set a path by ":set path=..." and use "sfind" to edit
> one file in the directory, wildcard in the file name seems
> not working. That is to say, when I type ":sf Sample.txt" for
> example, it opens the file successfully. However, when I type
> ":sf Sam*.*"(This pattern uniquely refers to one file), it
> amazingly shows an error displaying no match. I am puzzled
> whether we can use wildcard in sf path.

Yes you can use a wildcard in :find and :sfind, however, it
searches directories in the 'path' option, so the first step
would be (the second shows where set, if it has been):

  :set path?
  :verbose set path?

John

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

John Beckett | 1 Jun 2009 09:35
Picon

RE: How to repeat motion commands


wilson.m.liu wrote:
> We can use "." to repeat the last editing command, however I
> do not know how we can repeat the last motion command.
> Supposing that we are reading a long story and using CTRL+D/U
> to scroll, is there a better way instead of pressing the keys
> again and again.

Unfortunately, no.

You could map the space bar to something handy.

And we have this tip:
http://vim.wikia.com/wiki/Automatic_scrolling_of_text

John

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

wilson.m.liu | 1 Jun 2009 09:53
Favicon

Cannot visit vim tips wiki


Hi,
I found that I cannot visit http://vim.wikia.com/wiki/Automatic_scrolling_of_text. Recently, I tried many times to
connect to vim wiki, however failed. I don't know why, and if there is any other way to get the information.

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

wilson.m.liu | 1 Jun 2009 10:00
Favicon

RE: Wildcard not available in sfind path?


vim_use <at> googlegroups.com wrote on 06/01/2009 03:35:13 PM:

>
> wilson.m.liu wrote:
> > When I set a path by ":set path=..." and use "sfind" to edit
> > one file in the directory, wildcard in the file name seems
> > not working. That is to say, when I type ":sf Sample.txt" for
> > example, it opens the file successfully. However, when I type
> > ":sf Sam*.*"(This pattern uniquely refers to one file), it
> > amazingly shows an error displaying no match. I am puzzled
> > whether we can use wildcard in sf path.
>
> Yes you can use a wildcard in :find and :sfind, however, it
> searches directories in the 'path' option, so the first step
> would be (the second shows where set, if it has been):
>
>   :set path?
>   :verbose set path?
>
> John
>
>
> >
Hi,
I am not clear about what ":set path?" mean. Would you please make some explanation?

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


Gmane