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...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 29851 - 29880 of 137779   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#29851 From: Colin Keith <vim@...>
Date: Mon Jul 1, 2002 10:49 am
Subject: Re: Save file w/ orig mtime?
vim@...
Send Email Send Email
 
On Mon, Jul 01, 2002 at 01:57:31AM +0000, Soren Andersen wrote:
> text but I would not be. I would typically be wanting to be
> (re)formatting some textfile (say, a news or email posting saved to my

*nod* Makes sense.
> Thank you very much for the work you put in. I have to admit I am
> puzzled by some of it. Who or what is "- sed bob" anyway? Is that a

Ignore it, its meaningless :)

> "~/vim/mtime.vim"). Then if I ':source [pathtothisfile]mtime.vim' I
> will be able to do... something ...

Correct.

> 	 openbox% vim header.js -c 'so ~/vim/mtime.vim|call append("$", "//Test")|wq'

On this line I'm opening the file and executing the commands:
  source mtime.vim   " load the instructions
  call append( ... ) " Do something to change the file
  wq                 " Save and quit as normal.

This is just because I could show it on the command line.

> Sorry but the commands are pretty opaque to me. OK ... My understanding
> is that you are in a manner typical of an expert user, combining

heh.

> several things into a very concise (and obfuscated) form: sourcing
> (':so') the new 'mtime.vim' file and calling ('call') the func 'append'
> to add the line '//Test' then issuing command ':wq!' all in one
> compound command. OK, good enough. I will play with this and see. Will

That's completely correct. It was just a compact way to say "look this was
the last modification time, and the last line of the file, now I do something
to the file and the last 2 lines are this, but the last modification time
hasn't changed"

> the mtime.vim code affect other buffers that might be open at the same
> time, because I use GVIM and usually have split windows? Will there be
> anything 'global' I have to watch out for or will only the file I've
> opened with the ':so[urce]' command be affected by the directive to
> "save with no change in mtime"?

Yes it will affect all saves. If you wanted to restrict it, change the
autocmd pattern match from * to something else. If you only wanted it to
apply to files in your mail directory (for example) you could replace the
* with a directory to match. See the help for "autocmd" for details on this.

Colin.

--
Then graphics games came along and the computer using portion of the human race
forgot all about 500,000 years of language evolution and went straight back to
the electronic equivalent of banging rocks together - the point'n'click game
  - http://www.douglasadams.com/creations/infocomjava.html

#29852 From: Paul Robins <paul.robins@...>
Date: Mon Jul 1, 2002 12:36 pm
Subject: folding: some questions and comments (long)
paul.robins@...
Send Email Send Email
 
(Please forgive me if a second, similar post to the one below appears on
this list. I lost up my original posting but I'm still not sure if it
survived somewhere in the posting process).

I'm a brand new vim user, quite excited to find a powerful, supported
text editor with a good implementation of "folding". I have however,
several comments and questions related to vims implementation of
folding. For info, I'm using exclusively foldmethod=marker.

As an ex-Inmos person, where folding was almost a religion I'm a keen
"folder". The "style" of folding used in some of those long gone editors
that I used in my youth was (IMHO) elegant and powerful. I'd like to
make vim look and behave a little more like that, if possible. For
starters, there are a couple of things I'd like to be able to do. Maybe
others may also like some of these ideas...

1) Indent folded lines to the same level as the fold's contents:

eg:

if (some test) {
     ... this stuff is folded
     ... so is this

     if (some other test) {
        ... also folded
     }
}

reads much nicer than :

if (some test) {
+--  3 lines folded:  this stuff is folded --------------------------
+--  6 lines folded:  so is this ------------------------------------

     if (some other test) {
+--  6 lines folded:  also folded -----------------------------------
     }
}

is this possible ?

2) enter/exit fold commands?

These don't seem to exist, or have I just not found them perhaps? I
found umpteen ways to open/close folds, but none to actually "enter" a
fold - where "enter" means to see only the contents of that fold in a
window, as if it is a seperate file/buffer. This is very useful when you
want to concentrate your work on a single fold and ignore everything
else in the file. All commands like search/replace and movement issued
when in this fold take effect on the contents only. The "exit fold"
command goes up a level and closes the fold.

Does this exist. If not are there any plans to implement it?

3) General style of folded lines

As seen in (1) above, apart from the indentation I'd like a cleaner look
to the folded lines. I don't like dashes filling up the entire line, and
I'd like the information about how may lines are within the fold to be
an optional component of the line (maybe it already is?), or perhaps put
in the foldcolumn window and not in the buffers main window. Can this be
done ?

4) Fold lines with markers are comments

This one may be a little hard to swallow for some folks: I'd like all
the text in a folds first line to be a comment. The philosophy we had
was that if a block was folded then it merited at the very least a
comment about what was inside. The closed fold line could not contain
code or content, only foldmarker and comment. This was accomplished by
the following behaviour:

When a block is folded an empty fold line is created and the fold is
closed. The cursor is placed on the closed fold line, where the user may
add a comment: eg:

            here's some stuff
            here's some stuff
            here's some stuff

(now I fold it)

            ...  ^
the cursor goes^ here
            ...  and now I type my comment

I can also go back at any time and edit the comment directly on the
closed fold line. This behaviour forces me to at least think about what
I'm hiding in a fold and type a line of comment about it, now and again ;-)

I'm not suggesting that any of the stuff above should become the default
behaviour for vim. Thanks in advance for any suggestions, comments,
help, etc.

Best regards

Paul

#29853 From: "Kontra, Gergely" <kgergely@...>
Date: Mon Jul 1, 2002 1:11 pm
Subject: Re: dialog box guis
kgergely@...
Send Email Send Email
 
>Look at xdialog.  http://www.chez.com/godefroy/
>> When I asked for you told me: write it in your favourite scripting
>> language.
>>
>> I'm now asking, wheter anybody has such an implementation (a mini
>> example, that works, and has a gtk/tk/whatever dialog box to start with)

Well, this is a separate program, so it could be slow. The builtin input
dialog is quicker, and portable (even in console)
On the other side, it doesn't support entry boxes AND checkboxgroups and
dropdown lists in one dialog.

Gergo

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@...,  kgergely@...          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

#29854 From: T o F <mailinglist1@...>
Date: Mon Jul 1, 2002 1:45 pm
Subject: Columns delimiter
mailinglist1@...
Send Email Send Email
 
Hi !
There is something I'm looking for in vim, which is quite useful for
syntax IMHO: a line which would delimit the 80th column (or another one
if anybody need).

Something like UltraEdit on MSWin, or netbeans, or...

I though of changing a little bit the background of the >80 characters,
so that any text in the zone would be obvious, but not forbiden.

Any idea how to make this ?
  I tried it with syntax... (match...) but hard to manage tabs,
furthermore it would hilight background *only* if the text is beyond the
80th column.
  I tried to modify vim sources, why not making a patch with a new
option. But I'm quite lost, where should I start ?

Thanx, any idea welcomed :)

Tof

#29855 From: David A de Gruyl <david@...>
Date: Mon Jul 1, 2002 1:55 pm
Subject: Re: Columns delimiter
david@...
Send Email Send Email
 
* on [02-07-01 09:46] T o F <mailinglist1@...>
* wrote <1025531131.7053.16.camel@hyperion>:
> Hi !
> There is something I'm looking for in vim, which is quite useful for
> syntax IMHO: a line which would delimit the 80th column (or another one
> if anybody need).

I use:
match  eightyColumn  /\%>80v.*/
or:
syn match  eightyColumn  /\%>80v.*/

the .* highlights everything greater than 80th virtual column. you may
only want to highlight the 80th column itself so:

match  eightyColumn  /\%>80v/

(this is actually almost verbatim from help match)

David

--
David de Gruyl <david@...>

#29856 From: Armenio Pinto <armenio-p-pinto@...>
Date: Mon Jul 1, 2002 2:28 pm
Subject: Search the word under cursor
armenio-p-pinto@...
Send Email Send Email
 
Hi there,

      I would like to insert the current word in the search text, so, I tried
the following: <ESC>/<C-O>

But it didn't work... It inserts "<C-O>" as the search text! Can anyone help
me? Thanks in advance,

Arménio Pinto

#29857 From: T o F <mailinglist1@...>
Date: Mon Jul 1, 2002 2:58 pm
Subject: Re: Search the word under cursor
mailinglist1@...
Send Email Send Email
 
Isn't this the star (*) key ? or hash (#) for reverse ?

Tof

On Mon, 2002-07-01 at 16:28, Armenio Pinto wrote:
> Hi there,
>
>      I would like to insert the current word in the search text, so, I tried
> the following: <ESC>/<C-O>
>
> But it didn't work... It inserts "<C-O>" as the search text! Can anyone help
> me? Thanks in advance,
>
> Arménio Pinto
>

#29858 From: T o F <mailinglist1@...>
Date: Mon Jul 1, 2002 3:27 pm
Subject: Re: Columns delimiter
mailinglist1@...
Send Email Send Email
 
well, thanx, I didn't see this...
But if it remove the tabs problem, it's not exactly what I'm looking
for... since I want to hilight places where there is no text.


On Mon, 2002-07-01 at 15:55, David A de Gruyl wrote:
>
> * on [02-07-01 09:46] T o F <mailinglist1@...>
> * wrote <1025531131.7053.16.camel@hyperion>:
> > Hi !
> > There is something I'm looking for in vim, which is quite useful for
> > syntax IMHO: a line which would delimit the 80th column (or another one
> > if anybody need).
>
> I use:
> match  eightyColumn  /\%>80v.*/
> or:
> syn match  eightyColumn  /\%>80v.*/
>
> the .* highlights everything greater than 80th virtual column. you may
> only want to highlight the 80th column itself so:
>
> match  eightyColumn  /\%>80v/
>
> (this is actually almost verbatim from help match)
>
> David
>
> --
> David de Gruyl <david@...>
>

#29859 From: "Scott LaBounty" <slabounty@...>
Date: Mon Jul 1, 2002 3:44 pm
Subject: Vim/Cygwin/Windows 2000
slabounty@...
Send Email Send Email
 
Since I've moved to Windows 2000 when I do a :cd /xyz (i.e. I change to
a new directory) the directory shown by bash through a :!ls is not the
same as the vim directory. In other words the vim directory and the bash
directory are out of sync with each other. With both Windows 98 and
Windows NT, I don't recall having to do anything special to get this to
work. Any ideas?

Scott LaBounty
Nexa Technologies

#29860 From: Bram Moolenaar <Bram@...>
Date: Mon Jul 1, 2002 6:13 pm
Subject: Re: folding: some questions and comments (long)
Bram@...
Send Email Send Email
 
Paul Robins wrote:

> 1) Indent folded lines to the same level as the fold's contents:
>
> eg:
>
> if (some test) {
>     ... this stuff is folded
>     ... so is this
>
>     if (some other test) {
>        ... also folded
>     }
> }
>
> reads much nicer than :
>
> if (some test) {
> +--  3 lines folded:  this stuff is folded --------------------------
> +--  6 lines folded:  so is this ------------------------------------
>
>     if (some other test) {
> +--  6 lines folded:  also folded -----------------------------------
>     }
> }
>
> is this possible ?

Yes, you can set 'foldtext' to suit your need.

> 2) enter/exit fold commands?
>
> These don't seem to exist, or have I just not found them perhaps? I
> found umpteen ways to open/close folds, but none to actually "enter" a
> fold - where "enter" means to see only the contents of that fold in a
> window, as if it is a seperate file/buffer. This is very useful when you
> want to concentrate your work on a single fold and ignore everything
> else in the file. All commands like search/replace and movement issued
> when in this fold take effect on the contents only. The "exit fold"
> command goes up a level and closes the fold.
>
> Does this exist. If not are there any plans to implement it?

You can close all other folds: "zMzv".  But this doesn't display the
open fold in another window.  That is not planned to be added.  You
could write a script that yanks the text, opens a new window and puts it
there, putting back the changed text when you close the window.  It's a
bit tricky, but should work.

There currently are no commands that only work on the open fold(s).
These are planned, but I have no idea when they get implemented.

> 3) General style of folded lines
>
> As seen in (1) above, apart from the indentation I'd like a cleaner look
> to the folded lines. I don't like dashes filling up the entire line, and
> I'd like the information about how may lines are within the fold to be
> an optional component of the line (maybe it already is?), or perhaps put
> in the foldcolumn window and not in the buffers main window. Can this be
> done ?

Can also be done by tweaking 'foldtext'.

> 4) Fold lines with markers are comments
>
> This one may be a little hard to swallow for some folks: I'd like all
> the text in a folds first line to be a comment. The philosophy we had
> was that if a block was folded then it merited at the very least a
> comment about what was inside. The closed fold line could not contain
> code or content, only foldmarker and comment. This was accomplished by
> the following behaviour:
>
> When a block is folded an empty fold line is created and the fold is
> closed. The cursor is placed on the closed fold line, where the user may
> add a comment: eg:
>
>            here's some stuff
>            here's some stuff
>            here's some stuff
>
> (now I fold it)
>
>            ...  ^
> the cursor goes^ here
>            ...  and now I type my comment
>
> I can also go back at any time and edit the comment directly on the
> closed fold line. This behaviour forces me to at least think about what
> I'm hiding in a fold and type a line of comment about it, now and again ;-)

In Vim the text before the marker is used in the closed fold line.  You
can edit it when the fold is open.  That's not too different from what
you want and avoids another editing mode.

--
MESKIMEN'S LAW
     There's never time to do it right, but always time to do it over.

  ///  Bram Moolenaar -- Bram@... -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///

#29861 From: Mario Schweigler <ms44@...>
Date: Mon Jul 1, 2002 6:55 pm
Subject: Re: folding: some questions and comments (long)
ms44@...
Send Email Send Email
 
Hi Paul,

I can see, you are an origami guy! ;)

I am currently writing some scripts to improve the look and feel of vim
folding, so that it looks more like origami. (This includes the famous 3
dots! :) )

Also, I am writing scripts to enter and exit folds. And I'm writing
syntax and indent files for occam (maybe you are interested in that as
well).

All that will soon be in beta stage and I will post a link to the
mailing list, so that interested people can test it too.

Mario

Paul Robins wrote:
>
> (Please forgive me if a second, similar post to the one below appears on
> this list. I lost up my original posting but I'm still not sure if it
> survived somewhere in the posting process).
>
> I'm a brand new vim user, quite excited to find a powerful, supported
> text editor with a good implementation of "folding". I have however,
> several comments and questions related to vims implementation of
> folding. For info, I'm using exclusively foldmethod=marker.
>
> As an ex-Inmos person, where folding was almost a religion I'm a keen
> "folder". The "style" of folding used in some of those long gone editors
> that I used in my youth was (IMHO) elegant and powerful. I'd like to
> make vim look and behave a little more like that, if possible. For
> starters, there are a couple of things I'd like to be able to do. Maybe
> others may also like some of these ideas...
>
> 1) Indent folded lines to the same level as the fold's contents:
>
> eg:
>
> if (some test) {
>     ... this stuff is folded
>     ... so is this
>
>     if (some other test) {
>        ... also folded
>     }
> }
>
> reads much nicer than :
>
> if (some test) {
> +--  3 lines folded:  this stuff is folded --------------------------
> +--  6 lines folded:  so is this ------------------------------------
>
>     if (some other test) {
> +--  6 lines folded:  also folded -----------------------------------
>     }
> }
>
> is this possible ?
>
> 2) enter/exit fold commands?
>
> These don't seem to exist, or have I just not found them perhaps? I
> found umpteen ways to open/close folds, but none to actually "enter" a
> fold - where "enter" means to see only the contents of that fold in a
> window, as if it is a seperate file/buffer. This is very useful when you
> want to concentrate your work on a single fold and ignore everything
> else in the file. All commands like search/replace and movement issued
> when in this fold take effect on the contents only. The "exit fold"
> command goes up a level and closes the fold.
>
> Does this exist. If not are there any plans to implement it?
>
> 3) General style of folded lines
>
> As seen in (1) above, apart from the indentation I'd like a cleaner look
> to the folded lines. I don't like dashes filling up the entire line, and
> I'd like the information about how may lines are within the fold to be
> an optional component of the line (maybe it already is?), or perhaps put
> in the foldcolumn window and not in the buffers main window. Can this be
> done ?
>
> 4) Fold lines with markers are comments
>
> This one may be a little hard to swallow for some folks: I'd like all
> the text in a folds first line to be a comment. The philosophy we had
> was that if a block was folded then it merited at the very least a
> comment about what was inside. The closed fold line could not contain
> code or content, only foldmarker and comment. This was accomplished by
> the following behaviour:
>
> When a block is folded an empty fold line is created and the fold is
> closed. The cursor is placed on the closed fold line, where the user may
> add a comment: eg:
>
>            here's some stuff
>            here's some stuff
>            here's some stuff
>
> (now I fold it)
>
>            ...  ^
> the cursor goes^ here
>            ...  and now I type my comment
>
> I can also go back at any time and edit the comment directly on the
> closed fold line. This behaviour forces me to at least think about what
> I'm hiding in a fold and type a line of comment about it, now and again ;-)
>
> I'm not suggesting that any of the stuff above should become the default
> behaviour for vim. Thanks in advance for any suggestions, comments,
> help, etc.
>
> Best regards
>
> Paul

