The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Vim Question? (http://hintsforums.macworld.com/showthread.php?t=25789)

fvs 07-16-2004 12:17 PM

Here it is:


source /sw/bin/init.csh

alias cp cp -i \!\*
alias mv mv -i \!\*
alias trash mv \!\* ~/.Trash
alias print="lpr -P"
set path = ( $path /Developer/Tools )
setenv VISUAL vim
setenv DISPLAY :0
set path = ( $path ~/bin )
alias rm rm -i \!\*
find . -name $1 -print
set prompt='%d:%D %# '
umask 022
Fri:16 % rehash
Fri:16 % cd /Applications/Utilities/Terminal.app/
Fri:16 % echo $PATH
/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
Fri:16 %

fvs 07-16-2004 12:29 PM

Sao, Thanks for trying to help. I must be helpless with this problem, I'm just not going to use vim for now and stick to pico for the time being. I feel very guilty for taking up so much of your time with this thread.
I sure appreciate this forum. It's Great. Thanks once more. Frank

sao 07-16-2004 12:39 PM

fvs,

I understand...but one more thing you could try is to mv your ~/.tcshrc away and create a new one with only 'source /sw/bin/init.csh' to see if it works.

First run:

cd (to go to your home directory)

Then:

mv .tcshrc .tcshrc_bak

Then:

pico .tcshrc (to open the text editor Pico, and create a file named .tcshrc)

When the text editor open, type:

source /sw/bin/init.csh

at the end of the line press Return once.

Then press Control-O, Return, and control-X

to save the file and return to the prompt.

Now you should type rehash or close-open the terminal window.

Open Terminal.app again and run:

echo $PATH

yellow 07-16-2004 12:45 PM

Quote:

Originally Posted by fvs
Yellow I did notice this reply:
2) Having . (current working directory) as part of your path is not a good idea. I can be used to exploit and compromise your UNIX box.

How am I supposed to have my path set without the current working directory, Can you show me.
Thanks for all the help. Frank

Please read (look for the header "Stealing Superuser"):
http://www.busan.edu/~nic/networking/puis/ch04_03.htm

You don't need your current working directory as part of your path. If you're trying to run an application/binary that is in the same directory as you, simply append ./ to it. For example:

If I am in the /usr/local/bin directory, and that directory isn't part of my path, and I need to run "foo.binary", all I have to do is type ./foo.binary and it will run. The "./" means, look for the following command in the current working directory.

fvs 07-16-2004 01:06 PM

Chris,This is all I get,
Fri:16 % cd /Applications/Utilities/Terminal.app/
Fri:16 % sw_vers
ProductName: Mac OS X
ProductVersion: 10.2.6
BuildVersion: 6L60
Fri:16 % fink -V
fink: Command not found.
Fri:16 % echo $SHELL
/bin/tcsh
Fri:16 % echo $0
-tcsh
Fri:16 %

yellow 07-16-2004 01:16 PM

Quote:

Originally Posted by fvs
Chris,This is all I get,
Fri:16 % cd /Applications/Utilities/Terminal.app/

Fvs, there's no need to type the above part.

Try this to get the fink version:

/sw/bin/fink -V

After that, try sao's post above about moving and replacing yout .tcshrc with a fresh clean copy.

fvs 07-16-2004 01:56 PM

Yellow, I did what sao told me only to get an error message with 101 eroors. here is what you asked for.
/sw/bin/fink -V
Package manager version: 0.18.4
Distribution version: 0.6.3

Copyright (c) 2001 Christoph Pfisterer
Copyright (c) 2001-2003 The Fink Package Manager Team
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
I personaly think something in my terminal is corrupt or I screwed up something in the terminal, Any way to start a new clean terminal? Did you see Chris results from his Terminal.app and then look at mine, Their not the same in detail. Hey guys thanks this is beating me. Frank

yellow 07-16-2004 02:13 PM

Please post the results of:

ls -laF ~

Also, your fink installation is quite out of date. Current is:

yellow% fink -V
Package manager version: 0.20.5
Distribution version: 0.7.0.cvs

But we'll get to that when we get to that.

fvs 07-16-2004 06:48 PM

