LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-19-2007, 06:46 PM   #1
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
vim: startup at last cursor position


Guys, I need to figure out how to get vim to start at the last cursor edit position when opening a file previously edited.
In the past my all vim installations have already been set to do that automatically when I invoke the editor, but the current one doesn't.
I've tried the help docs and google, but can't figure it out.
My .vimrc is:

Code:
if &term =~ "xterm"
        if has("terminfo")
       set t_Co=8
       set t_Sf=[3%p1%dm
       set t_Sb=[4%p1%dm
   else
       set t_Co=8
       set t_Sf=[3%dm
       set t_Sb=[4%dm
   endif
endif

syntax enable
colorscheme delek
set showmatch
set noautoindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set ruler
and I do have a .viminfo file that looks ok (I think), but vim doesn't seem to use the info from it to do the above.
If it's any help, this is on Solaris 10 using ksh.
This is a desktop installation, so I do have root access if needed.
 
Old 02-19-2007, 07:29 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Code:
:set history=100
? Else force another .viminfo file with "-i" and see if it does add history lines? Your Vi isnt aliased to use another viminfo file or compiled w/o viminfo usage, right?

Last edited by unSpawn; 02-19-2007 at 07:35 PM.
 
Old 02-19-2007, 09:07 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Original Poster
Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
Like I said, .viminfo has lots of info in it, vim just doesn't start where i left off.
Tried your suggestion (in .vimrc), no effect.
How do I "force another .viminfo file with "-i" ?
I've no idea how it was compiled...
 
Old 02-20-2007, 11:25 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Moved: This thread is more suitable in the Solaris forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Character under cursor in Vim 7.0. judgex Programming 1 08-14-2006 08:06 PM
Vim Cursor Color Mr_Munkey Linux - Software 0 01-06-2006 05:42 PM
blinking cursor and no more upon startup dismas Slackware - Installation 13 11-13-2005 02:14 AM
printf: postion cursor to output columns schneidz Programming 5 09-20-2005 08:59 AM
Changing the start postion of ext2/ext3 a thing Linux - Hardware 1 06-07-2005 06:16 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration