Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).
This tip describes how to install Vim on Solaris 10.
For Sparc based systems
Some package binaries are required.
Download following vim 7.2 binaries from sunfreeware.
- libgcc-3.4.6-sol10-sparc-local.gz from libgcc-3.4.6.
- glib-1.2.10-sol10-sparc-local.gz from glib-1.2.10.
- gtk+-1.2.10-sol10-sparc-local.gz from gtk+-1.2.10.
- ncurses-5.7-sol10-sparc-local.gz from ncurses.
- libiconv-1.13.1-sol10-sparc-local.gz from libiconv.
- libintl-3.4.0-sol10-sparc-local.gz from libintl.
- vim-7.2-sol10-sparc-local.gz from vim 7.2.
1 Login in to your Solaris box and create a temporary directory, for example: # mkdir /tmp/vim 2 Download all binaries to this temporary directory. 3 You should perform this installation as the root user so it will be available to all users on the machine: # su - # Password: ****** 4 Go to the temporary directory: # cd /tmp/vim 5 Unzip all packages: # gunzip libgcc-3.4.6-sol10-sparc-local.gz # gunzip glib-1.2.10-sol10-sparc-local.gz # gunzip gtk+-1.2.10-sol10-sparc-local.gz # gunzip ncurses-5.7-sol10-sparc-local.gz # gunzip libiconv-1.11-sol10-sparc-local.gz # gunzip libintl-3.4.0-sol10-sparc-local.gz # gunzip vim-7.2-sol10-sparc-local.gz 6 Save current "LD_LIBRARY_PATH" in a file: # echo $LD_LIBRARY_PATH > /tmp/vim/ld_path_file 7 Unset your "LD_LIBRARY_PATH" for the current session so Vim installation files will be copied to the default correct location. That way it will work properly with all users. # unset LD_LIBRARY_PATH 8 Run the following commands in given sequence, provide your inputs at the prompt during package installation (you can simply accept the defaults): # pkgadd -d libgcc-3.4.6-sol10-sparc-local # pkgadd -d glib-1.2.10-sol10-sparc-local # pkgadd -d gtk+-1.2.10-sol10-sparc-local # pkgadd -d ncurses-5.7-sol10-sparc-local # pkgadd -d libiconv-1.11-sol10-sparc-local # pkgadd -d libintl-3.4.0-sol10-sparc-local # pkgadd -d vim-7.2-sol10-sparc-local 9 Go to the directory where Vim is installed and verify your Vim installation. # cd /usr/local/bin 10 Run the following command; it should open Vim: # ./vim 11 Exit from Vim (press Esc and type :q!). 12 Create link for "/usr/local/bin/vim" on location where "vi" editor (normally "/usr/bin") is installed, after successful verification in step 10. For this run following command to know location of "vi". # which vi 13 It will show a directory like "/usr/bin/vi". Change to that directory. # cd /usr/bin 14 Run following commands for link creation. # ln -s /usr/local/bin/vim vim # ln -s /usr/local/bin/vimdiff vimdiff 15 Create a "vimrc" file in the "$VIM" directory. To do that, start Vim: # vim 16 Enter the Vim command: :echo $VIM 17 It will output something like "/usr/local/share/vim" 18 Go to this ($VIM) directory # cd /usr/local/share/vim 19 Create vimrc file here with vi editor. # vi vimrc 20 Copy "vimrc" file data from next "vimrc file" section and paste into this file. 21 Save this "vimrc" file and exit from "vi" editor. 22 Run following command so this file will be available to all users # chmod 755 /usr/local/share/vim/vimrc 23 Now you can use vim and vimdiff instead of vi. # vim abc.txt # vimdiff abc.txt efg.txt 23 Run the following command to restore "LD_LIBRARY_PATH": # export LD_LIBRARY_PATH=`cat /tmp/vim/ld_path_file`
vimrc file
set nocompatible set history=50 set undolevels=100 set viminfo='20,\"50 set showmode syntax on set ignorecase set tabstop=4 set shiftwidth=4 set background=light highlight Normal guibg=White guifg=Black set backspace=2 set noerrorbells set laststatus=2 set cmdheight=1 set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ line:%l\ col:%c%V set foldenable set showmatch set lz nnoremap <F3> <Esc>nl inoremap <F3> <Esc>nli inoremap <C-H> <Esc>:%s/search/replace/gc nnoremap <C-W> gti inoremap <C-W> <Esc>gti "set nowrap "// do not wrap lines "set number "// turn on line numbers set nobackup
Comments
In the spirit of Hanlon's razor, "never attribute to malice that which can be adequately explained by stupidity", I have moved this content to this location. An anonymous user completely replaced our title guidelines with this content. It does seem at first glance to be at least somewhat useful, but if you are reading this anonymous user, please don't do it again. Create a new page for new content, do not replace an old page with unrelated stuff. --Fritzophrenic 15:04, July 1, 2010 (UTC)
--Anonymous User: Hi, I have written this article and intention was not to modify any content. I'm sorry if by mistake removed any link. I don't have much idea about style guideline of wikia. The Idea of writing this stuff was "if a user (who is not having good exposure in Unix systems) and search on google about vim installation then we are not getting easy and complete information about this subject at one place". I have faced all these problem so tried to consolidated it at one place. It should save others time. Title can be changed. What i feel any "Article is useful if a user is able to find it from google easily and practically it can be implemented by a novice user". I'm not a person who is after name.
This article might not be useful for experts but "experts were novice sometime before". Hope this clarifies.
I want to add one more small section in this page about "Vim Installation for Solaris on x86 based system". Please suggest how to do it or I'll add it and later if you can arrange it properly then it will be great help, Lack of wikea guideline knowledge will again create problem for me. --July 7, 2010.