Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim · Vim (Vi IMproved) text editor users list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 106276 - 106305 of 137787   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#106276 From: googler <pinaki_m77@...>
Date: Sat Aug 1, 2009 7:25 am
Subject: highlighting text between marks
pinaki_m77@...
Send Email Send Email
 
I have two marks, say a and b. I want to highlight the text between
(and including) a and b. I tried to use the match command like this
:'a,'b match MyGrp /.*/
I know accessing marks with ' (instead of `) will not be accurate to
the resolution of the exact characters, but I was hoping to get at
least the lines highlighted. But it doesn't work.

How do I do this? It is best if it highlights only the portion of text
bounded by the marks and not the entire line.

BTW, does any plugin exist where I can select a part of text in visual
mode (say using the mouse) and pressing some specific key will
highlight this text?

Thanks.

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

#106277 From: Teemu Likonen <tlikonen@...>
Date: Sat Aug 1, 2009 11:46 am
Subject: Re: highlighting text between marks
tlikonen@...
Send Email Send Email
 
On 2009-08-01 00:25 (-0700), googler wrote:

> I have two marks, say a and b. I want to highlight the text between
> (and including) a and b. I tried to use the match command like this
> :'a,'b match MyGrp /.*/

Try this first:

     :help /\%'m

For example:

     :match ErrorMsg /\%'a\_.*\%'b/

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

#106278 From: Markus Heidelberg <markus.heidelberg@...>
Date: Sat Aug 1, 2009 5:07 pm
Subject: Re: vim patchs - why not a big-patch?
markus.heidelberg@...
Send Email Send Email
 
Hi,

Marc Weber, 19.07.2009:
> It's nice to see that you respond that fast!

Heh, not always :)
I was pretty busy the last days.

> Would you mind me collecting all major vim patches which maybe will
> never be merged into mainline?

That would be nice. I've always appreciated some help with this, but
lost interest in looking at more patches myself.

> I'd like to create top-git branches for them

I've never used topgit or another tool on top of git.
What's the benefit? Why not just ordinary git branches? This would also
add another dependency for users, wouldn't it?

> maybe pushing them to your repo?

Sure.

> The vim wiki could be used to explain which branch adds which features
> and how stable a branch is.

Currently there is a online description for each branch, but further
information could go into a wiki page or something to not overload the
repo page.
I guess you already know about
http://groups.google.com/group/vim_dev/web/vim-patches

> The idea is to make patch writers responsible to keep their patches
> upstream.

That was my initial idea back then, that the patch authors could have
some kind of upstream, where they can send their patches to and
everybody could find them.

> vim-dev list: Do you think it's ok to add a pointer on vim.org download
> page telling about this "vim-experimental-maybe-next" wiki page?

I have no objections to it.
I planned to ask for a link to the vim_mainline/vim_extended
repositories. But I planned to do it after the rewrite, which hasn't
been done yet and may not be done in the near future.

> My goal is that trying out a new feature is as easy as:
>   git clone ...
>   git checkout branch
>   ./configure --enable-...
>   make

It already is as easy.

> Of course I don't want to force anyone using git if they prefer bazaar.

Or another system or none at all. At least at the gitweb page of
vim_extended there are links for downloading raw patch files. But for
enjoying the advantages, of course it is the best to just use git with
this git repo.

Markus


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

#106279 From: Markus Heidelberg <markus.heidelberg@...>
Date: Sat Aug 1, 2009 5:09 pm
Subject: Re: vim patchs - why not a big-patch?
markus.heidelberg@...
Send Email Send Email
 
Ryan J M, 19.07.2009:
> There might be two reasons that I thought git repo is inconvenience
> 1) not all vimmers have git installed on their boxes.
> 2) comparing to gzip-ed or bzip-ed files, it might take more time to
> download via git.

These reasons have nothing to do with inconvenience.

Markus


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

#106280 From: Markus Heidelberg <markus.heidelberg@...>
Date: Sat Aug 1, 2009 5:15 pm
Subject: Re: vim patchs - why not a big-patch?
markus.heidelberg@...
Send Email Send Email
 
Matt Wozniski, 20.07.2009:
>
> On Sun, Jul 19, 2009 at 9:22 PM, pansz wrote:
> >
> > Tony Mechelynck 写道:
> >>
> >> This question, like all questions about compiling Vim, belongs on the
> >> vim_dev list where I'm trying to redirect it.
> >>
> >
> > Do you really think so? I don't.
>
> *shrug*, I once tried to move a question on compiling from vim-dev to
> vim-use and was admonished by Bram for it.  So, at the very least,
> Bram sides with Tony, even if you and I may find it unintuitive.  :-)

