UNIX/コマンド/エディタ/vim


Table of Contents

% vim
:help hoge

:s/^\(.*\):\s*\(.*\)$/\1 = \2/

% vim -T xterm-color [filename]
% (setenv TERM xterm-color; vim [filename] )
% (TERM=xterm-color; vim [filename])
:syntax on

:set dictionary=[dictionary file]
char
short
int
long
float
double
long
sh
short
% vim -x [filename]

set encoding=utf-8
set fileencodings=utf-8,sjis,cp932,euc-jp

vim -c ":e ++enc=sjis" [filename]
vim -c ":e ++enc=utf-8" [filename]
:r !date
:r !cat ~/sample.txt
:map ,d :r !date<CR>

edit_command: vim -T xterm-color

~/.vimrc
" any comment
syntax on
"
" .vimrc
"

" Japanese Words
set encoding=japan
set fileencodings=utf-8,shift_jis,latin1,default,euc-jp

" display mode, if it is insert mode
set showmode

" display line numbers on left side
set number

" auto indent
set autoindent
set smartindent

" tabs
set expandtab   " a tab to many white spaces
set tabstop=8
set shiftwidth=4

" mark up the closing brace
set showmatch

" color
" if you use, please run the vim by this command, 'vim -T xterm-color'
syntax on

xrea