#29862 From: Bram Moolenaar <Bram@...>
Date: Mon Jul 1, 2002 7:40 pm
Subject: Re: folding: some questions and comments (long)
Bram@...
Send Email Send Email
 
Paul Robins wrote:

> >You could write a script that yanks the text, opens a new window and
> >puts it there, putting back the changed text when you close the
> >window.  It's a bit tricky, but should work.
>
> Sounds messy. It really needs to work in the same window.

Something like this should work:

	 yank the text in the fold, remember the line numbers
	 :hide enew
	 put the text

	 [... do your edits ...]

	 yank all the text
	 :buf! <previous buffer>
	 put the edited text in place of the remembered lines

The tricky part is that the original buffer must not be edited in
another way in between, the line numbers could be messed up.

> > Can also be done by tweaking 'foldtext'.
>
> I'm a bit puzzled by this foldtext option, surely because I don't know
> enough about vim and setting options. Even when I set foldtext to "" I
> still seem get a line full of dashes and the number of lines as info.

I'm sure someone on the vim list can help you with this.

--
There are three kinds of people: Those who can count & those who can't.

  ///  Bram Moolenaar -- Bram@... -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///

#29863 From: Mario Schweigler <ms44@...>
Date: Mon Jul 1, 2002 8:02 pm
Subject: Re: folding: some questions and comments (long)
ms44@...
Send Email Send Email
 
> > >You could write a script that yanks the text, opens a new window
> > >and puts it there, putting back the changed text when you close the
> > >window.  It's a bit tricky, but should work.
> >
> > Sounds messy. It really needs to work in the same window.
>
> Something like this should work:
>
>         yank the text in the fold, remember the line numbers
>         :hide enew
>         put the text
>
>         [... do your edits ...]
>
>         yank all the text
>         :buf! <previous buffer>
>         put the edited text in place of the remembered lines
>
> The tricky part is that the original buffer must not be edited in
> another way in between, the line numbers could be messed up.