Regardless of where compile questions belong to (and I think it's
absolutely OK in vim-use), moving them to vim-dev will not work.
Since the vim lists a subscriber-only and you don't know it the person
is subscibed to both, you force him to subscribe to it to continue
discussing his questions. But it's more probably that the questions will
be forked and discussed in two ways on the two mailing lists.

Markus


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

#106281 From: KKde <khekadestroyer@...>
Date: Sat Aug 1, 2009 5:56 pm
Subject: Re: highlighting text between marks
khekadestroyer@...
Send Email Send Email
 
>
> Try this first:
>
>   :help /\%'m
>
> For example:
>
>   :match ErrorMsg /\%'a\_.*\%'b/

Cool. I never know this is possible. But what is the purpose of this
feature? Matching between sections can be achieved by line numbers

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

#106282 From: googler <pinaki_m77@...>
Date: Sat Aug 1, 2009 6:51 pm
Subject: Re: highlighting text between marks
pinaki_m77@...
Send Email Send Email
 
On Aug 1, 12:56pm, KKde <khekadestro...@...> wrote:
> > Try this first:
>
> >   :help /\%'m
>
> > For example:
>
> >   :match ErrorMsg /\%'a\_.*\%'b/
>
> Cool. I never know this is possible. But what is the purpose of this
> feature? Matching between sections can be achieved by line numbers
>
What do you mean by "Matching between sections can be achieved by line
numbers"? I guess even for matching using line numbers, a similar
syntax is to be used. For example, :match ErrorMsg /\%10l\_.*\%17l/
(to highlight lines 10 to 17). But this will highlight entire lines
and not a part of the beginning or end lines.

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

#106283 From: Paul Foster <paul.foster.au@...>
Date: Sat Aug 1, 2009 1:32 pm
Subject: :w causes 0kb random numbered file creation
paul.foster.au@...
Send Email Send Email
 
I'm using gvim 7.2 on Windows XP and Windows 7 RC1 to edit files on a mapped drive (samba share).

Whenever I save a file with :w a new randomly numbered file (4-5 chars) is created in the current directory. So after a good editing session I can have hundreds of these empty numbered files littered throughout my directory structure - which is a real pain.

It only occurs on mapped drives, not local disks.

Anyone have any idea?

Cheers,
Paul

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


#106284 From: googler <pinaki_m77@...>
Date: Sat Aug 1, 2009 8:09 pm
Subject: Re: highlighting text between marks
pinaki_m77@...
Send Email Send Email
 
On Aug 1, 6:46am, Teemu Likonen <tliko...@...> wrote:
> On 2009-08-01 00:25 (-0700), googler wrote:
>
> > I have two marks, say a and b. I want to highlight the text between
> > (and including) a and b. I tried to use the match command like this
> > :'a,'b match MyGrp /.*/
>
> Try this first:
>
>   :help /\%'m
>
> For example:
>
>   :match ErrorMsg /\%'a\_.*\%'b/