ls -laF ~
total 288
drwxr-xr-x 50 franksor staff 1700 Jul 16 14:02 ./
drwxrwxr-t 5 root wheel 170 Dec 16 2003 ../
-rwxr-xr-x 1 franksor staff 15364 Jul 16 14:02 .DS_Store*
-rw-r--r-- 1 franksor staff 0 Dec 16 2003 .MCXLC
drwx------ 3 franksor staff 102 Jul 15 19:28 .Trash/
-rw-r--r-- 1 franksor staff 0 Jul 8 13:31 .addressbook
-rw------- 1 franksor staff 2285 Jul 8 13:31 .addressbook.lu
-rw------- 1 franksor staff 5173 Jul 16 14:00 .bash_history
-rw-r--r-- 1 franksor staff 206 Jul 15 13:24 .bash_profile
-rwxr-xr-x 1 franksor staff 94 Jul 16 14:02 .bashrc*
-rw-r--r-- 1 franksor staff 77 Jul 15 17:55 .cshrc
-rw------- 1 franksor staff 71 Jun 24 08:13 .cvspass
drwxr-xr-x 3 franksor staff 102 Jul 14 07:03 .emacs.d/
-rw-r--r-- 1 franksor staff 59 Jul 4 15:54 .exrc
-rw-r--r-- 1 franksor staff 257 Jul 15 18:02 .login
-rw-r--r-- 1 franksor staff 20 Jul 16 09:03 .lpoptions
-rw------- 1 franksor staff 11816 Jul 13 15:36 .pine-debug1
-rw------- 1 franksor staff 11465 Jul 8 14:32 .pine-debug2
-rw------- 1 franksor staff 16330 Jul 8 14:28 .pine-debug3
-rw------- 1 franksor staff 15935 Jul 8 14:22 .pinerc
-rwxr--r-- 1 franksor staff 65 Jul 13 17:51 .profile*
-rw-r--r-- 1 franksor staff 1204 Dec 27 2003 .rmprops
-rw-r--r-- 1 franksor staff 25 Jul 16 13:34 .tcshrc
-rwxr-xr-x 1 franksor staff 269 Jul 16 12:30 .tcshrc_bak*
-rw------- 1 franksor staff 2744 Jul 16 13:44 .viminfo
-rw-r--r-- 1 franksor staff 24 Jul 15 19:15 .vimrc
drwxrwxrwx 10 franksor staff 340 Jul 14 13:34 Advanced FileMaker/
drwx------ 8 franksor staff 272 Jun 13 18:16 BU Documents/
drwxr--r-- 4 franksor staff 136 Jul 1 19:21 Business AW6/
drwxr--r-- 4 franksor staff 136 Jul 14 13:34 Business Fp5/
drwxr--r-- 5 franksor staff 170 Jun 19 15:29 CAP Jobs/
drwxr-xr-x 9 franksor staff 306 Jul 16 18:35 Desktop/
drwxr--r-- 10 franksor staff 340 Jul 6 08:34 Documents/
drwxr-xr-x 10 franksor staff 340 Jul 15 19:28 Download Bin/
drwxr--r-- 8 franksor staff 272 Jun 13 18:16 Family & Library FP5/
drwxrwxrwx 3 franksor staff 102 Apr 12 22:20 FinkCommander.app/
drwxrwxrwx 20 franksor staff 680 Jul 6 16:19 Frank Soranno???s Movie/
drwx------ 41 franksor staff 1394 Jul 12 13:32 Library/
drwx------ 6 franksor staff 204 Jun 10 07:10 Music/
drwx------ 5 franksor staff 170 Jul 6 16:14 Pictures/
drwxr-xr-x 5 franksor staff 170 Jun 19 15:29 Public/
drwxr--r-- 6 franksor staff 204 Jan 12 2004 Sites/
drwxrwxrwx 16 franksor staff 544 Jun 10 19:23 VTC movies/
drwxr--r-- 6 franksor staff 204 May 9 11:56 Year 2003 File/
drwxr--r-- 7 franksor staff 238 Jul 16 14:02 bin/
drwxr--r-- 16 franksor staff 544 Jul 15 11:25 filebin/
-rwxr-xr-x 1 franksor staff 347 Jul 13 16:08 greeting*
drwx------ 5 franksor staff 170 Jul 8 14:28 mail/
drwxr--r-- 11 franksor staff 374 Jul 5 08:03 safety/
-rwxrw-rw- 1 franksor staff 23 Jul 1 18:23 sfind*
[Frank-Sorannos-Computer:~] franksoranno%

yellow 07-16-2004 09:40 PM

Are you an admin on this computer?

fvs 07-17-2004 06:55 AM

Single user and admin

yellow 07-17-2004 09:37 AM

OK.

Do these steps one at a time to clean up your account:

mv .bash_profile .bash_profile.bak

mv .bashrc .bashrc.bak

mv .cshrc .cshrc.bak

mv .tcshrc .tcshrc.bak

mv .login .login.bak

