Vim install is messed up

Hey all, I've been having erratic vi behavior in 9.1 so I am trying to install vim (that's the fix in Linux). This is the second vim install I've tried and this install is taking as long as the last one. I thought a vim install would only take about two minutes and I'm up to 47 minutes and counting. Has anyone else tried this? Is it just me or is something messed up with the install? I'm new to FreeBSD so I'm not sure if this is normal behavior.

Thanks,

Joe B
 
@kpa, I will give that a try.

@wblock@,
  • using arrow keys in Insert Mode or Command Mode usually enters a character (not just a, b, c or d) and then a line feed
  • backspace produces an error message at the bottom of the page -- ^? isn't a vi command
  • unable to return to Insert Mode

That's all I can think of off the top of my head.

Thanks guys or gals,

Joe B
 
Last edited by a moderator:
@kpa, now that is what I'm talking about. Two minutes and done. Thank you very much for that little tidbit that's going to save me a lot of grief.

Thanks,

Joe B
 
Last edited by a moderator:
Well, $TERM gives me more than just xterm:

Code:
root@FreeNag:/usr/ports/editors/vim-lite # $TERM
xterm: Command not found.

Does that tell you anything? FWIW I was able to install Vim-lite in about two minutes but I haven't had a chance to test it yet. Does the "Command not found" error point to something wrong? I'm building this into a Nagios server and I don't want to have to wipe everything and start fresh later on.

Thanks,

Joe B
 
Ok, it comes back as xterm.

Vi still isn't working right and now I have a new symptom -- I was in Insert Mode and as I was right-arrowing across a lower-case word I was converting the letters to upper-case letters. I'm going back to Nano; I've had much better luck with it.

Thanks,

Joe B
 
This is my .vimrc, try it if it solves the problems for you:

Code:
set lcs=tab:>-
set list
set ruler
syn on
set nomodeline
set softtabstop=4
set noautoindent
set tabstop=4
set shiftwidth=4
set expandtab
set backspace=indent,eol,start

The defaults for both vi(1) and editors/vim are somewhat unusable if you're more used to other editors like nano.
 
jbruyet said:
Ok, it comes back as xterm.

Vi still isn't working right and now I have a new symptom -- I was in Insert Mode and as I was right-arrowing across a lower-case word I was converting the letters to upper-case letters.

~ is the convert-to-uppercase command. This still suggests a problem with terminal settings. What have you modified? /etc/ttys, maybe?

editors/nano uses the same terminal emulation as everything else. The commands are not the same, so it won't have the same problems, but it will still not work right.
 
Hi @wblock. Sorry about the long delay; this was superseded by other projects at work. I haven't made any changes to any of the files. I am using a program called mRemoteNG to SSH in to all of my servers. I don't know if that would do anything. As to using Nano, I've been using it without any problems. In fact, when I've had problems with vi in my Linux servers I used Nano instead. Up until I learned about the vim install fix for vi.

Thanks,

Joe B
 
Last edited by a moderator:
There may be terminal emulation options in mRemoteNG. PuTTY has keyboard options that have to be chosen to work correctly with FreeBSD.
 