Hi, thanks for the reply. It did answer my question, but on second
thoughts, I would actually like to use the line number and column
number corresponding to each mark inside the ':match' command. So my
question is, given a mark (say `a, '<, etc), is it possible to get its
line number and column number? I have to do this because the marks I
use to define a match earlier might get redefined, in which case those
highlights will be gone.

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

#106285 From: googler <pinaki_m77@...>
Date: Sat Aug 1, 2009 8:46 pm
Subject: Possible bug in ":match" when using marks?
pinaki_m77@...
Send Email Send Email
 
Let me describe two scenarios.

First scenario:
I have made a visual selection of a text part and pressed 'Esc'. Now I
want to highlight this selection. So I do
:match ErrorMsg /\%'<\_.*\%'>/
This will highlight the text I had selected earlier. So far so good.
Now I make another visual selection in the same window. I see that
this new selection gets highlighted (which it should), but the
previously highlighted section is still highlighted. I would assume
that it would not be highlighted any more after I made another visual
selection, because the marks '< and '> have got redefined.

Second scenario:
I define two marks a and b in my text using ma and mb. Now I want to
highlight the text between these marks. So I do
:match ErrorMsg /\%'a\_.*\%'b/
This has the desired effect as the text between the marks a and b gets
highlighted. Now, I redefine these marks a and b to point to a
different part of the text. I see that the section highlighted earlier
is not highlighted any more (which is as I had expected), but the
section of the text between the new definition of marks a and b is not
highlighted either (I had expected that it would get highlighted).
However, if I do "echo getmatches()", the match command that I had
entered earlier still shows up.

So clearly, the behavior is different with the two types of marks. Is
this a bug?

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

#106286 From: Yura Machnovskii <yumaxg@...>
Date: Sun Aug 2, 2009 8:48 am
Subject: Re: editing Python files -- how to keep track of class membership?
yumaxg@...
Send Email Send Email
 
I think that next plugin can solve almost your problem:

http://vim.sourceforge.net/scripts/script.php?script_id=435

It has some known problem but as I see it was updated recently. I didn't try new version.

Best regards.

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


#106287 From: googler <pinaki_m77@...>
Date: Sun Aug 2, 2009 5:51 pm
Subject: Pls help with writing this plugin
pinaki_m77@...
Send Email Send Email
 
Hi all,

I'm trying to write a vim script (plugin) that will do the following.
When I visually select a part of the text and press the key F2, it
will highlight this text. Now I may go to other parts of the file and
highlight other sections using the same mechanism. After a while I
return to my previously highlighted section and with the cursor on it,
I press F2 again. This will remove the highlight from this section.

I have been trying to code this up but haven't been successful so far.
I don't have any experience with vim scripting before. This is what
I'm trying to do. I select the part visually. So the marks '< and '>
will have information on start and end of the selected text. Now I
call getpos() on each of these marks to get their line number and
column number and store these in variables (so that they can be used
when I want to remove highlighting). In order to highlight the text
from (line=10,col=7) to (line=24,col=33), I do :match ErrorMsg /\%10l\
%7c\_.*\%24l\%33c . But in this case, my line and column numbers are
stored in variables. So how do I use these in the match command? Is
there a way?

A related question is, is it possible to create marks not by going to
a certain position and doing a ma (for example), but just by
specifying the line and column numbers? Also, is it possible to copy a
mark a to another mark b?

Thanks.

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

#106288 From: Stahlman Family <brettstahlman@...>
Date: Sun Aug 2, 2009 6:28 pm
Subject: Re: highlighting text between marks
brettstahlman@...
Send Email Send Email
 
googler wrote:
...snip...
>
> BTW, does any plugin exist where I can select a part of text in visual
> mode (say using the mouse) and pressing some specific key will
> highlight this text?

You might have a look at the Txtfmt plugin:

http://www.vim.org/scripts/script.php?script_id=2208
http://www.freewebs.com/txtfmt

It's a token-based highlighter, which allows you to highlight ranges of
text with (configurable) colors and format attributes (e.g., bold,
italic, underline, etc...). Version 2.0 (coming soon) supports
background colors as well. There is a rich set of mappings for working
with (e.g., inserting, jumping to, etc...) the tokens that begin and end
regions. These tokens are hidden as whitespace. Version 2.0 also
supports Vince Negri's 'conceal' patch, which permits the tokens to be
hidden completely (i.e., made to occupy zero-width).

Visual mode maps have not yet been implemented, but are in the todo list...

Brett Stahlman

>
> Thanks.
>
> >
>

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

#106289 From: Raphael Jolivet <raphael.jolivet@...>
Date: Sun Aug 2, 2009 2:01 pm
Subject: Copy wxhen deleting text
raphael.jolivet@...
Send Email Send Email
 
Hi,

I am a big fan of VIM, I use it all the time.
There is just one thing that I found anoying :
Vim copy text in the clipboard whenever I dlete something.

This is anoying when you have copied some text and wwant to paste it
at several places, while delteing other text : You clipboard get
spammed with the content of what you delete !

Do you know if it is possible to disable this behavior ?

TH

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

#106290 From: Raúl Núñez de Arenas Coronado <raulnac@...>
Date: Sun Aug 2, 2009 8:30 pm
Subject: Re: Copy wxhen deleting text
raulnac@...
Send Email Send Email
 
Saluton Raphael :)

Raphael Jolivet <r...@...> dixit:
> This is anoying when you have copied some text and wwant to paste it
> at several places, while delteing other text : You clipboard get
> spammed with the content of what you delete !
>
> Do you know if it is possible to disable this behavior ?

IMHO, you shouldn't disable this behaviour, you should learn to use it
in your favor.

Whenever you delete text, it is put by default in the unnamed register
and the numbered registers. There is no such thing as an unique
clipboard in Vim, you have registers (":help registers"). If you want to
copy some text and be able to paste it later while deleting some lines
in between, doesn't just yank it to the unnamed register and the
numbered registers (using "yy" for example), but yank it to some
register you can use afterwards. Use the named registers.

For example, if you want to save a line of text to paste it later, use
"ayy to put that line in the "a" register. You have to type the double
quote, letter "a", letter "y" and letter "y". After that you can delete
lines ("dd" command) and they will be put into the unnamed and numbered
registers, not clobbering your "clipboard" (which is the "a" register
now). To paste the lines you saved to your "clipboard", use the "ap
command, that is, double quote, letter "a", letter "p".

See the help for registers to understand how this works and you will
discover that you no longer want to disable this feature, but to use to
your gain ;)

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

#106291 From: bill lam <cbill.lam@...>
Date: Mon Aug 3, 2009 12:13 am
Subject: Re: Copy wxhen deleting text
cbill.lam@...
Send Email Send Email
 
On Sun, 02 Aug 2009, Raphael Jolivet wrote:
> This is anoying when you have copied some text and wwant to paste it
> at several places, while delteing other text : You clipboard get
> spammed with the content of what you delete !

you can use "0P or "0p to paste from the real yanked text but not the
deleted text.  It is quite inconvenient to type. One shift key and one
off home position key in addition to p/P. So I use the following
mapping for paste from yank.

nmap <F8> "0P
nmap <C-F8> "0p

ymmv

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

#106292 From: David Fishburn <dfishburn.vim@...>
Date: Mon Aug 3, 2009 12:40 am
Subject: Re: Copy wxhen deleting text
dfishburn.vim@...
Send Email Send Email
 
> I am a big fan of VIM, I use it all the time.
> There is just one thing that I found anoying :
> Vim copy text in the clipboard whenever I delete something.
>
> This is annoying when you have copied some text and want to paste it
> at several places, while deleting other text : You clipboard get
> spammed with the content of what you delete !

For other conveniences as well you may be interested in my plugin:

YankRing.vim : Maintains a history of previous yanks and deletes
http://www.vim.org/scripts/script.php?script_id=1234

HTH,
Dave

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

#106293 From: "John Beckett" <johnb.beckett@...>
Date: Mon Aug 3, 2009 12:58 am
Subject: RE: Pls help with writing this plugin
johnb.beckett@...
Send Email Send Email
 
googler wrote:
> I'm trying to write a vim script (plugin) that will do the following.
> When I visually select a part of the text and press the key
> F2, it will highlight this text.

The following is NOT what you asked for, but it is similar:
http://vim.wikia.com/wiki/Highlight_multiple_words

The tip matches all occurrences of a pattern, whereas you want
to match the text between two positions.

> But in this case, my line and column numbers are stored in
> variables. So how do I use these in the match command? Is
> there a way?

See ":help :execute" and you might find some clues in some  of
the tips, but I don't think any highlight between two positions.

> A related question is, is it possible to create marks not by
> going to a certain position and doing a ma (for example), but
> just by specifying the line and column numbers?

It's useful to try ":help function-list" and search for likely
terms. It looks like setpos() might help.

John


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

#106294 From: googler <pinaki_m77@...>
Date: Mon Aug 3, 2009 6:30 am
Subject: Re: Pls help with writing this plugin
pinaki_m77@...
Send Email Send Email
 
> > But in this case, my line and column numbers are stored in
> > variables. So how do I use these in the match command? Is
> > there a way?
>
> See ":help :execute" and you might find some clues in some of
> the tips, but I don't think any highlight between two positions.
>
Thank you. This is what I needed. The execute command seems to be
pretty common as I found it in many other scripts too. It will be
helpful in the future.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#106295 From: Robert Mark Bram <robertmarkbram@...>
Date: Mon Aug 3, 2009 7:06 am
Subject: control up/down/left/right doing weird things
robertmarkbram@...
Send Email Send Email
 
Hi All,

WinXP  + Cygwin + PuttyCyg (keyboard: linux) + vim

I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or C-RIGHT..
yet:

C-UP  puts "A" on a new line
C-DOWN   puts "B" on a new line
C-RIGHT   puts "C" on a new line
C-LEFT   puts "D" on a new line

Always the same letters.. always on a line by themselves.

Any guesses as to what this might be?

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

#106296 From: "John Beckett" <johnb.beckett@...>
Date: Mon Aug 3, 2009 7:23 am
Subject: RE: control up/down/left/right doing weird things
johnb.beckett@...
Send Email Send Email
 
Robert Mark Bram wrote:
> WinXP  + Cygwin + PuttyCyg (keyboard: linux) + vim
>
> I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or
> C-RIGHT.. yet:
>
> C-UP  puts "A" on a new line
> C-DOWN   puts "B" on a new line
> C-RIGHT   puts "C" on a new line
> C-LEFT   puts "D" on a new line

Your system is sending escape sequences that Vim is not
configured to interpret. See if any of the following info
is relevant:

http://vim.wikia.com/wiki/Fix_arrow_keys_that_display_A_B_C_D_on_remote_shell
http://vim.wikia.com/wiki/PuTTY_numeric_keypad_mappings

John


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

#106297 From: Robert Mark Bram <robertmarkbram@...>
Date: Mon Aug 3, 2009 7:37 am
Subject: Re: control up/down/left/right doing weird things
robertmarkbram@...
Send Email Send Email
 
> So then I tried putting this in my .vimrc:
> set <c-left>=^[OD
> set <c-right>=^[OC

where you get the "^[" by typing CTRL-V
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#106298 From: Robert Mark Bram <robertmarkbram@...>
Date: Mon Aug 3, 2009 7:39 am
Subject: Re: control up/down/left/right doing weird things
robertmarkbram@...
Send Email Send Email
 
Thanks John!

> > I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or
> > C-RIGHT.. yet:
>
> > C-UP puts "A" on a new line
> > C-DOWN  puts "B" on a new line
> > C-RIGHT  puts "C" on a new line
> > C-LEFT  puts "D" on a new line
>
> Your system is sending escape sequences that Vim is not
> configured to interpret. See if any of the following info
> is relevant:
>
>
http://vim.wikia.com/wiki/Fix_arrow_keys_that_display_A_B_C_D_on_remo...http://v\
im.wikia.com/wiki/PuTTY_numeric_keypad_mappings

I will read these pages anyway since I have a feeling these are
related to ALT key mappings too.

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

#106299 From: Robert Mark Bram <robertmarkbram@...>
Date: Mon Aug 3, 2009 7:35 am
Subject: Re: control up/down/left/right doing weird things
robertmarkbram@...
Send Email Send Email
 
> I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or C-RIGHT..
> yet:
>
> C-UP  puts "A" on a new line
> C-DOWN   puts "B" on a new line
> C-RIGHT   puts "C" on a new line
> C-LEFT   puts "D" on a new line

OK, don't ask me why it works, but based on a previous post on the
same issue, I tried some experimentation and solved it.

Based on an earlier post on a similar issue, here is some more
information related to this.

In insert mode, I press control-V, control-left/right/up/down. The
result:

control left: ^[OD
control right: ^[[C
control up: ^[[A
control down: ^[[B

I already has this in my .bash_profile:
stty -ixon

So then I tried putting this in my .vimrc:
set <c-left>=^[OD
set <c-right>=^[OC

After that, control+left and right works now!

But this caused an error:
set <c-up>=^[OA
set <c-down>=^[OB

So.. I got what I wanted.. now to fix ALT keys..

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

#106300 From: riickcr <rickcr@...>
Date: Mon Aug 3, 2009 6:19 pm
Subject: How do I have all folds expanded by default when file opens?
rickcr@...
Send Email Send Email
 
I'm sure this is simple, but my searching the help files
Currently xml files are opening with all folds closed. I then hit 'zi'
which expands all folds. I'm searching around trying to figure out how
I can have my xml files by default open with everything expanded?

In my .vimrc I have this set:

let g:xml_syntax_folding=1

but I'm not sure how that's related as changing the number doesn't
seem to have much affect, other than that line seems to need to be
there to allow folding for my xml files?

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

#106301 From: Andrew Long <andrew.long@...>
Date: Mon Aug 3, 2009 10:12 pm
Subject: Re: How do I have all folds expanded by default when file opens?
andrew.long@...
Send Email Send Email
 
On 3 Aug 2009, at 19:19, riickcr wrote:

>
> I'm sure this is simple, but my searching the help files
> Currently xml files are opening with all folds closed. I then hit 'zi'
> which expands all folds. I'm searching around trying to figure out how
> I can have my xml files by default open with everything expanded?
>
> In my .vimrc I have this set:
>
> let g:xml_syntax_folding=1
>
> but I'm not sure how that's related as changing the number doesn't
> seem to have much affect, other than that line seems to need to be
> there to allow folding for my xml files?
>
The option 'foldlevel' sets the initial number of folds to be open when
the file is opened. I set this in my .vimrc as a global for all file
types, but you an set it on a file-by-file basis in the file type
initialisation routines.

see :he 'foldlevel' (note the apostrophes denote help for an option)

Regards, Andy
--
Andrew Long
andrew dot long at mac dot com


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

#106302 From: "R. Hicks" <sigzero@...>
Date: Mon Aug 3, 2009 10:12 pm
Subject: Re: :w causes 0kb random numbered file creation
sigzero@...
Send Email Send Email
 
On 8/1/09 9:32 AM, Paul Foster wrote:
> I'm using gvim 7.2 on Windows XP and Windows 7 RC1 to edit files on a
> mapped drive (samba share).
>
> Whenever I save a file with :w a new randomly numbered file (4-5 chars)
> is created in the current directory.  So after a good editing session I
> can have hundreds of these empty numbered files littered throughout my
> directory structure - which is a real pain.
>
> It only occurs on mapped drives, not local disks.
>
> Anyone have any idea?
>

Does

:messages

give you anything useful?


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

#106303 From: Robert Mark Bram <robertmarkbram@...>
Date: Tue Aug 4, 2009 12:23 am
Subject: mapping control+0-1 or backtick
robertmarkbram@...
Send Email Send Email
 
Hi All,

Is it possible to map to control+number or control+`?

I found these mappings didn't work.

map <C-`> :hide bn<CR>
map <C-1> :hide bn<CR>

I looked through :help keycodes and couldn't find reference to
backtick or tilde, but I have seen that you can map to the backtick by
itself. For example:

" Use backtick for escape.
:imap ` <Esc>

Thanks for any advice!

Rob
:)


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

