Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: MelbourneBen on June 27, 2010, 04:54:56 AM
-
Hi All,
Basically I want to be able to launch VIM (VI editor) from the shell like you would in unix. So for example if I have a text file I want to view I want to be able to just type vim workbench:misc/text.txt
Is there a way I can intergrate Vim into the shell for this to work?
Cheers
Ben
-
Hello mate,
Yes it's straightforward...if you installed Vi according to the docs you should have a VIM: assign..so you just type VIM:vim workbench:misc/text.txt in your shell. You may want to consider installing Vinced which is soups up the basic shell (e.g. ansi colors).
G'day
-
You can always add a shell alias to the s:Shell-Startup script that will call your editor from its real path using whatever alias you choose.
So, using the VIM: assign mentioned by squidbass for example:
Alias vi vim:vim
Or by using its full path, say it's "Work:Productivity/Vim/vim"
Alias vi "Work:Productivity/vim/vim"
Now, to edit that text file, you would simply type "vi workbench:misc/text.txt" in your shell.
-
You can always add a shell alias to the s:Shell-Startup script that will call your editor from its real path using whatever alias you choose.
So, using the VIM: assign mentioned by squidbass for example:
Alias vi vim:vim
Or by using its full path, say it's "Work:Productivity/Vim/vim"
Alias vi "Work:Productivity/vim/vim"
Now, to edit that text file, you would simply type "vi workbench:misc/text.txt" in your shell.
Yeah I always use shell aliases... just like UNIX hehe (don't tell anyone that though) (http://www.amiga.org/forums/images/icons/icon11.gif)
I used to have one setup for Python too, so I can just launch Python scripts easily. Maybe I had that or the Python dir was part of where AOS looks for programs... it's PATH, can't remember how to set that though...
EDIT: I think it's something like:
path add vim:vim
-
Thanks for your help, will give that a try. :)