J A G P R E E T wrote:
Hi There,
I have these mappings defined in my .vimrc file.
map :tabnew
map :tabp
map :tabn
I'm using putty(terminal emulator) to access the unix server.
The fist mapping works absolutely fine.
The other two doesn't work at all and gives the error(E388: Couldn't fin
Hi,
I want to be able to have VIM automatically
insert this line:
#!/usr/bin/python
Whenever I open a NEW file with *.py or *.egg extension
for example
under bash
$ vi mycode.py
or
$ vi mycode.egg
or under VI
: e mycode.py
Is it possible?
--
Gundala Viswanath
On 10/18/06, Gundala Viswanath <[EMAIL PROTECTED]> wrote:
Hi,
I want to be able to have VIM automatically
insert this line:
#!/usr/bin/python
Whenever I open a NEW file with *.py or *.egg extension
How about this (in your ~./vimrc):
au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/pyt
hi,
please take a look at vim tip #434 the example there is for *.h and *.cpp
files but you might find some idea from it.
hth,
ymc
- Original Message -
From: "Gundala Viswanath" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, October 18, 2006 4:19 PM
Subject: Automatically adding header into
J A G P R E E T wrote:
[...]
Furthermore I checked shows the definition for the variable under
cursor.
[...]
Oh! I missed this.
The default action for Ctrl-Left is to go to the previous word in the file.
Maybe the mapping which "shows the definition for the variable" is defined
after the on
Thanks Yakov,
It works!
au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/python")
But, how can we insert more than 1 lines?
For example I want:
#!/usr/bin/python
import os
import sys
To be inserted.
--
Gundala Viswanath
Hi Peter,
It doesn't work in this case either.
But I got the solution from Tony.
Thanks a lot for your efforts.
Regards,
Jagpreet
-Original Message-
From: Peter Hodge [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 18, 2006 12:18 PM
To: J A G P R E E T; Vim mailing list
Subject: R
Thanks a ton Tony.
I checked how putty is treating to left and .
The new settings which is working(for putty and xterm as well) in my case
is.
map :tabnew
if has("gui_running") || (&term == "win32") || (&term == "pcterm") || (&term
== "xterm")
map : tabprev
map : tabnext
else
map [D :t
au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/python")
But, how can we insert more than 1 lines?
For example I want:
#!/usr/bin/python
import os
import sys
To build on Yakov's suggestion, you should be able to put
whatever lines you want in a file (called, say
~/.python_template)
Jean-Rene David wrote:
* Lev Lvovsky [2006.10.17 17:15]:
Is it possible to search for a string by
selecting that string in visual mode? Meaning,
if I highlight something, and then want to
search for that thing which is highlighted in
the rest of the doc?
You already got lots of good answer
I'm having a mental block, how can I wrap a string via substitute() ?
I've been trying something like:
let str = "123456789012345678901234567890"
let str = substitute(str, '\n\([[:print:]]\{-10,}\)', '\n\1\n', '')
echo str
to produce:
1234567890
1234567890
1234567890
--
Steve Hal
I'm having a mental block, how can I wrap a string via substitute() ?
I've been trying something like:
let str = "123456789012345678901234567890"
let str = substitute(str, '\n\([[:print:]]\{-10,}\)', '\n\1\n', '')
echo str
to produce:
1234567890
1234567890
1234567890
The following
On 10/18/06, Steve Hall <[EMAIL PROTECTED]> wrote:
I'm having a mental block, how can I wrap a string via substitute() ?
I've been trying something like:
let str = "123456789012345678901234567890"
let str = substitute(str, '\n\([[:print:]]\{-10,}\)', '\n\1\n', '')
echo str
to produce:
From: Tim Chase, Wed, October 18, 2006 6:46 am
>
> > I'm having a mental block, how can I wrap a string via
> > substitute() ?
>
> The following seems to do the trick for me:
>
> echo substitute(str, '[[:print:]]\{,10}', '&\n', 'g')
This nearly works, but is doubling existing line breaks.
The a
On Tue, Oct 17, 2006 at 04:54:21PM -0500, Tim Chase wrote:
> > Let's think big and look for a generic solution. IMHO, it is way
> >too restrictive to insist that a word is anything matching the pattern
> >/\k\+/ . I want a new option, 'wordpat', with a default value of
> >'\k\+', that specifi
Dnia środa, 18 października 2006 10:19, Gundala Viswanath napisał:
> Hi,
>
> I want to be able to have VIM automatically
> insert this line:
:help skeleton
m.
Dnia środa, 18 października 2006 05:13, A.J.Mechelynck napisał:
> Well, I guess if you can configure gvim as your "embedded editor" for
> kdevelop, you will be able to edit your files with Vim and "make
> believe" that you're using kdevelop, so everyone'll be happy. (My SuSE
> system came with kvim
On Wed, Oct 18, 2006 at 01:21:31AM +0200, A.J.Mechelynck wrote:
>
> After reading this thread, I've seen "requests for improvement" to the Vim
> source; but let's try to find (for the time being) something which works in
> the current Vim version.
>
> 1. Em dashes should normally be set apart f
On Wed, Oct 18, 2006 at 12:28:28PM +0200, Robert Cussons wrote:
> Jean-Rene David wrote:
[snip]
> >
> >"--< cut here >---
> >" Search for visually selected text {{{
> >" From an idea by Michael Naumann, Jürgen Krämer.
> >function! VisualSearch(direction) range
>
* Robert Cussons [2006.10.18 06:30]:
> I did notice that between the if and else there
> are " which just act as comments as they are on
> newlines,
Sorry, I should have known that wouldn't come out
right. There's a literal newline between the
quotes. You can enter it by pressing
.
Here's that se
Steve Hall wrote:
From: Tim Chase, Wed, October 18, 2006 6:46 am
I'm having a mental block, how can I wrap a string via
substitute() ?
The following seems to do the trick for me:
echo substitute(str, '[[:print:]]\{,10}', '&\n', 'g')
This nearly works, but is doubling existing line breaks.
Benji Fisher wrote:
On Wed, Oct 18, 2006 at 12:28:28PM +0200, Robert Cussons wrote:
Jean-Rene David wrote:
[snip]
"--< cut here >---
" Search for visually selected text {{{
" From an idea by Michael Naumann, Jürgen Krämer.
function! VisualSearch(direction
Jean-Rene David wrote:
* Robert Cussons [2006.10.18 06:30]:
I did notice that between the if and else there
are " which just act as comments as they are on
newlines,
Sorry, I should have known that wouldn't come out
right. There's a literal newline between the
quotes. You can enter it by press
Jean-Rene David wrote:
* Robert Cussons [2006.10.18 06:30]:
I did notice that between the if and else there
are " which just act as comments as they are on
newlines,
Sorry, I should have known that wouldn't come out
right. There's a literal newline between the
quotes. You can enter it by pre
Preben Randhol wrote:
> I get a blank page when I go to www.vim.org. If I go to vim.sf.net I
> get the vim pages.
>
> A problem with the alias?
The SourceForge VHOST service appears to be down. Maybe someone close
to them can go over there and wake them up?
So you'll have to use vim.sf.net fo
* Benji Fisher [2006.10.18 09:15]:
> I try to avoid such problems by not including raw CR, ESC, etc.
> characters in my vim scripts. I suggest replacing the two :execute
> lines with
> execute "normal ?" . l:pattern . "\"
> and
> execute "normal /" . l:pattern . "\"
I was looking f
Kamaraju Kusumanchi wrote:
If I do
ctrl-W ctrl-]
in normal mode, vim splits the current window horizontally. Is there any way
to achieve the same functionality but with window being split vertically
instead of horizontally?
Here's another solution:
nmap:exe 'vert sta '.expand(""
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ajay Gupta wrote:
> On 10/18/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
>>
>> Note that the messages say that configure is checking for tgetent in
>> termlib, termcap and curses. They say nothing about checking in
>> ncurses. If you want to use ncur
On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I don't think it is happen recently. During the past two years I'd never
sucess in visiting www.vim.org, only vim.sf.net works
--
Sincerely, Pan, Shi Zhu. ext: 2606
Really? A year ago or so www.vim.org was blocked from China, but th
* Robert Cussons [2006.10.18 09:29]:
> Everything seems to work fine now, except the
> searched for items aren't highlighted like they
> normally are when I search
Whether or not search items are highlighted
depends on the value of the 'hlsearch' option.
The search item gets highlighted on my end
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi All,
Was playing with the new built in sort this morning. Found what I
thought was an inconsistency.
Forgive the stilted explanation, I had trouble putting this in words.
I often work out my pattern match using /mypattern/ and observe the
h
Benji Fisher wrote:
On Wed, Oct 18, 2006 at 01:21:31AM +0200, A.J.Mechelynck wrote:
After reading this thread, I've seen "requests for improvement" to the Vim
source; but let's try to find (for the time being) something which works in
the current Vim version.
1. Em dashes should normally be s
Jean-Rene David wrote:
* Robert Cussons [2006.10.18 09:29]:
Everything seems to work fine now, except the
searched for items aren't highlighted like they
normally are when I search
Whether or not search items are highlighted
depends on the value of the 'hlsearch' option.
The search item get
Anupam Srivastava wrote:
[...]
(Vim does compile on my system)
Try to do this.
locate curses.h (or ncurses.h)
locate curses.h
/usr/include/curses.h
/usr/include/curses/curses.h
/usr/include/ncurses.h
/usr/include/python2.4/py_curses.h
/usr/include/slcurses.h
locate libncurses (or libcurses)
On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-14 05:59:29:
>
> map :w:make
> Can some body provide some script to satisfy my more general
> requirement? I want press , then make is called. The error window
> will not be closed unless I do so.
Hello all,
To most of you this is of no interest, but anyway ... :)
I've created keymap files for the two keyboard layouts
used in Bulgaria:
http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-phonetic.vim
and
http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-bds.vim .
Both can be
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
A.J.Mechelynck wrote:
> Anupam Srivastava wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> 1. Forget that shortcut dirname `locate curses.h` thing. It was just to
>> give the idea to Ajay about how to compile by redefinign CPPFLAGS and
Vimmers,
I use vimdiff in gnome-terminal and sometimes in GUI, but the default
color scheme (I found somehow it's not the same as the
"colors/default.vim") sometimes use the same color for both foreground and
background. Most of the color schemes in the colors directory do the same
(same or
I'm having a mental block, how can I wrap a string via
substitute() ?
The following seems to do the trick for me:
echo substitute(str, '[[:print:]]\{,10}', '&\n', 'g')
This nearly works, but is doubling existing line breaks.
The application is this :version pretty-fier:
function! Str_wra
The previous setting gave me white on white in some cases so I added
guibg.
highlight cConstant ctermfg=white ctermbg=grey guifg=white guibg=grey
highlight cString ctermfg=white ctermbg=grey guifg=white guibg=grey
highlight cNumber ctermfg=white ctermbg=grey guifg=white guibg=grey
Regar
Ben K. wrote:
Vimmers,
I use vimdiff in gnome-terminal and sometimes in GUI, but the default
color scheme (I found somehow it's not the same as the
"colors/default.vim") sometimes use the same color for both foreground
and background. Most of the color schemes in the colors directory do the
Hi,
Does any body know a way of automatically going from header file to
its implementation file?! and vice versa?!
Hello
I´m PHP programmer and I started programming in gVim last weak, and I´m
liking it very much
But I got a trouble...
When I´m commenting (// or /* or #) and I type it breaks the line
automatically. Always I start a comment, i have to go to normal mode and
type :set nosta :set noai :set nos
From: Tim Chase, Wed, October 18, 2006 12:00 pm
>
> > The application is this :version pretty-fier:
> >
> > function! Str_wrap(str, len)
> > return substitute(a:str, '[[:print:]]\{,'.a:len.'}','&\n','g')
> > endfunction
>
> I must be missing something...in your original post, you didn't
> have an
* Naim Far [2006.10.18 13:00]:
> Does any body know a way of automatically going
> from header file to its implementation file?!
> and vice versa?!
a.vim : Alternate Files quickly (.c --> .h etc)
http://vim.sourceforge.net/scripts/script.php?script_id=31
--
JR
On 10/18/06, eric1235711 <[EMAIL PROTECTED]> wrote:
Hello
I´m PHP programmer and I started programming in gVim last weak, and I´m
liking it very much
But I got a trouble...
When I´m commenting (// or /* or #) and I type it breaks the line
automatically. Always I start a comment, i have to go
Hello Yakov
I can fix it when I´m programming, i´m doing it... but I´m getting tired of
doing that.
I want to alter the syntax file (or what ever else) to fix it permanently.
Yakov Lerner-3 wrote:
>
> On 10/18/06, eric1235711 <[EMAIL PROTECTED]> wrote:
>>
>> Hello
>>
>> I´m PHP programmer and
On 2006-10-18, eric1235711 <[EMAIL PROTECTED]> wrote:
> Yakov Lerner-3 wrote:
> >
> > On 10/18/06, eric1235711 <[EMAIL PROTECTED]> wrote:
> >>
> >> Hello
> >>
> >> I´m PHP programmer and I started programming in gVim last weak, and I´m
> >> liking it very much
> >>
> >> But I got a trouble...
> >
Hi
I was wondering if there is a way to lock a window such that the
content can only be changed by scripting/commands. Like a preview
window or somthing like that.
is that possible to make in Vim or should I make a feature request to
get it :-)
--
Kim Schulz| Private : http://www.schul
I was wondering if there is a way to lock a window such that the
content can only be changed by scripting/commands. Like a preview
window or somthing like that.
is that possible to make in Vim or should I make a feature request to
get it :-)
Well, as an atrocious hack, assuming you have a fi
Boyko Bantchev wrote:
> To most of you this is of no interest, but anyway ... :)
> I've created keymap files for the two keyboard layouts
> used in Bulgaria:
> http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-phonetic.vim
> and
> http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgaria
SourceForge has fixed the VHOST service, www.vim.org is back!
--
hundred-and-one symptoms of being an internet addict:
72. Somebody at IRC just mentioned a way to obtain full motion video without
a PC using a wireless protocol called NTSC, you wonder how you never
heard about it
/// Br
Thanks Tony and Brady. I got sufficient answers.
Happy vimming,
Ben K.
Developer
http://benix.tamu.edu
--- Robert Cussons <[EMAIL PROTECTED]> wrote:
> Jean-Rene David wrote:
> > * Robert Cussons [2006.10.18 09:29]:
> >
> >>Everything seems to work fine now, except the
> >>searched for items aren't highlighted like they
> >>normally are when I search
> >
> >
> > Whether or not search items are hig
--- Gary Johnson <[EMAIL PROTECTED]> wrote:
> On 2006-10-18, eric1235711 <[EMAIL PROTECTED]> wrote:
>
> > Yakov Lerner-3 wrote:
> > >
> > > On 10/18/06, eric1235711 <[EMAIL PROTECTED]> wrote:
> > >>
> > >> Hello
> > >>
> > >> I´m PHP programmer and I started programming in gVim last weak, and I
Hello,
On 10/18/06, Kim Schulz <[EMAIL PROTECTED]> wrote:
Hi
I was wondering if there is a way to lock a window such that the
content can only be changed by scripting/commands. Like a preview
window or somthing like that.
is that possible to make in Vim or should I make a feature request to
ge
Hello,
When I have formatoptions=t, it makes comment lines wrap when they shouldn't,
and it also ignores whatever comment leader is defined in 'comments'. To
reproduce:
:set formatoptions=roc
:set comments=b:%
:set textwidth=30
% type these lines of text
% as one line, and notice
%
Hi,
I have the following file segments. I want to concatenate all the
lines with their next lines, except that it ends with "}}". I want to
use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
Would you please help me to figure out how to match the lineend without "}}"?
Thanks,
Peng
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Peng Yu wrote:
> Hi,
>
> I have the following file segments. I want to concatenate all the
> lines with their next lines, except that it ends with "}}". I want to
> use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
>
> Would you please
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-18 23:18:14:
> On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > for that simple, don't need any plugin:
> >
> > map :w:make:cope
> >
> > You see, just add the :cope will do the trick.
> >
> > Note that the cursor will be in :cope window then, y
> -Original Message-
> From: Lev Lvovsky [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 17, 2006 5:04 PM
> To: vim@vim.org
> Subject: search visual block
>
> Is it possible to search for a string by selecting that
> string in visual mode? Meaning, if I highlight something,
> and
On Wed 18-Oct-06 8:03pm -0600, Peng Yu wrote:
> I have the following file segments. I want to concatenate all the
> lines with their next lines, except that it ends with "}}". I want to
> use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
>
> Would you please help me to figure out ho
On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-18 23:18:14:
> On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > for that simple, don't need any plugin:
> >
> > map :w:make:cope
> >
> > You see, just add the :cope will do the trick.
-- Forwarded message --
From: Peng Yu <[EMAIL PROTECTED]>
Date: Oct 18, 2006 9:19 PM
Subject: Re: Match something that not in the pattern
To: Bill McCarthy <[EMAIL PROTECTED]>
On 10/18/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
On Wed 18-Oct-06 8:03pm -0600, Peng Yu wrote:
>
--- Peng Yu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following file segments. I want to concatenate all the
> lines with their next lines, except that it ends with "}}". I want to
> use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
[EMAIL PROTECTED] is the look-ahead asser
Hi,
Can the mailing list owner set "Reply-to" field in every mail forward
from this mailing list be "vim@vim.org"?
I replied some mails to the original poster. But sometime I forget to
reply the mails to the mailing list.
Thanks,
Peng
* David Fishburn [2006.10.18 22:00]:
> " Courtesy of Michael Naumann, Jürgen Krämer
> " Visually select text, then search for it
> if version >= 602
> " Here are two enhanced versions of these mappings which use VIM 6.2's
> " getregtype() function to determine whether the unnamed register
>
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-19 10:17:55:
> On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > "Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-18 23:18:14:
> > > Is it possible to not to press the last enter key? It is not very
> > convenient.
> > >
> > > Thanks,
> > > Peng
> >
> >
Bram Moolenaar wrote:
SourceForge has fixed the VHOST service, www.vim.org is back!
I confirm that. If anyone cannot reach this address, it means there is a block
somewhere else along the line; and if (wherever you are) http://www.vim.org/
still draws a blank for you, you might be able to ci
Peng Yu wrote:
Hi,
Can the mailing list owner set "Reply-to" field in every mail forward
from this mailing list be "vim@vim.org"?
I replied some mails to the original poster. But sometime I forget to
reply the mails to the mailing list.
Thanks,
Peng
If they do, you won't be able to (easily)
Hi,
On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-18 23:18:14:
> On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > for that simple, don't need any plugin:
> >
> > map :w:make:cope
> >
> > You see, just add the :cope will do the tr
Peng Yu wrote:
Hi,
I have the following file segments. I want to concatenate all the
lines with their next lines, except that it ends with "}}". I want to
use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
Would you please help me to figure out how to match the lineend without
"}
"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-19 10:22:31:
> Hi,
>
> Can the mailing list owner set "Reply-to" field in every mail forward
> from this mailing list be "vim@vim.org"?
>
> I replied some mails to the original poster. But sometime I forget to
> reply the mails to the mailing list.
>
> Than
Hi Vimmers,
Recently, I've been thinking what this option is designed for.
The document saids that:
when 'background' is set Vim will adjust the default color groups for the
new value. But the colors used for syntax highlighting will not change.
But in fact, I had tested and found that when
* A.J.Mechelynck [2006.10.18 23:30]:
> "Reply to Sender" is meant to reply only to the author of an email.
>
> "Reply to All" is meant to reply to the author and all other recipients.
"Reply to All" usually results in the author
receiving duplicates. However since most mailers
offer nothing but t
On Wednesday 18 October 2006 22:22, Peng Yu wrote:
> Hi,
>
> Can the mailing list owner set "Reply-to" field in every mail forward
> from this mailing list be "vim@vim.org"?
>
> I replied some mails to the original poster. But sometime I forget to
> reply the mails to the mailing list.
>
Use a dec
[EMAIL PROTECTED] wrote:
Hi Vimmers,
Recently, I've been thinking what this option is designed for.
The document saids that:
when 'background' is set Vim will adjust the default color groups for the
new value. But the colors used for syntax highlighting will not change.
But in fact, I had t
Hello,
If you change the background=light, Vim reloads the colorscheme so it has a
chance to give you new colors. But if the colorscheme changes background=dark
again, then Vim knows that the colorscheme isn't capable of picking colors for
a light background. In that case, Vim will just ignore w
"A.J.Mechelynck" <[EMAIL PROTECTED]> 写于 2006-10-19 13:42:46:
> (I "think" I read the help correctly in
> understanding that ctermbg=NONE and ctermfg=NONE are not syntactically
valid
> settings, but I'm not 100% sure that I understood it correctly.)
>
>
> Best regards,
> Tony.
Hi Tony,
Thanks ver
Peter Hodge <[EMAIL PROTECTED]> 写于 2006-10-19 13:44:19:
> Hello,
>
> If you change the background=light, Vim reloads the colorscheme so it has
a
> chance to give you new colors. But if the colorscheme changes
background=dark
> again, then Vim knows that the colorscheme isn't capable of picking
col
On Wed 18-Oct-06 9:20pm -0600, Peng Yu wrote:
> On 10/18/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
>> You're fairly close. Assuming you visually marked those
>> lines, this solution is magic:
>>
>> '<,'>s/\%(}}\)\@>
>> but this solution is very magic:
>>
>> '<,'>s/\v%(}})@>
>> :h /\@>
[EMAIL PROTECTED] wrote:
> "A.J.Mechelynck" <[EMAIL PROTECTED]> 写于 2006-10-19 13:42:46:
>> (I "think" I read the help correctly in
>> understanding that ctermbg=NONE and ctermfg=NONE are not syntactically
> valid
>> settings, but I'm not 100% sure that I understood it correctly.)
>>
>>
>> Best rega
82 matches
Mail list logo