WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Busybox's implementation of vi does not support unicode  (Read 3503 times)

tinycorelinux

  • Guest
Busybox's implementation of vi does not support unicode
« on: September 10, 2020, 09:49:49 PM »
I tried to extract the "vi" command from some linux distributions, but most of the distributions (such as ArchLinux, LinuxMint) provided the vi command is just a link to vim, I tried to find the source code of vi from the Internet, but only I can find the source code of ex-vi. Does anyone know where to get the source code of vi or the binary file of vi (executable file)?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Busybox's implementation of vi does not support unicode
« Reply #1 on: September 10, 2020, 10:19:17 PM »
Hi NONE
I think this is what you want:
http://ex-vi.sourceforge.net/

Before it was released as  vi  it was known as  ex:
Quote
After Haley left Berkeley, Joy redesigned the editor in 1977, when he added a full-screen visual mode to ex, allowing text to be viewed on a full screen rather than only one line at a time.

Ex 1.1 was officially included in the first BSD Unix release in 1978 and it became known as vi after the release of ex 2.0 as part of the second Berkeley Software Distribution in 1979 when the editor was installed under the name "vi" because it automatically took users straight into ex's visual mode.

Found here:
https://www.whoishostingthis.com/resources/vi/

tinycorelinux

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #2 on: September 10, 2020, 10:35:43 PM »
Hi NONE
I think this is what you want:
http://ex-vi.sourceforge.net/
I tested ex-vi before, but it only supports a single-line-at-a-time.(that worse than the mess)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Busybox's implementation of vi does not support unicode
« Reply #3 on: September 10, 2020, 10:44:56 PM »
Hi NONE
Did you try starting it like this:
Code: [Select]
ex -v

tinycorelinux

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #4 on: September 11, 2020, 12:19:06 AM »
Code: [Select]
ex -v
Code: [Select]
rxvt-unicode-256color: Unknown terminal type
Visual needs addressible cursor or upline capability

tinycorelinux

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #5 on: September 11, 2020, 03:15:50 AM »
I installed ncurses.tcz clearly, why is the compiler still reporting an error? How does TCL tell the compiler where to search for libraries?
Code: [Select]
make DESTDIR=./vi install

make[1]: Entering directory '/tmp/ex-050325/libuxre'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/ex-050325/libuxre'
cc -o ex  ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o printf.o ex_version.o mapmalloc.o  -Llibterm -lncurses -L./libuxre -luxre
/usr/local/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
make: *** [Makefile:267: ex] Error 1
« Last Edit: September 11, 2020, 03:40:37 AM by NONE »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Busybox's implementation of vi does not support unicode
« Reply #6 on: September 11, 2020, 04:42:57 AM »
In the last few versions of tinycore we decided to use ncurses wide as a standard as it contains all the functionality of ncurses and ncursesw.

The above means your app needs to link against -lncursesw and not -lncurses.

tinycorelinux

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #7 on: September 11, 2020, 05:04:20 AM »
But, I downloaded and loaded ncurses.tcz before compiling.
...as it contains all the functionality of ncurses and ncursesw.

It need additional links to the libraries?
...needs to link against -lncursesw and not -lncurses.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: Busybox's implementation of vi does not support unicode
« Reply #8 on: September 11, 2020, 05:23:52 AM »
Hi, NONE!

You can try vis.tcz (colorful with lua-based configuration and themes) or vis-nolua.tcz (utilizing Your terminal color scheme). vis.tcz can be enhanced (if You need this) with vis-lexers.tcz. For my taste this editor is great replace for vi, retaining modal editing with most vi commands in their places with many useful additional ones.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Busybox's implementation of vi does not support unicode
« Reply #9 on: September 11, 2020, 07:02:54 AM »
Why do vim and gvim not work for what you need? They support unicode, you just need to make sure you have a font loaded that has the glyphs you need. Vim works in rxvt, at least for me it displays unicode characters except that it displays squares for glyphs it does not have. Gvim will display the little 4 hex digit block instead of squares.

tinycorelinux

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #10 on: September 11, 2020, 07:34:39 AM »
@jazzbiker Thank you for your recommendation. I will try it.

@andyj Both GVIM and VIM can meet my requirements. I am just trying to get familiar with compile software on TCL.

aus9

  • Guest
Re: Busybox's implementation of vi does not support unicode
« Reply #11 on: September 11, 2020, 03:35:43 PM »
backing up what andyj has said, if you see an error for glyph 0x266a you will resolve that with dejavu-fonts-ttf