On 8/21/06, Edward Wong <[EMAIL PROTECTED]> wrote:
Dear all,
I'm trying to accomplish sth similar as follow:
ca grf =(getcmdpos() == 1 && getcmdtype() == ':' ? 'grep -i ' .
expand("%:f") . ^V^V^V^V : grf)
Hello Edward,
ca grf =(getcmdpos() == 1 && getcmdtype() == ':' ? 'grep -i '
.expand("%:f
I want to make saving of unnamed buffers possible as follows:
When I do :w on a unnamed buffer, I want it to save to the
file /tmp/N where N is number.
I tried the simple code below, but it does not work. I am getting
'E32: No file name', same error as without this code.
How do I fix it ?
Tha
Yakov Lerner wrote:
I want to make saving of unnamed buffers possible as follows:
When I do :w on a unnamed buffer, I want it to save to the
file /tmp/N where N is number.
I tried the simple code below, but it does not work. I am getting
'E32: No file name', same error as without this code.
H
On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> I want to make saving of unnamed buffers possible as follows:
> When I do :w on a unnamed buffer, I want it to save to the
> file /tmp/N where N is number.
>
> I tried the simple code below, but it does not work. I am g
Hi,
Yakov Lerner wrote:
> On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>>> I want to make saving of unnamed buffers possible as follows:
>>> When I do :w on a unnamed buffer, I want it to save to the
>>> file /tmp/N where N is number.
>>>
>>> I tried the simple c
On 8/21/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
> Yakov Lerner wrote:
> > I want to make saving of unnamed buffers possible as follows:
> > When I do :w on a unnamed buffer, I want it to save to the
> > file /tmp/N where N is number.
> >
On 8/21/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
ca grf =(getcmdpos() == 1 && getcmdtype() == ':' ? 'grep -i '
.expand("%:f") . Reposition() : 'grf')
function! Reposition()
call feedkeys("\\")
return ""
endfun
Thanks Yakov! It works. :)
I still don't understand why ^V^V^M or ^V^V
Yakov Lerner wrote:
On 8/21/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
> Yakov Lerner wrote:
> > I want to make saving of unnamed buffers possible as follows:
> > When I do :w on a unnamed buffer, I want it to save to the
> > file /tmp/N w
Hi,
A.J.Mechelynck wrote:
>
> Yakov Lerner wrote:
> >
> > I fixed another bug, the '*' missing in the autocommand:
> >
> > au BufWritePre * if(expand('%') == '') | exe "file ".TempName() | endif
> > au BufWritePre * if(expand('%') == '') | exe "saveas ".TempName() | endif
> >
> > , but still no l
On 8/21/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
Hi,
A.J.Mechelynck wrote:
>
> Yakov Lerner wrote:
> >
> > I fixed another bug, the '*' missing in the autocommand:
> >
> > au BufWritePre * if(expand('%') == '') | exe "file ".TempName() | endif
> > au BufWritePre * if(expand('%') == '') | ex
On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 8/21/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
>> On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
>> > Yakov Lerner wrote:
>> > > I want to make saving of unnamed buffers possible as follows:
>> > > When I do
Now that my attempt to write unnamed buffer under
name /tmp/N failed, I want to autoname empty buffer.
My first attempt does not work. Autoevent is ot invoked.
function! TempName()
let x=1
while filereadable("/tmp/".x)
let x = x + 1
endwhile
return "/tmp/".x
endfun
au BufNew *
Hi,
Yakov Lerner wrote:
>
> Now that my attempt to write unnamed buffer under
> name /tmp/N failed, I want to autoname empty buffer.
> My first attempt does not work. Autoevent is ot invoked.
>
> function! TempName()
> let x=1
> while filereadable("/tmp/".x)
> let x = x + 1
>
Yakov Lerner wrote:
Now that my attempt to write unnamed buffer under
name /tmp/N failed, I want to autoname empty buffer.
My first attempt does not work. Autoevent is ot invoked.
function! TempName()
let x=1
while filereadable("/tmp/".x)
let x = x + 1
endwhile
return "/tmp/".
Hi vimmers,
when I try to write (:w) a certain buffer, I get E505 (~ "file XXX is
write-protected, override with w!").
The protection seems to be set by Vim, not the OS (WinXP). So I looked
for the "readonly" option value,
but it's set to "noreadonly". I also checked "write", which is set t
Yakov Lerner wrote:
Now that my attempt to write unnamed buffer under
name /tmp/N failed, I want to autoname empty buffer.
My first attempt does not work. Autoevent is ot invoked.
Hello!
The autocmd system is always invoked based on the buffer name.
Thus it appears none of the autocmds will f
Hi,
Wolfgang Schmidt wrote:
>
> when I try to write (:w) a certain buffer, I get E505 (~ "file XXX is
> write-protected, override with w!").
> The protection seems to be set by Vim, not the OS (WinXP). So I looked
> for the "readonly" option value,
> but it's set to "noreadonly". I also checke
Hi,
Charles E Campbell Jr wrote:
> Yakov Lerner wrote:
>
> > Now that my attempt to write unnamed buffer under
> > name /tmp/N failed, I want to autoname empty buffer.
> > My first attempt does not work. Autoevent is ot invoked.
>
>
> The autocmd system is always invoked based on the buffer na
Wolfgang Schmidt wrote:
when I try to write (:w) a certain buffer, I get E505 (~ "file XXX is
write-protected, override with w!").
The protection seems to be set by Vim, not the OS (WinXP). So I looked
for the "readonly" option value,
but it's set to "noreadonly". I also checked "write", which i
Charles E Campbell Jr wrote:
Yakov Lerner wrote:
Now that my attempt to write unnamed buffer under
name /tmp/N failed, I want to autoname empty buffer.
My first attempt does not work. Autoevent is ot invoked.
Hello!
The autocmd system is always invoked based on the buffer name.
Thus it appea
On 8/21/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
Hi,
Yakov Lerner wrote:
>
> Now that my attempt to write unnamed buffer under
> name /tmp/N failed, I want to autoname empty buffer.
> My first attempt does not work. Autoevent is ot invoked.
>
> function! TempName()
> let x=1
> while
Wolfgang Schmidt wrote:
Wolfgang Schmidt wrote:
when I try to write (:w) a certain buffer, I get E505 (~ "file XXX is
write-protected, override with w!").
The protection seems to be set by Vim, not the OS (WinXP). So I
looked for the "readonly" option value,
but it's set to "noreadonly". I also
Wolfgang Schmidt wrote:
A.J.Mechelynck wrote:
Then the file might be write-protected by Windows (any program can
override that if it takes extra steps for it). Try
attrib filename.ext
in CMD.EXE (where "filename.ext" is the name of the file). There are
four possible attributes, each of w
I did the following command to open man pages inside Vim:
nmap K :Man
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat
command! -bar -nargs=1 Man
\ new
\| DoMan
\| %s/.^H//g
\| set filetype=man
\| goto 1
\| set buftype=nofile
It works nice, but I want also to be able to specify the m
I don't know. I'm sending this to the list so someone else may answer.
(Please use "Reply to all" next time.)
Best regards,
Tony.
I got rid of the problem finally now by - rebooting. I looks like
another nice feature of this obscure NTFS file system.
Thanx Tony and Jürgen for your proposal
On 8/21/06, Bob Hiestand <[EMAIL PROTECTED]> wrote:
On 8/21/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Yakov Lerner wrote:
> >
> > Now that my attempt to write unnamed buffer under
> > name /tmp/N failed, I want to autoname empty buffer.
> > My first attempt does not work. Autoevent
Rodolfo Borges wrote:
I did the following command to open man pages inside Vim:
nmap K :Man
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat
command! -bar -nargs=1 Man
\ new
\| DoMan
\| %s/.^H//g
\| set filetype=man
\| goto 1
\| set buftype=nofile
It works nice, but I want also to b
Yakov Lerner wrote:
On 8/21/06, Bob Hiestand <[EMAIL PROTECTED]> wrote:
On 8/21/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Yakov Lerner wrote:
> >
> > Now that my attempt to write unnamed buffer under
> > name /tmp/N failed, I want to autoname empty buffer.
> > My first attempt doe
Hello,
My problem is this:
I am used to pressing Alt_Shift in order to switch languages on
windows, but Doing so in Vim will just change language without
changing keymap. That results in me not being able to use Vim as
keybindings don't work etc.
I'd like to know how it'll be possible to map Al
On 8/21/06, Rodolfo Borges <[EMAIL PROTECTED]> wrote:
I did the following command to open man pages inside Vim:
nmap K :Man
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat
command! -bar -nargs=1 Man
\ new
\| DoMan
\| %s/.^H//g
\| set filetype=man
\| goto 1
\| set buftype=nofile
It
I'm generating short temp names like /tmp/N or ~/tmp/N
where N is number. My first take on the TempName()
function was:
function! TempName()
let x=1
while filereadable("/tmp/".x)
let x = x + 1
endwhile
return "/tmp/".x
endfun
Surprising problem came up. vim#1 choose name /tmp/
On 2006-08-21, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 8/21/06, Jürgen Krämer <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > A.J.Mechelynck wrote:
> > >
> > > Yakov Lerner wrote:
> > > >
> > > > I fixed another bug, the '*' missing in the autocommand:
> > > >
> > > > au BufWritePre * if(expand
Rodolfo Borges wrote:
On 8/21/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Since DoMan (and Man) accept only one argument, separating spaces must
be escaped, which means you cannot do it with the above K mapping.
Oh, really?
I never thought such a thing (that is, "you cannot do something")
wo
Panos Laganakos wrote:
Hello,
My problem is this:
I am used to pressing Alt_Shift in order to switch languages on
windows, but Doing so in Vim will just change language without
changing keymap. That results in me not being able to use Vim as
keybindings don't work etc.
I'd like to know how it'
On 2006-08-21, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> This is nice, but. This works for :new (I tried BufNew),
> but still does not work
> for that empty buffer #1 that is created when vim is invoked without
> commandline arguments.
>
> I want it to work for the initial empty buffer, too.
I
Hi again
I have another question...
I'm trying to make a function to open files for editing from a function.
however I keep getting an error. I have included a very simple functions
that gives the same error message. I understand that one cannot do it
this way, but I don't know how to do it:
Yakov Lerner wrote:
I'm generating short temp names like /tmp/N or ~/tmp/N
where N is number. My first take on the TempName()
function was:
function! TempName()
let x=1
while filereadable("/tmp/".x)
let x = x + 1
endwhile
return "/tmp/".x
endfun
Surprising problem came up. vi
Preben Randhol wrote:
Hi again
I have another question...
I'm trying to make a function to open files for editing from a function.
however I keep getting an error. I have included a very simple functions
that gives the same error message. I understand that one cannot do it
this way, but I don't
On 8/21/06, Preben Randhol <[EMAIL PROTECTED]> wrote:
Hi again
I have another question...
I'm trying to make a function to open files for editing from a function.
however I keep getting an error. I have included a very simple functions
that gives the same error message. I understand that one ca
On 2006-08-21, "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote:
> Preben Randhol wrote:
> > Hi again
> >
> > I have another question...
> >
> > I'm trying to make a function to open files for editing from a function.
> > however I keep getting an error. I have included a very simple functions
> > that g
Forgive me if this is a terribly simple question, but I searched for a
while and couldn't find the solution to this problem.
I'm looking for a simple function that will reformat a selected block of
text for e-mail messages (80 columns long, preserving ">" characters,
etc). Vim Cream can do this v
On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent:
>I'm looking for a simple function that will reformat a selected
>block of text for e-mail messages (80 columns long, preserving
>">" characters, etc). Vim Cream can do this very well, but the
>functionality doesn't easily translate to vanilla V
Thanks a ton! This works very well.
On Tue, Aug 22, 2006 at 12:08:50PM +1000, Pete Johns wrote:
> On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent:
> >I'm looking for a simple function that will reformat a selected
> >block of text for e-mail messages (80 columns long, preserving
> >">" charac
On Mon, Aug 21, 2006 at 10:08:50PM EDT, Pete Johns wrote:
> On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent:
> >I'm looking for a simple function that will reformat a selected
> >block of text for e-mail messages (80 columns long, preserving
> >">" characters, etc). Vim Cream can do this very
On Mon, 2006-08-21 at 23:47:56 -0400, cga2000 sent:
>Someone on the list recently suggested I use "gqip" to reflow
>paragraphs and I was going to suggest that. Much to my delight,
>I later found that it also preserved the ">" characters in
>e-mail messages, so I was going to recommend using that.
On 8/20/06, Yongwei Wu <[EMAIL PROTECTED]> wrote:
This is really an old problem. It begins with VIM 6.
While it is possible to set encoding=UTF-8 on Windows to be able to
process text file in multiple encodings at the same time, the
localized menu/messages has problems. The simplest _vimrc one m
On Mon, Aug 21, 2006 at 11:55:54PM EDT, Pete Johns wrote:
> On Mon, 2006-08-21 at 23:47:56 -0400, cga2000 sent:
> >Someone on the list recently suggested I use "gqip" to reflow
> >paragraphs and I was going to suggest that. Much to my delight,
> >I later found that it also preserved the ">" charac
Hello,
Is there any way to make % jump to the correct parenthesis and ignore a '('
inside a single-quoted string? For example:
if('string(string')
Pressing % while the cursor is at the end of the line will jump to the wrong
'('. Is there any way to fix this? The help page on % does not ment
Sorry, disregard last post, % wasn't working because I didn't actually have %
in cpoptions yet.
--- Peter Hodge <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Is there any way to make % jump to the correct parenthesis and ignore a '('
> inside a single-quoted string? For example:
>
> if('string(s
"A.J.Mechelynck" <[EMAIL PROTECTED]> wrote on 21/08/2006 (23:08) :
>
> The function definition must not be in a script or function which is
> called from an autocommand which is triggered by opening a file for editing.
Ah! Thanks! I understand. I was testing the code by just adding it to my
ftpl
50 matches
Mail list logo