[vox-tech] vim question

Matt Roper vox-tech@lists.lugod.org
Tue, 12 Nov 2002 16:55:38 -0800


I think some distributions build the vim executable in such a way that the
GTK interface is always used by default (i.e. without the -g option and
without running 'gvim').  When Rustry tries to edit files as root, the
GTK interface fails to connect to the X server so it falls back to the
console interface after displaying the warning messages he describes.


Matt

On Tue, Nov 12, 2002 at 04:47:58PM -0800, Peter Jay Salzman wrote:
> wierd.  i dunno.   one has nothing to do with the other.
> 
> are you sure running vi is giving xlib errors?   are you using gvim?
> 
> i can't think of any correlation that could possibly explain this...
> 
> pete
> 
> 
> begin Rusty Minden <clownsinc@attbi.com> 
> > I just tried this and it works, but it gives a strange message
> > 
> > Xlib: connection to ":0.0" refused by server
> > Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> > 
> > when in su mode. Why does it do that?
> > 
> > Rusty
> > PS I was in su mode becouse I changed the /etc/vim/vimrc file.
> > 
> > On Tuesday 12 November 2002 12:52 pm, Peter Jay Salzman wrote:
> > > putting this in .vimrc does the trick:
> > >
> > >    " When editing a file, always jump to the last known cursor
> > > position. " Don't do it when the position is invalid or when
> > > inside an event " handler (happens when dropping a file on
> > > gvim).
> > >    "
> > >    autocmd BufReadPost *
> > >       \ if line("'\"") > 0 && line("'\"") <= line("$") |
> > >       \   exe "normal g`\"" |
> > >       \ endif
> > >
> > > i'm still unsure why that one instance of vim does this
> > > automaticaly and all other vims i've used don't.   i suppose i
> > > could use strace to see what other config files are being
> > > pulled in, but at this point i'm more happy than curious.  
> > > ;-)
> > >
> > > pete
> > >
> > >
> > >
> > > begin Peter Jay Salzman <p@dirac.org>
> > >
> > > > hi jan,
> > > >
> > > > the viminfo file just stores information.  it doesn't
> > > > actually do anything by itself.  in other words, the viminfo
> > > > file differs from the .vimrc file in that:
> > > >
> > > > viminfo: stores state data for vim
> > > > .vimrc: a list of vim commands to run at the start of a vim
> > > > session
> > > >
> > > > so how does the cursor get positioned when vim is started?
> > > >
> > > > pete
> > > >
> > > >
> > > >
> > > >
> > > > begin Jan W <jcwynholds@yahoo.com>
> > > >
> > > > > Hi Peter:
> > > > >
> > > > > Look in ~/.viminfo
> > > > >
> > > > > There should be a line like:
> > > > >
> > > > > # File marks:
> > > > > '0  37  0  ~/textfile3.txt
> > > > > '1  35  0  ~/textfile.txt
> > > > >
> > > > > I think that is the place that you are talking about.
> > > > >
> > > > > :)
> > > > >
> > > > > HTHO,
> > > > >
> > > > > jan
> > > > >
> > > > > --- Peter Jay Salzman <p@dirac.org> wrote:
> > > > > > hi lugod,
> > > > > >
> > > > > > i've seen vim on a mandrake system which, when opening a
> > > > > > file a second time, will place the cursor at its last
> > > > > > position when the file was initially opened.
> > > > > >
> > > > > > anyone know how to get vim to do this?
> > > > > >
> > > > > > i've checked the ~/.vimrc and can find nothing that does
> > > > > > this.  i also checked bash aliases to make sure vim
> > > > > > wasn't aliased to vim plus some command line switches.  
> > > > > > nothing.
> > > > > >
> > > > > > i'd like for my own vim to do this.  anyone know the
> > > > > > magic?
> > > > > >
> > > > > > pete
> > 
> > _______________________________________________
> > vox-tech mailing list
> > vox-tech@lists.lugod.org
> > http://lists.lugod.org/mailman/listinfo/vox-tech
> 
> -- 
> Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

-- 

*************************************************
* Matt Roper <matt@mattrope.com>                *
* http://www.mattrope.com                       *
* PGP Key: http://www.mattrope.com/mattrope.asc *
*************************************************