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)

chris_on_hints 07-19-2004 08:47 AM

hi frank

the "~/.vim" file will be the preferences file for vim. this goes for most files beginning with "." in your home directory (~/). when you try to run them, the shell will spot that they are not executable files and give a "command not found" error.

when you tried to run vim, you did a "cd /sw/bin" and then "vim". NOTE that this will NOT work. you should have typed "./vim" or been really specific and typed "/sw/bin/vim". unless "." (ie the current directory) is in your $PATH, the shell will not look there. (and its not, cos i have read the previous posts)

the "fink list" that you ran shows that vim was installed. and you can find it in /sw/bin. thats good.

when you install a new program, you need to tell your shell (tcsh or bash etc) that the new program is there. in tcsh, you can type "rehash" and hit enter. you can do something similar in bash - but i cant remember what the command is. The easiest way to do it is to start a new shell: Quit Terminal.app (not just close the window) and then re-start it. The new terminal window will have found your new program.

to check that it can find the correct program, type:

which vim

this should reply with something like "/sw/bin/vim".
if it still says it can't find it, then check that /sw/bin is in your path:

echo $PATH

good luck!!!

you are nearly there!!

in fact, you are probably already there!!

yellow 07-19-2004 09:40 AM

Just type vim at the prompt. The bin directory for fink is already in your path, so it will automatically look there.

fvs 07-19-2004 11:20 AM

Quote:

Originally Posted by yellow
Just type vim at the prompt. The bin directory for fink is already in your path, so it will automatically look there.

Why do I get all this?
[Frank-Sorannos-Computer:~] franksoranno% vim .login

--- Options ---
aleph=224 equalalways keymodel= rulerformat= notextauto
noallowrevins equalprg= keywordprg=man scroll=15 notextmode
noaltkeymap noerrorbells langmap= noscrollbind textwidth=0
autoindent noesckeys langmenu= scrolljump=1 thesaurus=
noautoread eventignore= laststatus=1 scrolloff=0 notildeop
noautowrite noexpandtab nolazyredraw nosecure timeout
noautowriteall noexrc nolinebreak selectmode= timeoutlen=1000
background=light fileencoding= lines=31 shell=/bin/tcsh notitle
backspace= fileformat=unix nolisp shellcmdflag=-c titlelen=85
nobackup fileformats= nolist shellpipe=| tee titlestring=
backupcopy=yes filetype= listchars=eol:$ shellquote= nottimeout
backupext=~ nofkmap loadplugins shellredir=> ttimeoutlen=-1
backupskip=/tmp/* foldclose= magic shellxquote= ttybuiltin
nobinary foldcolumn=0 makeef= noshiftround ttyfast
nobomb foldenable makeprg=make shiftwidth=8 ttymouse=
bufhidden= foldexpr=0 matchtime=5 shortmess= ttyscroll=999
buflisted foldignore=# maxfuncdepth=100 noshortname ttytype=vt100
buftype= foldlevel=0 maxmapdepth=1000 showbreak= undolevels=1000
cdpath=,, foldlevelstart=-1 maxmem=3072 noshowcmd updatecount=200
cedit= foldmethod=manual maxmemtot=3072 noshowfulltag updatetime=4000
charconvert= foldminlines=1 menuitems=25 noshowmatch verbose=0
nocindent foldnestmax=20 nomodeline showmode viminfo=
cinoptions= formatoptions=vt modelines=5 sidescroll=0 virtualedit=
cmdheight=1 formatprg= modifiable sidescrolloff=0 novisualbell
cmdwinheight=7 nogdefault nomodified nosmartcase warn
columns=100 helpheight=20 nomore nosmartindent noweirdinvert
compatible nohidden mouse= nosmarttab whichwrap=
noconfirm history=0 mousemodel=extend softtabstop=0 wildchar=^E
cscopepathcomp=0 nohkmap mousetime=500 nosplitbelow wildcharm=0
cscopeprg=cscope nohkmapp nonumber nosplitright wildignore=
nocscopetag nohlsearch nopaste startofline nowildmenu
cscopetagorder=0 noicon pastetoggle= statusline= wildmode=full
nocscopeverbose iconstring= patchexpr= suffixesadd= winheight=1
debug= ignorecase patchmode= swapfile winminheight=1
nodelcombine iminsert=0 previewheight=12 swapsync=fsync winminwidth=1
dictionary= imsearch=0 nopreviewwindow switchbuf= winwidth=20
nodiff includeexpr= printdevice= syntax= wrap
diffexpr= noincsearch printfont=courier tabstop=8 wrapmargin=0
diffopt=filler indentexpr= printoptions= tagbsearch wrapscan
nodigraph noinfercase noreadonly taglength=0 write
display= noinsertmode remap notagrelative nowriteany
eadirection=both isprint=@,161-255 report=2 tagstack writebackup
noedcompatible joinspaces norevins term=vt100 writedelay=0
encoding=latin1 key= norightleft termencoding=
endofline keymap= noruler noterse
backupdir=.,~/tmp,~/
breakat= ^I!@*-+;:,./?
cinkeys=0{,0},0),:,0#,!^F,o,O,e
cinwords=if,else,while,do,for,switch
comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
commentstring=/*%s*/
complete=.,w,b,u,t,i
cpoptions=aAbBcCdDeEfFgijJkKlLmnoOprsStuwWxy$!%*<
define=^#\s*define
directory=.,~/tmp,/var/tmp,/tmp
errorfile=errors.err
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported
only once,%-G%f:%l: for each function it appears in.),%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[
%*\d]: Entering directory `%f',%X%*\a[%*\d]: Leaving directory `%f',%DMaking %*\a in %f
fileencodings=ucs-bom
fillchars=vert:|,fold:-
foldmarker={{{,}}}
foldopen=block,hor,mark,percent,quickfix,search,tag,undo
foldtext=foldtext()
grepformat=%f:%l:%m,%f:%l%m,%f %l%m
grepprg=grep -n $* /dev/null
helpfile=/sw/share/vim/vim61/doc/help.txt
highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n
:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg
,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText
include=^#\s*include
indentkeys=0{,0},:,0#,!^F,o,O,e
isfname=@,48-57,/,.,-,_,+,,,#,$,%,~,=
isident=@,48-57,_,192-255
iskeyword=@,48-57,_
lispwords=defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-
syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symb
ols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple
-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless
,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,wi
th-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple
-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,w
ith-accessors*,defclass,defmethod,print-unreadable-object
matchpairs=(:),{:},[:]
nrformats=octal,hex
paragraphs=IPLPPPQPP LIpplpipbp
path=.,/usr/include,,
printexpr=system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice) . ' ' . v:fname_in) . de
lete(v:fname_in) + v:shell_error
printheader=%<%f%h%m%=Page %N
runtimepath=~/.vim,/sw/share/vim/vimfiles,/sw/share/vim/vim61,/sw/share/vim/vimfiles/after,~/.vim/
after
scrollopt=ver,jump
sections=SHNHH HUnhsh
selection=inclusive
sessionoptions=blank,buffers,curdir,folds,help,options,winsize
suffixes=.bak,~,.o,.h,.info,.swp,.obj
tags=./tags,./TAGS,tags,TAGS
titleold=Thanks for flying Vim
viewdir=~/.vim/view
viewoptions=folds,options,cursor
Hit ENTER or type command to continue

