LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I like Vi in RH9, but Vi on other OSs (slack and freebsd) are... scary (https://www.linuxquestions.org/questions/linux-software-2/i-like-vi-in-rh9-but-vi-on-other-oss-slack-and-freebsd-are-scary-103717/)

dboyer 10-14-2003 03:56 AM

I like Vi in RH9, but Vi on other OSs (slack and freebsd) are... scary
 
I love Vi on redhat... when i hit "i" it goes into insert mode, and says so by printing * INSERT * on the screen... when i hit backspace and delete keys, they do what they're expected to do (delete characters). the arrow keys move the cursor around. All is well with the world.

I have been looking at switching to something else, if even for just a little while to play with it. I tried slackware. Installed fine, blah blah. I tried editing a text file... and i ran into "hell". Hit "i" to go into insert mode.... it says nothing, but does one character before reverting back... i go back into insert mode, and type something, but make a typo. So i try and delete it... won't delete... try and move the cursor, and it starts doing weird things (i would be much more specific but my laptop with slack on it died and i can't remember exactly what it was doing)...

what is causing this? i thought it was slack, but i tried freebsd and its the same way. how can i get whatever it is that RH is doing to happen on slack? im glad i started with RH... Vi is annoying enough on other Distros/OSs to have made me turn my back on linux again (ive been trying it every 6-8 months for a couple years, and just recently found it useful enough to become my main OS).

Its kind of a generic question, but it really boils down to this: Is it some sort of terminal option? Vi option? version of Vi? something i can change on slack or FBSD to make them act the same.

hw-tph 10-14-2003 04:06 AM

On RedHat you are probably using vim (www.vim.org) in compatibility mode to make it act only like vi and don't do any surprising vim-only maneuvers. On other OS's you might find that you are facing a vi clone much more similar than the original.

I suggest you install vim everywhere you go. I know I do. :)


hw

yapp 10-14-2003 05:02 AM

add this to your profile:
Code:

alias vi=vim
For example add it to your ~/.bashrc, ~/.bash_profile, or for a system wide setting:, /etc/profile (system wide), or /etc/profile.d/<add an executable script here>.sh. I've created a /etc/profile.d/default-aliases.sh script, and activated it with:
chmod +x /etc/profile.d/default-aliases.sh
source /etc/profile
(rerun the script in your shell)

I think redhat has already created a vimrc file with settings. Slackware doesn't do things for you, because it can be annoying if you need to find out what they did.

Here is my ~/vimrc:
Code:

syntax on
set number
set autoindent
set ignorecase
set hlsearch
set incsearch

set ruler
set background=dark


pr1sg 10-14-2003 09:21 PM

also try gvim if you are GUI-inclined. pretty, syntax highlighting, etc etc.

dboyer 10-15-2003 02:09 PM

yay.

Next time I get some wacky OS up and running, ill give these a try...

Quote:

I suggest you install vim everywhere you go. I know I do.
At least it isn't just me :-)


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