I do it differently in my script (soon available): I first thought of
doing it like you described, but it seemed too messy and too dangerous
to me. Now I "simply" (it ain't that simple, but it is very stable) put
the text before and after the folds in special swap files and remove it
from the buffer so that just the fold will be left. Then I shift it to
the left so that the indent is 0. (Just as origami does.) Exiting a fold
works exactly the other way round.

This way, even if vim crashes, we can still recover the text from the
swap files, and this is something which is very important for me.

Please be a bit patient, by the end of the week it will be available.

> > I'm a bit puzzled by this foldtext option, surely because I don't
> > know enough about vim and setting options. Even when I set foldtext
> > to "" I still seem get a line full of dashes and the number of lines
> > as info.
>
> I'm sure someone on the vim list can help you with this.

OK, Paul: I can send you the famous 3 dots even now, as this is already
finished and it doesn't affect the other stuff. Add the content of the
attached file to a configuration file (.vimrc should do it for now,
later on you should think of putting your own configuration stuff into
separate *.vim files and calling them from .vimrc).

Mario
"{{{  function GetComment(lang, which)

" Feel free to add others! :)
" Arguments: a:lang is a string to indicate the language - use the same word as
you would use for :setf
"            a:which indicates which comment you want:
" 0 is the left comment
" 1 is the right comment, if there is none (i.e. EOL ends the comment) return ''
" If there is an alternative way of commenting, use
" 2 to return the alternative left comment, and
" 3 to return the alternative right comment.
" If there is no alternative comment, 2 returns ''.
" If there are more alternatives, use (2n) for the left and (2n+1) for the right
comments.
" Note that the 0, 1 couple will be used for creating folds, and for commenting
lines.
" The alternatives are just for correct display of folded lines.
" NOTE: Every character is allowed except \

function GetComment(lang, which)

   if a:lang == 'occam'
     if a:which == 0|return '--'|else|return ''|endif
   elseif a:lang == 'vim'
     if a:which == 0|return '"'|else|return ''|endif
   elseif a:lang == 'basic'
     if a:which == 0|return "'"|else|return ''|endif
   elseif a:lang == 'java' || a:lang == 'c' || a:lang == 'cpp'
     if a:which == 0|return '//'|elseif a:which == 2|return '/*'|elseif a:which
== 3|return '*/'|else|return ''|endif
   elseif a:lang == 'pascal'
     if a:which == 0|return '(*'|elseif a:which == 1|return '*)'|
     elseif a:which == 2|return '{'|elseif a:which == 3|return '}'|else|return
''|endif

   " Space for more...

   else
     return ''
  endif

endfunction
"}}}

"{{{  function MyFoldText()

set foldtext=MyFoldText()
function MyFoldText()
   let line = getline(v:foldstart)
   let myindent = indent(v:foldstart)

   " Ensure magic is on
   let save_magic = &magic
   setlocal magic

   " Remove fold markers and fold level numbers
   let line = substitute(line, '{{{\d\=', '', 'g') "}}}

   " Check for all possible comments in the current language
   let i = 0
   while GetComment(&filetype, i) != ''

     " If there is no right comment
     if GetComment(&filetype, i + 1) == ''

       " Remove first occurence of left comment
       let subst = '\V' . GetComment(&filetype, i)
       let line = substitute(line,  subst , '', '')
     else

       " Remove all occurences of left and right comments
       let subst = '\V' . GetComment(&filetype, i) . '\|' . GetComment(&filetype,
i + 1)
       let line = substitute(line,  subst , '', 'g')

     endif

     let i = i + 2
   endwhile

   " Get rid of initial spaces
   let line = substitute(line, '^\s*', '', 'g')

   " Avoid fold lines just with 3 dots and nothing else
   if line =~ '^$'|let line = 'FOLDED'|endif

   " Put three dots in front"
   let line = '...  ' . line
   " Set the indent right
   while myindent != 0
     let myindent = myindent - 1
     let line = ' ' . line
   endwhile

   " Restore magic
   if !save_magic|setlocal nomagic|endif

   return line
endfunction
"}}}

#29864 From: Benji Fisher <fisherbb@...>
Date: Mon Jul 1, 2002 8:20 pm
Subject: Re: [BUG] set <C-Ins>=... doesn't work?
fisherbb@...
Send Email Send Email
 
On Friday, June 28, 2002, at 04:57  AM, Andre Pang wrote:

> Hi,
>
> I'm trying to map <C-Ins>:
>
>     vnoremap <C-Ins> "*y
>
> .. that works fine.
>
> So then I wanted to try getting that mapping to work in terminals
> (my terminal emulator generates ^[[2^ when I hit C-Insert), but
> Vim doesn't like this:
>
>     set <C-Insert>=^[[2^
>
> (it complains with "Unknown option").
>
> Trying "set <Ins>=", set <Insert>=" or "set <S-Ins>=" works
> perfectly, though.  D'oh!  I think this is a Vim bug.

       I am surprised that

:set <Ins>=

does not generate an error (although I can confirm that it does not).
Does it do anything?

					 --Benji Fisher

#29865 From: Benji Fisher <fisherbb@...>
Date: Mon Jul 1, 2002 8:29 pm
Subject: Re: Columns delimiter
fisherbb@...
Send Email Send Email
 
What is the problem with tabs?

					 --Benji Fisher

On Monday, July 1, 2002, at 11:27  AM, T o F wrote:

> well, thanx, I didn't see this...
> But if it remove the tabs problem, it's not exactly what I'm looking
> for... since I want to hilight places where there is no text.
>
>
> On Mon, 2002-07-01 at 15:55, David A de Gruyl wrote:
>>
>> * on [02-07-01 09:46] T o F <mailinglist1@...>
>> * wrote <1025531131.7053.16.camel@hyperion>:
>>> Hi !
>>> There is something I'm looking for in vim, which is quite useful for
>>> syntax IMHO: a line which would delimit the 80th column (or another
>>> one
>>> if anybody need).
>>
>> I use:
>> match  eightyColumn  /\%>80v.*/
>> or:
>> syn match  eightyColumn  /\%>80v.*/

#29866 From: Mikolaj Machowski <mikmach@...>
Date: Mon Jul 1, 2002 7:43 pm
Subject: Re: vimtutor portuguese translation
mikmach@...
Send Email Send Email
 
On Mon, 1 Jul 2002, Luis Alberto Garcia Cipriano wrote:

> Hi,
>
> Is there any page where I can see the translations available for vimtutor ?
> Here in my Debian Woody 3.0, I can find some translations but I couldn't
> find any central reference about vimtutor translations.

All official (accepted by Bram) vimtutor translations are available in
official vim distribution either in main package or in extra language
package.

Main reference are other translations. And main problem is large number of
mnemonics in vim. I solved it with:

1. Using not often common words for some actions
2. Leaving original word for action with polish translation in parentheses

> I'm interested in doing the portuguese translation (pt).
>
> Only if there isn't one yet, of course :-)

I don't see tutor.pt. Good luck :)


Mikolaj
Polish translator.

#29867 From: Benji Fisher <fisherbb@...>
Date: Mon Jul 1, 2002 11:58 pm
Subject: Re: Vim/Cygwin/Windows 2000
fisherbb@...
Send Email Send Email
 
On Monday, July 1, 2002, at 11:44  AM, Scott LaBounty wrote:

> Since I've moved to Windows 2000 when I do a :cd /xyz (i.e. I change to
> a new directory) the directory shown by bash through a :!ls is not the
> same as the vim directory. In other words the vim directory and the bash
> directory are out of sync with each other. With both Windows 98 and
> Windows NT, I don't recall having to do anything special to get this to
> work. Any ideas?

       Here is a stab in the dark.  Maybe the W2K shell has something like
a .cshrc file that makes every new (interactive?) shell start up in the
home directory?  Look it up in the MS documentation. ;)

HTH 			 --Benji Fisher

#29868 From: Andre Pang <ozone@...>
Date: Tue Jul 2, 2002 8:20 am
Subject: Re: [BUG] set <C-Ins>=... doesn't work?
ozone@...
Send Email Send Email
 
On Mon, Jul 01, 2002 at 04:20:30 -0400, Benji Fisher wrote:

> >Trying "set <Ins>=", set <Insert>=" or "set <S-Ins>=" works
> >perfectly, though.  D'oh!  I think this is a Vim bug.
>
>      I am surprised that
>
> :set <Ins>=
>
> does not generate an error (although I can confirm that it does not).
> Does it do anything?

Sorry, I meant 'set <Ins>="*y' works, as does 'set <S-Ins>="*y',
but 'set <C-Ins>="*y' does not.

(That'll teach me to abbreviate things next time!)


--
#ozone/algorithm <ozone@...>          - trust.in.love.to.save

#29869 From: Benji Fisher <fisherbb@...>
Date: Tue Jul 2, 2002 12:22 pm
Subject: Re: [BUG] set <C-Ins>=... doesn't work?
fisherbb@...
Send Email Send Email
 
On Tuesday, July 2, 2002, at 04:20  AM, Andre Pang wrote:

> On Mon, Jul 01, 2002 at 04:20:30 -0400, Benji Fisher wrote:
>
>>> Trying "set <Ins>=", set <Insert>=" or "set <S-Ins>=" works
>>> perfectly, though.  D'oh!  I think this is a Vim bug.
>>
>>      I am surprised that
>>
>> :set <Ins>=
>>
>> does not generate an error (although I can confirm that it does not).
>> Does it do anything?
>
> Sorry, I meant 'set <Ins>="*y' works, as does 'set <S-Ins>="*y',
> but 'set <C-Ins>="*y' does not.

       My question remains:  what, if anything, does this do?  AFAIK,
there is no <Ins> option in vim.

:help :set

       BTW, I am guessing that you are typing <Ins> literally (five
characters).

HTH 			 --Benji Fisher

#29870 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Tue Jul 2, 2002 2:41 pm
Subject: Re: [BUG] set <C-Ins>=... doesn't work?
antoine.mechelynck@...
Send Email Send Email
 
Isn't this in the same category with ":set t_xx=value" (define what code the
keyboard sends when you press t_xx)?

Tony.
----- Original Message -----
From: "Benji Fisher" <fisherbb@...>
To: "Andre Pang" <ozone@...>
Cc: <vim@...>
Sent: Tuesday, July 02, 2002 2:22 PM
Subject: Re: [BUG] set <C-Ins>=... doesn't work?


> On Tuesday, July 2, 2002, at 04:20  AM, Andre Pang wrote:
>
> > On Mon, Jul 01, 2002 at 04:20:30 -0400, Benji Fisher wrote:
> >
> >>> Trying "set <Ins>=", set <Insert>=" or "set <S-Ins>=" works
> >>> perfectly, though.  D'oh!  I think this is a Vim bug.
> >>
> >>      I am surprised that
> >>
> >> :set <Ins>=
> >>
> >> does not generate an error (although I can confirm that it does not).
> >> Does it do anything?
> >
> > Sorry, I meant 'set <Ins>="*y' works, as does 'set <S-Ins>="*y',
> > but 'set <C-Ins>="*y' does not.
>
>       My question remains:  what, if anything, does this do?  AFAIK,
> there is no <Ins> option in vim.
>
> :help :set
>
>       BTW, I am guessing that you are typing <Ins> literally (five
> characters).
>
> HTH --Benji Fisher
>
>
>

#29871 From: "Walter Usyk" <wusyk@...>
Date: Tue Jul 2, 2002 4:07 pm
Subject: Trying to compile vim and gvim on Solaris
wusyk@...
Send Email Send Email
 
I have a Solaris 2.8 OS and I'm trying to compile a gvim version of vim
6.1. I was successful for HP 10.20 with just running the './configure'
which created the vim and gvim executables.

I would like to do the same for Sun. I have tried just running
'./configure' and it only creates the vim executable.

Can someone help me and tell me which options I need to specify for
configure to get a gvim executable.

Thanks for your help

--
Walter Usyk - Tools Developer
Software Development Environment Tools (1P67)
email: wusyk@...
ESN: 398-4603
Tel: (613) 768-4603

#29872 From: Colin Keith <vim@...>
Date: Tue Jul 2, 2002 4:06 pm
Subject: Re: Trying to compile vim and gvim on Solaris
vim@...
Send Email Send Email
 
On Tue, Jul 02, 2002 at 12:07:44PM -0400, Walter Usyk wrote:
> './configure' and it only creates the vim executable.

./configure uses --with-gui=auto by default:


openbox% ( cd /usr/local/src/vim61/ ; ./configure --help ) |grep gui
   --enable-gui[=OPTS]     X11 GUI [default=auto]
[OPTS=auto/no/gtk/gnome/motif/athena/beos/photon]

If you're not getting the GUI built, it didn't find the right components.
Re-run ./configure and look at the output to see what its searching for
and what it isn't finding. IIRC if you force the GUI then configure will
die if it can't find the necessary libraries (as opposed to just ignoring
it if you leave it set on auto). config.log is in src/auto, if you want
the verbose output, look in there.

--
Then graphics games came along and the computer using portion of the human race
forgot all about 500,000 years of language evolution and went straight back to
the electronic equivalent of banging rocks together - the point'n'click game
  - http://www.douglasadams.com/creations/infocomjava.html

#29873 From: "Antoine J. Mechelynck" <antoine.mechelynck@...>
Date: Tue Jul 2, 2002 4:23 pm
Subject: Re: Trying to compile vim and gvim on Solaris
antoine.mechelynck@...
Send Email Send Email
 
On some platforms you can use a single executable and it will try to start
in the GUI if it's called "vim -g" or "gvim" so you can setup a symlink from
gvim to vim and have both for the price of one.

HTH,
Tony.
----- Original Message -----
From: "Colin Keith" <vim@...>
To: <vim@...>
Sent: Tuesday, July 02, 2002 6:06 PM
Subject: Re: Trying to compile vim and gvim on Solaris


> On Tue, Jul 02, 2002 at 12:07:44PM -0400, Walter Usyk wrote:
> > './configure' and it only creates the vim executable.
>
> ./configure uses --with-gui=auto by default:
>
>
> openbox% ( cd /usr/local/src/vim61/ ; ./configure --help ) |grep gui
>   --enable-gui[=OPTS]     X11 GUI [default=auto]
[OPTS=auto/no/gtk/gnome/motif/athena/beos/photon]
>
> If you're not getting the GUI built, it didn't find the right components.
> Re-run ./configure and look at the output to see what its searching for
> and what it isn't finding. IIRC if you force the GUI then configure will
> die if it can't find the necessary libraries (as opposed to just ignoring
> it if you leave it set on auto). config.log is in src/auto, if you want
> the verbose output, look in there.
>
> --
> Then graphics games came along and the computer using portion of the human
race
> forgot all about 500,000 years of language evolution and went straight
back to
> the electronic equivalent of banging rocks together - the point'n'click
game
>  - http://www.douglasadams.com/creations/infocomjava.html
>

#29874 From: "Douglas L . Potts" <pottsdl@...>
Date: Tue Jul 2, 2002 4:32 pm
Subject: Re: Trying to compile vim and gvim on Solaris
pottsdl@...
Send Email Send Email
 
On Tue, Jul 02, 2002 at 06:23:14PM +0200 Antoine J. Mechelynck wrote:
> On some platforms you can use a single executable and it will try to start
> in the GUI if it's called "vim -g" or "gvim" so you can setup a symlink from
> gvim to vim and have both for the price of one.

Yes, this is the case.  And if you run 'make install', it will set it up
this way for you.

HTH,
-Doug

--
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Douglas L. Potts
So when I saw the post to comp.editors, I rushed over to the FTP site to
grab it.  So I yank apart the tarball, light x candles, where x= the
vim version multiplied by the md5sum of the source divided by the MAC of
my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
wave a dead chicken over the hard drive, and summon the power of GNU GCC
with the magic words "make config ; make!".
                 [Jason Spence, compiling Vim 5.0]
GPG Fingerprint: 768A EEF8 197A 4C9A 5EF7  DA5B 464C 97DF DCD5 68C2
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

#29875 From: "P. Alejandro Lopez-Valencia" <dradul@...>
Date: Tue Jul 2, 2002 4:42 pm
Subject: Re: Trying to compile vim and gvim on Solaris
dradul@...
Send Email Send Email
 
----- Original Message -----
From: "Walter Usyk" <wusyk@...>
To: <vim@...>
Sent: Tuesday, July 02, 2002 11:07 AM
Subject: Trying to compile vim and gvim on Solaris


> I have a Solaris 2.8 OS and I'm trying to compile a gvim version of
vim
> 6.1. I was successful for HP 10.20 with just running the './configure'
> which created the vim and gvim executables.
>
> I would like to do the same for Sun. I have tried just running
> './configure' and it only creates the vim executable.
>
> Can someone help me and tell me which options I need to specify for
> configure to get a gvim executable.
>

If using the default CDE desktop:

If using SunPro/Forte

bash-1.25a-$ CC=cc CFLAGS="-xO2 -xtarget=native \
-I/usr/include -I/usr/openwin/include -I/usr/dt/include \
-I/usr/local/include" LDFAGS="-s -L/usr/lib -L/usr/openwin/lib \
-L/usr/dt/lib -L/usr/local/lib \
-R/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib" \
./configure --with-features=big --enable-gui=motif


If using gcc:

bash-1.25a-$ CC=gcc CFLAGS="-O2 -fexpensive-optimizations \
-fno-strength-reduce \
-I/usr/include -I/usr/openwin/include -I/usr/dt/include \
-I/usr/local/include" LDFAGS="-s -L/usr/lib -L/usr/openwin/lib \
-L/usr/dt/lib -L/usr/local/lib \
-R/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib" \
./configure --with-features=big --enable-gui=motif


unless you are using GNU binutils, where you use a different syntax:

bash-1.25a-$ CC=gcc CFLAGS="-O2 -fexpensive-optimizations \
-fno-strength-reduce \
-I/usr/include -I/usr/openwin/include -I/usr/dt/include \
-I/usr/local/include" LDFAGS="-s -L/usr/lib -L/usr/openwin/lib \
-L/usr/dt/lib -L/usr/local/lib \
-rpath /usr/lib -rpath /usr/openwin/lib \
-rpath /usr/dt/lib -rpath /usr/local/lib" \
./configure --with-features=big --enable-gui=motif

If using gcc, prepare yourself for a bunch of warnings in the X11
headers, they are harmless, I know there is a compiler option to turn
off the noise but I never remember which one.

#29876 From: Preben Peppe Guldberg <c928400@...>
Date: Tue Jul 2, 2002 4:04 pm
Subject: Re: [BUG] set <C-Ins>=... doesn't work?
c928400@...
Send Email Send Email
 
Thus wrote Antoine J. Mechelynck (antoine.mechelynck@...) on [020702]:
> Isn't this in the same category with ":set t_xx=value" (define what code the
> keyboard sends when you press t_xx)?