fvs 07-19-2004 11:22 AM

Quote:

Originally Posted by chris_on_hints
hi frank

the "~/.vim" file will be the preferences file for vim. this goes for most files beginning with "." in your home directory (~/). when you try to run them, the shell will spot that they are not executable files and give a "command not found" error.

when you tried to run vim, you did a "cd /sw/bin" and then "vim". NOTE that this will NOT work. you should have typed "./vim" or been really specific and typed "/sw/bin/vim". unless "." (ie the current directory) is in your $PATH, the shell will not look there. (and its not, cos i have read the previous posts)

the "fink list" that you ran shows that vim was installed. and you can find it in /sw/bin. thats good.

when you install a new program, you need to tell your shell (tcsh or bash etc) that the new program is there. in tcsh, you can type "rehash" and hit enter. you can do something similar in bash - but i cant remember what the command is. The easiest way to do it is to start a new shell: Quit Terminal.app (not just close the window) and then re-start it. The new terminal window will have found your new program.

to check that it can find the correct program, type:

which vim

this should reply with something like "/sw/bin/vim".
if it still says it can't find it, then check that /sw/bin is in your path:

echo $PATH

good luck!!!

you are nearly there!!

in fact, you are probably already there!!

Chris, did you see the results I posted to Yellow, Why all that ? It does every launch?

yellow 07-19-2004 11:25 AM

Quote:

Originally Posted by fvs
Why do I get all this?
[Frank-Sorannos-Computer:~] franksoranno% vim .login

I know nothing about vim. I use pico, emacs, and vi when I must.

fvs 07-19-2004 11:37 AM

Quote:

Originally Posted by yellow
I know nothing about vim. I use pico, emacs, and vi when I must.

Thanks Yellow, I like to thank all of you that replied, especially Yellow for staying with me.
If anyone can please tell me how to launch vim without the introduction it would be appreciated Frank

yellow 07-19-2004 11:53 AM

Strange. I just installed vim-nox via fink, and did vim ~/.login and got:

Code:

# Local .login

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


fvs 07-19-2004 12:01 PM

Quote:

Originally Posted by yellow
Strange. I just installed vim-nox via fink, and did vim ~/.login and got:

Code:

# Local .login

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


Yellow, Do you think this version is too buggy? Is there another vim that's more stable?, or is there something I'm missing? I almost think that I should stick to pico as my editor and forget vim. Frank

yellow 07-19-2004 12:08 PM

I don't think it's buggy.. it's version 6.1. It's very hard to say what is going on. Try this:

vim ~/TESTVIM

Does it open a new blank file in vim?

fvs 07-19-2004 12:40 PM

Quote:

Originally Posted by yellow
I don't think it's buggy.. it's version 6.1. It's very hard to say what is going on. Try this:

vim ~/TESTVIM

Does it open a new blank file in vim?

Yellow it worked, I just have to work my way through the new help pages. Thanks again. Frank

yellow 07-19-2004 12:46 PM

It's quote possible something is misconfigured in your ~/.viminfo and/or ~/.vimrc. Go ahead and quit vim, and remove those 2 files:

rm ~/.vimrc ~/.viminfo

Then do:

vim ~/TESTVIM

And see if it opens as normal. It should. And it will recreate the ~/.viminfo file.


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.