#106304 From: Robert Mark Bram <robertmarkbram@...>
Date: Tue Aug 4, 2009 2:18 am
Subject: Cygwin vim: copy/past to clipboard solved. How about cut?
robertmarkbram@...
Send Email Send Email
 
Hi All,

Just implemented this BRILLIANT tip for copying/pasting to/from the
windows clipboard in VIM under Cygwin.
http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim

Was trying to work out how to modify the copy function to make it cut
instead. Originally, the copy function is:

function! Putclip(type, ...) range
   let sel_save = &selection
   let &selection = "inclusive"
   let reg_save = @@
   if a:type == 'n'
     silent exe a:firstline . "," . a:lastline . "y"
   elseif a:type == 'c'
     silent exe a:1 . "," . a:2 . "y"
   else
     silent exe "normal! `<" . a:type . "`>y"
   endif
   call system('putclip', @@)
   let &selection = sel_save
   let @@ = reg_save
endfunction

I tried replacing "y" with "d", but that didn't work.. can anyone
guide me as to how to make it cut?

Thanks for any advice!

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

#106305 From: Ben Fritz <fritzophrenic@...>
Date: Tue Aug 4, 2009 2:53 pm
Subject: Re: How do I have all folds expanded by default when file opens?
fritzophrenic@...
Send Email Send Email
 
On Aug 3, 5:12pm, Andrew Long <andrew.l...@...> wrote:
> The option 'foldlevel' sets the initial number of folds to be open when
> the file is opened. I set this in my .vimrc as a global for all file
> types, but you an set it on a file-by-file basis in the file type
> initialisation routines.
>
> see :he 'foldlevel' (note the apostrophes denote help for an option)
>

Actually, the option 'foldlevel' sets the number of open folds in the
current window, and the global value is used to initialize the value
for new windows. But, if you load a NEW file in the SAME window, the
old foldlevel (even if it has been modified) is used.

The better option to use is 'foldlevelstart' but even that has a few
minor disadvantages, since you can't use zm/zr right away on buffers
with folding much less than the 'foldlevelstart' value.

See http://vim.wikia.com/wiki/All_folds_open_when_open_a_file for a
discussion and alternatives.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Messages 106276 - 106305 of 137787   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

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