DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th February 2016
sorkom sorkom is offline
Port Guard
 
Join Date: Jan 2016
Posts: 10
Default Vi/Vim problems

Hello all,

Has anyone here found problems with vi or Vim in OpenBSD? It's taken me considerably longer to set things like a wallpaper and window settings in X through vi/vim because it's acting very strangely. It's a combination of inserting unwanted characters or sometimes converting characters into a different case, etc. I've found some sources that deals with this but they're all seemingly Linux based but wondered about how widespread this is.

I'm using a basic system (Intel Core i7 based processor on an Asus Z97 motherboard) running a newly installed OpenBSD 5.8.

Thanks,

Sorkom
Reply With Quote
  #2   (View Single Post)  
Old 6th February 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,307
Default

Quote:
Originally Posted by sorkom View Post
It's taken me considerably longer to set things like a wallpaper and window settings in X through vi/vim because it's acting very strangely. It's a combination of inserting unwanted characters or sometimes converting characters into a different case, etc.
Various questions.
  • Have you set the locale to something other than retaining the default?
  • What is the underlying filesystem containing the errant files -- FFS, ext2, etc.?
  • You mention vi(1) & editors/vim. You installed the vim port?
Reply With Quote
  #3   (View Single Post)  
Old 6th February 2016
Funkygoby Funkygoby is offline
Fdisk Soldier
 
Join Date: Aug 2015
Posts: 57
Default

I don't have a OpenBSD box at hand.
Are you using arrow keys and/or home/end keys? Are you under a tty or under a terminal emulator?
As a french guy, I never fully resolved locale and character handling concerning accentued character.
Linux bash also influenced me with using arrow keys in the shell or in vim and that seems to be bash-specific.

If you are like me and want those characters and convenient keys, vim in a terminal emulator with ksh and locale configured is a solution..
Reply With Quote
  #4   (View Single Post)  
Old 6th February 2016
sorkom sorkom is offline
Port Guard
 
Join Date: Jan 2016
Posts: 10
Default

Hello there,

Thanks for the replies. I've resolved it already. I ran vim on my Linux box and then used the command :set backspace and typed the same things into a new .vimrc file on my OpenBSD machine.

I'm using OpenBSD on a local machine, with FFS on the partitions. I was using the arrow keys in insert mode, a habit I got into in other editors but will change to the standard vi/vim navigation method. In answer to the above question about ports, yes, I was did install Vim through ports.
Reply With Quote
  #5   (View Single Post)  
Old 6th February 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,307
Default

Quote:
Originally Posted by sorkom View Post
I've resolved it already. I ran vim on my Linux box and then used the command :set backspace and typed the same things into a new .vimrc file on my OpenBSD machine.
This was the solution?

I ask because your problem was not altogether clear, & it would be good to have something in the archives in case others run into similar problems.
Reply With Quote
  #6   (View Single Post)  
Old 7th February 2016
sorkom sorkom is offline
Port Guard
 
Join Date: Jan 2016
Posts: 10
Default

Certainly,

I had the same problems with vi others had reported elsewhere on-line, that of erroneous characters being entered while I navigated with the arrow keys, while at other times I would get capital letters appear on the screen. I installed vi from the ports in case that resolved the issue, but it didn't. There was no .vimrc file in my home directory so the fix was as follows:

$cat > ./.vimrc
set backspace=eol,indent,start
<Press Ctrl+C>

If there is a .vimrc file in your folder then feel free to edit it with a text editor of your choice to append it, or to use cat >> instead.
Reply With Quote
  #7   (View Single Post)  
Old 7th February 2016
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 587
Default

You can also try, especially in Gnu/Linux, NeoVim.
Building instructions tested by me for OpenBSD-current
http://daemonforums.org/showpost.php...7&postcount=12
It is refactored Vim. One the one hand they claim compatibility with Vim, on the other strong defaults.
Reply With Quote
  #8   (View Single Post)  
Old 8th February 2016
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Indonesia
Posts: 2,226
Default

Quote:
Originally Posted by sorkom View Post
I had the same problems with vi others had reported elsewhere on-line, that of erroneous characters being entered while I navigated with the arrow keys, while at other times I would get capital letters appear on the screen. I installed vi from the ports in case that resolved the issue, but it didn't. There was no .vimrc file in my home directory so the fix was as follows:

$cat > ./.vimrc
set backspace=eol,indent,start
<Press Ctrl+C>

If there is a .vimrc file in your folder then feel free to edit it with a text editor of your choice to append it, or to use cat >> instead.
It's strange that setting 'backspace' fixed your arrow key problem. Arrow keys showing "^[[A", "^[[B" etc. are typically problems with the terminal emulator settings (i.e. the TERM environment variable). Maybe your ~/.vimrc prevented loading a default vimrc? Or maybe you also changed something else?

Here is some background on what the 'backspace' setting does btw.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with X on OpenBSD 5.3 Fugu_bar OpenBSD General 12 10th October 2013 03:44 PM
three problems :) craze OpenBSD Packages and Ports 6 6th March 2011 03:26 PM
Mount USB Problems codeFreak OpenBSD General 2 16th February 2011 08:34 PM
GDM Problems Saint OpenBSD Packages and Ports 4 29th August 2010 09:42 AM
ATI DRI problems harisman FreeBSD General 16 11th May 2008 05:12 PM


All times are GMT. The time now is 05:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick