Vim on Solaris10

4
Installing on Solaris 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, Sequence must be followed otherwise installation may fail. 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

Transcript of Vim on Solaris10

Page 1: Vim on Solaris10

Installing on Solaris

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/vim2 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/vim5 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.gz6 Save current "LD_LIBRARY_PATH" in a file: # echo $LD_LIBRARY_PATH > /tmp/vim/ld_path_file7 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_PATH8 Run the following commands in given sequence, Sequence must be followed otherwise installation may fail. 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-local9 Go to the directory where Vim is installed and verify your Vim installation. # cd /usr/local/bin10 Run the following command; it should open Vim: # ./vim11 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

Page 2: Vim on Solaris10

13 It will show a directory like "/usr/bin/vi". Change to that directory. # cd /usr/bin14 Run following commands for link creation. # ln -s /usr/local/bin/vim vim # ln -s /usr/local/bin/vimdiff vimdiff15 Create a "vimrc" file in the "$VIM" directory. To do that, start Vim: # vim16 Enter the Vim command: :echo $VIM17 It will output something like "/usr/local/share/vim"18 Go to this ($VIM) directory # cd /usr/local/share/vim19 Create vimrc file here with vi editor. # vi vimrc20 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/vimrc23 Now you can use vim and vimdiff instead of vi. # vim abc.txt # vimdiff abc.txt efg.txt23 Run the following command to restore "LD_LIBRARY_PATH": # export LD_LIBRARY_PATH=`cat /tmp/vim/ld_path_file`

For x86 based systems

Some package binaries are required.

Download following vim 7.2 binaries from sunfreeware.

• libgcc-3.4.6-sol10-x86-local.gz from libgcc-3.4.6. • glib-1.2.10-sol10-intel-local.gz from glib-1.2.10. • gtk+-1.2.10-sol10-intel-local.gz from gtk+-1.2.10. • libiconv-1.13.1-sol10-x86-local.gz from libiconv. • libintl-3.4.0-sol10-x86-local.gz from libintl. • ncurses-5.7-sol10-x86-local.gz from ncurses. • vim-7.2-sol10-x86-local.gz from vim 7.2.

1 Login in to your Solaris box and create a temporary directory, for example: # mkdir /tmp/vim2 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/vim5 Unzip all packages: # gunzip libgcc-3.4.6-sol10-x86-local.gz # gunzip glib-1.2.10-sol10-intel-local.gz # gunzip gtk+-1.2.10-sol10-intel-local.gz # gunzip libiconv-1.13.1-sol10-x86-local.gz # gunzip libintl-3.4.0-sol10-x86-local.gz # gunzip ncurses-5.7-sol10-x86-local.gz # gunzip vim-7.2-sol10-x86-local.gz6 Save current "LD_LIBRARY_PATH" in a file: # echo $LD_LIBRARY_PATH > /tmp/vim/ld_path_file7 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

Page 3: Vim on Solaris10

work properly with all users. # unset LD_LIBRARY_PATH8 Run the following commands in given sequence, Sequence must be followed otherwise installation may fail. Provide your inputs at the prompt during package installation (you can simply accept the defaults): # pkgadd -d libgcc-3.4.6-sol10-x86-local # pkgadd -d glib-1.2.10-sol10-intel-local # pkgadd -d gtk+-1.2.10-sol10-intel-local # pkgadd -d libiconv-1.13.1-sol10-x86-local # pkgadd -d libintl-3.4.0-sol10-x86-local # pkgadd -d ncurses-5.7-sol10-x86-local # pkgadd -d vim-7.2-sol10-x86-local9 Go to the directory where Vim is installed and verify your Vim installation. # cd /usr/local/bin10 Run the following command; it should open Vim: # ./vim11 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 vi13 It will show a directory like "/usr/bin/vi". Change to that directory. # cd /usr/bin14 Run following commands for link creation. # ln -s /usr/local/bin/vim vim # ln -s /usr/local/bin/vimdiff vimdiff15 Create a "vimrc" file in the "$VIM" directory. To do that, start Vim: # vim16 Enter the Vim command: :echo $VIM17 It will output something like "/usr/local/share/vim"18 Go to this ($VIM) directory # cd /usr/local/share/vim19 Create vimrc file here with vi editor. # vi vimrc20 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/vimrc23 Now you can use vim and vimdiff instead of vi. # vim abc.txt # vimdiff abc.txt efg.txt23 Run the following command to restore "LD_LIBRARY_PATH": # export LD_LIBRARY_PATH=`cat /tmp/vim/ld_path_file`

vimrc file

set nocompatibleset history=50set undolevels=100set viminfo='20,\"50set showmodesyntax onset ignorecaseset tabstop=4set shiftwidth=4set background=lighthighlight Normal guibg=White guifg=Blackset backspace=2set noerrorbells

Page 4: Vim on Solaris10

set laststatus=2set cmdheight=1set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ line:%l\ col:%c%Vset foldenableset showmatchset lznnoremap <F3> <Esc>nlinoremap <F3> <Esc>nliinoremap <C-H> <Esc>:%s/search/replace/gcnnoremap <C-W> gtiinoremap <C-W> <Esc>gti"set nowrap "// do not wrap lines"set number "// turn on line numbersset nobackup