Seems like a good guess. Is it true (anyone?)?

> > On Tuesday, July 2, 2002, at 04:20  AM, Andre Pang wrote:

> > > Sorry, I meant 'set <Ins>="*y' works, as does 'set <S-Ins>="*y',
> > > but 'set <C-Ins>="*y' does not.

If this does anything worth while, it clears whatever this <Ins> option
is as the '"*y' is a comment in this context.

Andre, are you looking for eg.

     :nnoremap <Ins> "*y

Peppe
--
                                       "Before you criticize someone, walk
Preben "Peppe" Guldberg  __/-\__       a mile in his shoes. That way, if
c928400@...    (o o)        he gets angry, he'll be a mile away
----------------------oOOo (_) oOOo--  - and barefoot."    --Sarah Jackson

#29877 From: Yegappan Lakshmanan <yegappan@...>
Date: Tue Jul 2, 2002 5:19 pm
Subject: Searching for words that are repeated more than once consecutively
yegappan@...
Send Email Send Email
 
Hi all,

How do I search for words that are repeated consecutively more
than once? For example, search for "the the" or "a a", etc.
Note that the word is an arbitrary word (i.e. I cannot just
search for /the the or /a a).

- Yegappan


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

#29878 From: "Scott LaBounty" <slabounty@...>
Date: Tue Jul 2, 2002 5:26 pm
Subject: RE: Searching for words that are repeated more than once consecutively
slabounty@...
Send Email Send Email
 
Yegappan,

How about:

/\(\<.*\>\) \1

It worked on my 1 example case ;-).

Scott LaBounty
Nexa Technologies

-----Original Message-----
From: Yegappan Lakshmanan [mailto:yegappan@...]
Sent: Tuesday, July 02, 2002 10:20 AM
To: vim@...
Subject: Searching for words that are repeated more than once
consecutively


Hi all,

How do I search for words that are repeated consecutively more than
once? For example, search for "the the" or "a a", etc. Note that the
word is an arbitrary word (i.e. I cannot just search for /the the or /a
a).

- Yegappan


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

#29879 From: Yegappan Lakshmanan <yegappan@...>
Date: Tue Jul 2, 2002 5:34 pm
Subject: RE: Searching for words that are repeated more than once consecutively
yegappan@...
Send Email Send Email
 
--- Scott LaBounty <slabounty@...> wrote:
> Yegappan,
>
> How about:
>
> /\(\<.*\>\) \1
>
> It worked on my 1 example case ;-).

Yes. This works. I didn't try using \1 in the search pattern.
I didn't realize that the sub-expression \1, \2, etc can
be used in the same search pattern. I thought they can be
used only in replacement strings. Now I see that there is
an example for using \1 in a search pattern under ":help /\1"

Thanks,
Yegappan

