vim.basic のインストール

Debian TS-WXL

TeraStation で使っている vi は、漢字が使えない(藁。
tswxl:~# which vi
/usr/bin/vi
tswxl:~# ls -l /usr/bin/vi
lrwxrwxrwx 1 root root 20 Mar  6 23:36 /usr/bin/vi -> /etc/alternatives/vi
tswxl:~# ls -l /etc/alternatives/vi
lrwxrwxrwx 1 root root 17 Mar  6 23:36 /etc/alternatives/vi -> /usr/bin/vim.tiny
tswxl:~#
tiny ではない vim をインストールする。

どのパッケージ?

tswxl:~# apt-get update
	:
	:
tswxl:~# apt-cache search vim
	:
	:
vim-addon-manager - manager of addons for the Vim editor
vim-latexsuite - view, edit and compile LaTeX documents from within Vim
vim-scripts - plugins for vim, adding bells and whistles
vim-syntax-gtk - Syntax files to highlight GTK+ keywords in vim
vim-common - Vi IMproved - Common files
vim-dbg - Vi IMproved - enhanced vi editor (debugging symbols)
vim-doc - Vi IMproved - HTML documentation
vim-full - Vi IMproved - enhanced vi editor (transitional package)
vim-gnome - Vi IMproved - enhanced vi editor - with GNOME2 GUI
vim-gtk - Vi IMproved - enhanced vi editor - with GTK2 GUI
vim-gui-common - Vi IMproved - Common GUI files
vim-lesstif - Vi IMproved - enhanced vi editor - with LessTif GUI
vim-nox - Vi IMproved - enhanced vi editor
vim-perl - Vi IMproved - enhanced vi editor (transitional package)
vim-python - Vi IMproved - enhanced vi editor (transitional package)
vim-ruby - Vi IMproved - enhanced vi editor (transitional package)
vim-runtime - Vi IMproved - Runtime files
vim-tcl - Vi IMproved - enhanced vi editor (transitional package)
vim-tiny - Vi IMproved - enhanced vi editor - compact version
vim - Vi IMproved - enhanced vi editor
vimhelp-de - Vi IMproved - Documentation files (German translation)
vim-vimoutliner - script for building an outline editor on top of Vim
iceweasel-vimperator - Iceweasel extension to make it have vim look and feel
zope-externaleditor - Zope External Editor
zopeedit - Helper Application for Zope External Editor
tswxl:~#
普通に vim パッケージをインストールすれば良いみたい。

vim のインストール

tswxl:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libshadow-ruby1.8 irb1.8 libnet-ssleay-perl rdoc libruby ruby1.8 ruby facter rdoc1.8 host libruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8
  libopenssl-ruby libxmlrpc-ruby libnet-libidn-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
Need to get 6389kB of archives.
After this operation, 24.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main vim-runtime 1:7.1.314-3+lenny2 [5595kB]
Get:2 http://ftp.jp.debian.org lenny/main vim 1:7.1.314-3+lenny2 [794kB]
Fetched 6389kB in 43s (145kB/s)
Selecting previously deselected package vim-runtime.
(Reading database ... 20159 files and directories currently installed.)
Unpacking vim-runtime (from .../vim-runtime_1%3a7.1.314-3+lenny2_all.deb) ...
Adding `diversion of /usr/share/vim/vim71/doc/help.txt to /usr/share/vim/vim71/doc/help.txt.vim-tiny by vim-runtime'
Adding `diversion of /usr/share/vim/vim71/doc/tags to /usr/share/vim/vim71/doc/tags.vim-tiny by vim-runtime'
Selecting previously deselected package vim.
Unpacking vim (from .../vim_1%3a7.1.314-3+lenny2_armel.deb) ...
Processing triggers for man-db ...
Setting up vim-runtime (1:7.1.314-3+lenny2) ...
Processing /usr/share/vim/addons/doc
Setting up vim (1:7.1.314-3+lenny2) ...
!tswxl:~#

確認

/usr/bin/vi が vim になったか確認
!tswxl:~# ls -l /usr/bin/vi
lrwxrwxrwx 1 root root 20 Mar  6 23:36 /usr/bin/vi -> /etc/alternatives/vi
tswxl:~# ls -l /etc/alternatives/vi
lrwxrwxrwx 1 root root 18 Sep  5 10:24 /etc/alternatives/vi -> /usr/bin/vim.basic
tswxl:~#
あとからインストールした方の勝ち? basic の方が元々の優先度が高い?
tswxl:~# update-alternatives --display vi
vi - status is auto.
 link currently points to /usr/bin/vim.basic
/usr/bin/vim.tiny - priority 10
 slave vi.it.UTF-8.1.gz: /usr/share/man/it.UTF-8/man1/vim.1.gz
 slave vi.pl.UTF-8.1.gz: /usr/share/man/pl.UTF-8/man1/vim.1.gz
 slave vi.pl.1.gz: /usr/share/man/pl/man1/vim.1.gz
 slave vi.it.1.gz: /usr/share/man/it/man1/vim.1.gz
 slave vi.1.gz: /usr/share/man/man1/vim.1.gz
 slave vi.fr.1.gz: /usr/share/man/fr/man1/vim.1.gz
 slave vi.fr.UTF-8.1.gz: /usr/share/man/fr.UTF-8/man1/vim.1.gz
 slave vi.fr.ISO8859-1.1.gz: /usr/share/man/fr.ISO8859-1/man1/vim.1.gz
 slave vi.pl.ISO8859-2.1.gz: /usr/share/man/pl.ISO8859-2/man1/vim.1.gz
 slave vi.it.ISO8859-1.1.gz: /usr/share/man/it.ISO8859-1/man1/vim.1.gz
 slave vi.ru.1.gz: /usr/share/man/ru/man1/vim.1.gz
/usr/bin/vim.basic - priority 30
 slave vi.it.UTF-8.1.gz: /usr/share/man/it.UTF-8/man1/vim.1.gz
 slave vi.pl.UTF-8.1.gz: /usr/share/man/pl.UTF-8/man1/vim.1.gz
 slave vi.pl.1.gz: /usr/share/man/pl/man1/vim.1.gz
 slave vi.it.1.gz: /usr/share/man/it/man1/vim.1.gz
 slave vi.1.gz: /usr/share/man/man1/vim.1.gz
 slave vi.fr.1.gz: /usr/share/man/fr/man1/vim.1.gz
 slave vi.fr.UTF-8.1.gz: /usr/share/man/fr.UTF-8/man1/vim.1.gz
 slave vi.fr.ISO8859-1.1.gz: /usr/share/man/fr.ISO8859-1/man1/vim.1.gz
 slave vi.pl.ISO8859-2.1.gz: /usr/share/man/pl.ISO8859-2/man1/vim.1.gz
 slave vi.it.ISO8859-1.1.gz: /usr/share/man/it.ISO8859-1/man1/vim.1.gz
 slave vi.ru.1.gz: /usr/share/man/ru/man1/vim.1.gz
Current `best' version is /usr/bin/vim.basic.
tswxl:~#

結果、、、

結果、、、 vim.tiny が原因だと思っていた漢字が使えない問題。
vim.basic でも駄目だった(藁

なんで?

ごそ

ごそ

このファイル、Shift-JIS やん(藁



TS-WXL
楽天市場
amazon
Yahoo ショッピング
Livedoor デパート


NASなど計51製品の価格改定を実施
ハックの記録
LinkStation/玄箱 をハックしよう

大幅な高速化を達成。ネットワーク共有をさらに快適にする 大容量・ハイスピードなネットワーク対応ハードディスク

Copyright (C) 2003-2010 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市