Re: character ^@ in place of new lines

2007-03-11 Thread Raphael Bauduin
Hi, The extra character is the hex 0 character, ga returns <<00>> 0, Hex 00, Octal 000. Just in case someone else get the same problem, I've corrected it by repalcing this line in my script: VIM::Buffer.current.append(0, content) by this: VIM::command('1') VIM::command("norm i"+content)

Re: How to paste without replace the content in buffer

2007-03-11 Thread Andy Wokula
Peng Yu schrieb: Hi, Suppose I want to replace "string1" with "string2" in a file from vim. 1. Highlight "string1" (in visual mode) and then type "y". 2. Highlight "string2" (in visual mode) and then type "p". However, the problem with the above procedure is that "string2", instead of "string1

problems with shortcuts

2007-03-11 Thread Thilo Six
Hello I have the ubuntu vim installed: $ aptitude show vim-full Package: vim-full State: installed Automatically installed: no Version: 1:7.0-164+1ubuntu6 In my .vimrc i have the following keymapping: < " The paste option is intended for i

Removing trailing spaces on BufWrite

2007-03-11 Thread François Ingelrest
Hi, As the title says, I want to automatically remove trailing spaces when I save a file. This is what I put in my vimrc: au BufWrite * %s/\s\+$//ge This works correctly only when at least one match is found, an error is issued if I want to save a file without trailing spaces. However, using th

Re: Removing trailing spaces on BufWrite

2007-03-11 Thread A.J.Mechelynck
François Ingelrest wrote: Hi, As the title says, I want to automatically remove trailing spaces when I save a file. This is what I put in my vimrc: au BufWrite * %s/\s\+$//ge This works correctly only when at least one match is found, an error is issued if I want to save a file without trailin

Re: Removing trailing spaces on BufWrite

2007-03-11 Thread Thilo Six
François Ingelrest wrote the following on 11.03.2007 15:39: > Hi, > > As the title says, I want to automatically remove trailing spaces when > I save a file. This is what I put in my vimrc: > > au BufWrite * %s/\s\+$//ge > > This works correctly only when at least one match is found, an error >

autocomplete from BufReadCmd

2007-03-11 Thread Raphael Bauduin
Hi, I've written a BufReadCmd so that when I edit files starting with radiant/ (I am working with http://www.radiantcms.org ), it lets me edit a certain field of a certain row determined by the path following the radiant/prefix: :au BufReadCmd radiant/* ruby ReadFile( VIM::evaluate( "expand('')"

Re: Removing trailing spaces on BufWrite

2007-03-11 Thread François Ingelrest
Thanks to both of you! I now use this command and it's working perfectly: au BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif On 3/11/07, Thilo Six <[EMAIL PROTECTED]> wrote: François Ingelrest wrote the following on 11.03.2007 15:39: > Hi, > > As the title says, I want to automatic

visual mode acting up

2007-03-11 Thread Simon Jackson
when i have text selected in visual mode, i type 'y' and instead of yanking the text it overwrites it. anyone know why?

Re: visual mode acting up

2007-03-11 Thread Jean-Rene David
* Simon Jackson [2007.03.12 01:30]: > when i have text selected in visual mode, i type 'y' and instead of > yanking the text it overwrites it. anyone know why? Maybe it's been mapped to something else. What does: :verbose vmap y say? Does the overwriting text give a clue to where it came from?

Re: visual mode acting up

2007-03-11 Thread A.J.Mechelynck
Simon Jackson wrote: when i have text selected in visual mode, i type 'y' and instead of yanking the text it overwrites it. anyone know why? Is it Visual or Select mode? (What does it say at bottom left?) In Select mode, hitting a printable key (such as y) replaces the selection. Normally,

eterm and vim

2007-03-11 Thread Simon Jackson
the following entries in my vimrc only work in gvim but will not work in eterm, aterm or xterm: nmap :tabprevious nmap :tabnext map :tabprevious map :tabnext imap :tabpreviousi imap :tabnexti anyone know why?

Re: eterm and vim

2007-03-11 Thread A.J.Mechelynck
Simon Jackson wrote: the following entries in my vimrc only work in gvim but will not work in eterm, aterm or xterm: nmap :tabprevious nmap :tabnext map :tabprevious map :tabnext imap :tabpreviousi imap :tabnexti anyone know why? Open Console Vim with an empty [No Name] buffer, hit i o