@wblock@, there is a PuTTY configuration option and that option opens PuTTY for making the changes. I changed the "The Function keys and keypad" option from ESC[n~ to VT100+ and that seemed to make things work a little better but we're still not there -- I tried to backspace over some characters and that made them upper-case, then doing a capital I moved the cursor to home on that line. Any suggestions for more tweaks?

Also, I was looking for my .vimrc file and can't find anything. @kpa, are you still out there? Where do I find my .vimrc file?

Thanks,

Joe B
 
Last edited by a moderator:
jbruyet said:
wblock, there IS a PuTTY configuration option and that option opens PuTTY for making the changes. I changed the "The Function keys and keypad" option from ESC[n~ to VT100+

If this is PuTTY, just a second...

Set Backspace to Control-H.
Set Home and End keys to Standard.
Set Function Keys and keypad to Linux.

In your .cshrc, set
Code:
bindkey "\e[1~" beginning-of-line
bindkey "\e[3~" delete-char

and that seemed to make things work a little better but we're still not there -- I tried to backspace over some characters and that made them upper-case, then doing a capital I moved the cursor to home on that line.

That capital I is working as intended.
 
Back to vim install, original issue here, I have the same problem with vim-lite. If I use ports, I get (first, I installed gettext via ports) :
Code:
root@EL001:/usr/ports/editors/vim-lite # make install clean
=> 7.3.008 doesn't seem to exist in /usr/ports/distfiles/vim.
=> Attempting to fetch http://artfiles.org/vim.org/patches/7.3/7.3.008
7.3.008                                       100% of   11 kB  127 kBps
=> 7.3.009 doesn't seem to exist in /usr/ports/distfiles/vim.
=> Attempting to fetch http://artfiles.org/vim.org/patches/7.3/7.3.009
7.3.009                                       100% of 3197  B  482 kBps
.....
=> 7.3.052 doesn't seem to exist in /usr/ports/distfiles/vim.
=> Attempting to fetch http://artfiles.org/vim.org/patches/7.3/7.3.052
7.3.052                                       100% of   10 kB  122 kBps
=> 7.3.053 doesn't seem to exist in /usr/ports/distfiles/vim.
=> Attempting to fetch http://artfiles.org/vim.org/patches/7.3/7.3.053
^Cfetch: transfer interrupted

If I use pkg_add, I get:
Code:
root@EL001:/mnt/support/tarballs # pkg_add vim-lite-7.3.669.tbz
pkg_add: warning: package 'vim-lite-7.3.669' requires 'libiconv-1.14', but 'libiconv-1.14_1' is installed
pkg_add: warning: package 'vim-lite-7.3.669' requires 'gettext-0.18.1.1', but 'gettext-0.18.1.1_1' is installed

I read a lot of posts dating 2009 with a big mess related to the 7.2.041% patch, including a solution with a Makefile patch, but nothing that works for me with 7.3

Last, I am on a fresh install of FreeBSD 9.1 on a server, and I am a FreeBSD newbie. I want vim to help in the install process because it is conveniant for me - then I will uninstall it.

Any clue please?
 
Thanks @kpa. This is a crazy situation, but I have re-run it. Gracefully, I have to go outside this afternoon. I hope it will have succeeded in the time between!
.....
6 hours after on a dual core, it works !!! Just creasy for a footprint of only 90 Mb. Thanks again.
 
Last edited by a moderator:
@kpa, I can't find a .vimrc file. I looked in the locations listed in the man pages but nothing there. I tried using locate but that didn't help either; it just did a carriage return.

@wblock, I made the PuTTY tweaks. The only .cshrc file I had was dot.cshrc so I made the two additions there. I'll try it this way and see if I notice a difference.

Thanks,

Joe B
 
Last edited by a moderator:
@wblock, those tweaks didn't help. I was just working on a .cfg file (Nagios) and the right-arrow key deleted the line I was working on.

Everybody have a great weekend,

Joe B
 
Last edited by a moderator:
jbruyet said:
kpa, I can't find a .vimrc file. I looked in the locations listed in the man pages but nothing there. I tried using locate but that didn't help either; it just did a carriage return.

Creates ~/.vimrc and customize it with @kpa's configuration. You can see a list of options that can be preset by entering the following command [CMD=]:set all[/CMD]

For more information on what a particular option just type [CMD=]:help option_name[/CMD]
 
Last edited by a moderator:
Ok, I created the .vimrc file and filled it with @kpa's values (post #10) but no joy. I found another site that recommended the following settings so vi would operate in FreeBSD just like it works in Linux. It didn't work either:

Code:
set nocompatible
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
set incsearch
set virtualedit=all
set bs=2

These are the only entries in .vimrc and I was wondering -- are there other default entries in my .vimrc file that I'm overlooking? I Googled FreeBSD .vimrc template but nothing of any value showed up.

Thus far Nano has worked trouble-free for me every time I've used it, if that tells anyone anything.

Thanks,

Joe B
 
Last edited by a moderator:
Editors vi and vim are the same as in Linux. I used Slackware before (and I still do) and it's the same here. The difference is, most of the times under Linux, it's already preconfigured for you (depends on the distro). Here you have to do it yourself.

Luckily for you, vim ships with a sample configuration file, which has all those nice things you're used to already. I dunno in which directory it is, but you can search for it:

Code:
# find / | grep vim | grep sample

At startup vim for a configuration in two possible files: /etc/vimrc and in ~/.vimrc. If the file doesn't exist, it uses the ugly defaults.

In order to use that sleek and sweet config you're probably used to, move that file to the /etc folder. The filename is without the dot.

If you wanna have some user specific settings, you put them in the ~/.vimrc. Example of ~/.vimrc is this:

Code:
set number
set enc=utf-8

As for the long compilation time of the normal vim ... It all depends on your config. If you addded support for some languages you're not sure you'll need, then you should probably uncheck that option.

Erratic vi behavior is the same thing. The configuration is empty, and it's using the ugly default settings.
 
Back
Top