Quit Terminal.app (or whatever terminal application you're using) and then ReOpen it.

Post back when you're done with all that.

fvs 07-17-2004 07:47 PM

It's done. Frank

yellow 07-18-2004 02:47 PM

Now,

pico ~/.login

And put in:

setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
source /sw/bin/init.csh


Save and close it. Quit Terminal.app, then reopen Terminal.app. Then in the new window:

echo $PATH

And post that back here.

fvs 07-18-2004 03:53 PM

Last login: Sun Jul 18 15:40:14 on tty??
Welcome to Darwin!
[Frank-Sorannos-Computer:~] franksoranno% echo $PATH
/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
[Frank-Sorannos-Computer:~] franksoranno%

Hi Yellow, I looks good, I removed vim-nox and just want my old vi back, How can I get the old version back? I remove all of vim* and theirs not a trace in my terminal. Can you give me some direction. Thanks Frank

yellow 07-18-2004 04:27 PM

Quote:

Originally Posted by fvs
Last login: Sun Jul 18 15:40:14 on tty??
Welcome to Darwin!
[Frank-Sorannos-Computer:~] franksoranno% echo $PATH
/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
[Frank-Sorannos-Computer:~] franksoranno%

your path is now correct for using fink. I think now you should tell fink to update itself to the latest version. Try this:

fink selfupdate

fvs 07-18-2004 04:59 PM

I did the fink selfupdate, In fink list I only see vim 6.1 and vim-nox 6.1, the first down load I pick vim-nox because I'm not running X and to down load vim /with all other 12 programs takes forever, I'm on dialup modem and it takes forever. I just want vi editor simple. Don't need all the extras.
Can you show me the way? Frank

yellow 07-18-2004 09:34 PM

fink install vim-nox

fvs 07-19-2004 07:48 AM

Quote:

Originally Posted by yellow
fink install vim-nox

Yellow, I downloaded vin-nox from fink sucessfully and went to /sw/bin. tried to launch vim, to no avail;
[Frank-Sorannos-Computer:~] franksoranno% ~/.vim
/Users/franksoranno/.vim: Command not found.
[Frank-Sorannos-Computer:~] franksoranno% cd /sw/bin
[Frank-Sorannos-Computer:/sw/bin] franksoranno% ls
822-date dpkg-deb gzexe tic
apt-cache dpkg-distaddfile gzip toe
apt-cdrom dpkg-genchanges iconv tput
apt-config dpkg-gencontrol infocmp tset
apt-extracttemplates dpkg-name infotocap unzip
apt-get dpkg-parsechangelog init.csh unzipsfx
apt-sortpkgs dpkg-query init.sh view
bunzip2 dpkg-scanpackages md5sum vim
bzcat dpkg-scansources msgcmp vimdiff
bzcmp dpkg-shlibdeps msgcomm vimtutor
bzdiff dpkg-source msgfmt which
bzegrep dpkg-split msgmerge xgettext
bzfgrep dselect msgunfmt xxd
bzgrep editor ngettext zcat
bzip2 ex pager zcmp
bzip2recover fink pathsetup.sh zdiff
bzless fink-virtual-pkgs reset zforce
bzmore funzip rview zgrep
captoinfo gettext rvim zipgrep
clear gettextize savelog zipinfo
dpkg gnutar sensible-editor zless
dpkg-architecture gtar sensible-pager zmore
dpkg-buildpackage gunzip tack znew
dpkg-checkbuilddeps gzcat tar
[Frank-Sorannos-Computer:/sw/bin] franksoranno% vim
vim: Command not found.
[Frank-Sorannos-Computer:/sw/bin] franksoranno%
check results? What next? Frank

fvs 07-19-2004 07:59 AM

Checked fink list of installed packages;
i file-spec-pm 0.82-1 Perform operations on file names
i fink 0.20.5-1 The Fink package manager
i fink-mirrors 0.20.2.1-1 Mirror infrastructure
i fink-prebinding 0.7.1-2 Tools for enabling prebinding in Fink
i gcc2 2.95.2-1 [virtual package representing the gcc 2.95.2 compiler]
i gcc2.95 2.95.2-1 [virtual package representing the gcc 2.95.2 compiler]
i gcc3.1 3.1-1 [virtual package representing the gcc 3.1 compiler]
i gcc3.3 3.3-1 [virtual package representing the gcc 3.3 compiler]
i gettext 0.10.40-18 Message localization support
i gettext-bin 0.10.40-18 Executables for gettext package
i gettext-dev 0.10.40-18 Developer files for gettext package
i gzip 1.2.4a-6 The gzip file compressor
i libiconv 1.9.1-11 Character set conversion library
i libiconv-bin 1.9.1-11 Executables for libiconv package
i libiconv-dev 1.9.1-11 Developer files for libiconv package
i macosx 10.2.6-1 [virtual package representing the system]
i ncurses 5.3-12 Full-screen ascii drawing library
i ncurses-dev 5.3-12 Shared libraries for ncurses package
i ncurses-shlibs 5.3-12 Shared libraries for ncurses package
i storable-pm 1.0.14-6 Placeholder for versioned Storable packages
i storable-pm560 1.0.14-3 Perl module for persistent data structures, v. 5.6.0
i system-java13 1.3.1-1 [virtual package representing Java 1.3.1]
i system-java13-dev 1.3.1-1 [virtual package representing Java 1.3.1 development headers]
i system-perl 5.6.0-1 [virtual package representing perl]
i tar 1.13.25-12 GNU tar - tape archiver
i test-harness-pm 2.26-2 Run perl test scripts with statistics
i test-simple-pm 0.47-1 Basic utilities for writing tests
i unzip 5.50-4 Decompression compatible with pkunzip
i vim-nox 6.1-12 Improved version of the editor "vi"
[Frank-Sorannos-Computer:/sw/bin] franksoranno%
It's in there.


All times are GMT -5. The time now is 10:36 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.