Results 1 to 4 of 4
Hi,
Whenever i want to edit a program i have to type
vim.tiny progname.c.
if i use vi progname.c the arrows are not working correctly.
can anyone please let me ...
- 12-29-2011 #1Just Joined!
- Join Date
- Dec 2011
- Posts
- 3
how to make vim.tiny as default editor
Hi,
Whenever i want to edit a program i have to type
vim.tiny progname.c.
if i use vi progname.c the arrows are not working correctly.
can anyone please let me know how invoke vim.tiny by typing only vi .
and also :syntax on / off commands are not working here.
i am using ubuntu 11.10.
- 12-30-2011 #2
So there are a few things here.
First of all, in your .bashrc (or .zshrc, or whatever shell you're using), set the EDITOR environment variable to the path of your preferred editor. Many programs that automatically launch an editor respect this environment variable.
As for making "vi" refer to /usr/bin/vim.tiny (I'm assuming), you can use aliases. For example, here's a pertinent one:
This alias makes the command:Code:alias vi="/usr/bin/vim -p"
intoCode:vi file1 file2
Add this to your .bashrc and it should all work!Code:/usr/bin/vim -p file1 file2
DISTRO=Arch
Registered Linux User #388732
- 12-30-2011 #3Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
- 12-30-2011 #4
I like to use 'edit' as the alias for my editor. That way I can change editors at will by just editing .bashrc, and still have all my editors available using their names. But that's just me, you can use any alias you want.


Reply With Quote