>
> Scott LaBounty
> Nexa Technologies
>
> -----Original Message-----
> From: Yegappan Lakshmanan [mailto:yegappan@...]
> Sent: Tuesday, July 02, 2002 10:20 AM
> To: vim@...
> Subject: Searching for words that are repeated more than once
> consecutively
>
>
> Hi all,
>
> How do I search for words that are repeated consecutively more than
> once? For example, search for "the the" or "a a", etc. Note that the
> word is an arbitrary word (i.e. I cannot just search for /the the or /a
> a).
>
> - Yegappan
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
>


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

#29880 From: tmusall@...
Date: Tue Jul 2, 2002 5:42 pm
Subject: Re: Searching for words that are repeated more than once consecutively
tmusall@...
Send Email Send Email
 
Yegappan,

I'm pretty new to vim script, but I think this one does
what you need.

-Todd

function! DubWordSearch()
     while 1
	 normal ye
	 let x = @"
	 normal wye
	 if x == @"
	     normal b
	     break
	 endif
     endwhile
endfunction
> Hi all,
>
> How do I search for words that are repeated consecutively more
> than once? For example, search for "the the" or "a a", etc.
> Note that the word is an arbitrary word (i.e. I cannot just
> search for /the the or /a a).
>
> - Yegappan
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com

Messages 29851 - 29880 of 137779   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