├── .github
├── dependabot.yml
└── workflows
│ └── test.yml
├── .gitignore
├── CONTRIBUTING.md
├── Makefile
├── README.md
├── nsis
└── lang
│ ├── english.nsi
│ └── japanese.nsi
├── runtime
├── doc
│ ├── Makefile
│ ├── evim-ja.UTF-8.1
│ ├── evim.1
│ ├── vim-ja.UTF-8.1
│ ├── vim.1
│ ├── vimdiff-ja.UTF-8.1
│ ├── vimdiff.1
│ ├── vimtutor-ja.UTF-8.1
│ ├── vimtutor.1
│ ├── xxd-ja.UTF-8.1
│ └── xxd.1
├── lang
│ ├── .gitignore
│ ├── Makefile
│ ├── menu_ja.cp932.vim
│ ├── menu_ja.euc-jp.vim
│ ├── menu_ja.eucjp.vim
│ ├── menu_ja.ujis.vim
│ ├── menu_ja.utf-8.vim
│ ├── menu_ja_jp.cp932.vim
│ ├── menu_ja_jp.eucjp.vim
│ ├── menu_ja_jp.ujis.vim
│ └── menu_ja_jp.utf-8.vim
└── tutor
│ ├── .gitignore
│ ├── Makefile
│ ├── tutor
│ └── tutor.ja.utf-8
└── src
└── po
├── .gitignore
├── Makefile
├── check.vim
├── cleanup.vim
├── ja.po
└── sjiscorr.c
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "github-actions" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "weekly"
12 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test vim lang files
2 | on: [push, pull_request]
3 |
4 | jobs:
5 | test:
6 | runs-on: ubuntu-latest
7 | steps:
8 | - name: Preparation
9 | run: sudo apt install gettext
10 | - name: Checkout
11 | uses: actions/checkout@v4
12 | - name: Checkout vim
13 | uses: actions/checkout@v4
14 | with:
15 | repository: 'vim/vim'
16 | path: vim
17 | - name: Build vim
18 | run: |
19 | cd vim/src
20 | # in vim
21 | ./configure --enable-gui=no
22 | # Github hosted runner
23 | # rel : https://docs.github.com/ja/actions/using-github-hosted-runners/about-github-hosted-runners
24 | # CPU 2core/2thread?
25 | make -j 2 vim
26 |
27 | cd ../..
28 | ${GITHUB_WORKSPACE}/vim/src/vim --version
29 | - name: Test translation files
30 | run: |
31 | make test VIM=${GITHUB_WORKSPACE}/vim/src/vim
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .*.sw?
2 | *~
3 | *.log
4 | /tmp/
5 | /vim-lang-ja*.tar.gz
6 | /vim-lang-ja*.tar.bz2
7 | /vim-lang-ja*.tar.xz
8 | /vim-lang-ja*/
9 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to contribute
2 |
3 |
4 | ## 注意事項
5 |
6 | closeされたissueやPRおよびチェンジセットへのコメントは、見逃される(無視される)
7 | 可能性があります。どんな些細な事でも気になることがあったら遠慮せず、大事だと思
8 | うことならさらに積極的に、新たにissueを作ってください。
9 |
10 |
11 | ## 統一指針
12 |
13 | ### 訳語
14 |
15 | 訳語 |根拠
16 | ----------------|-----------------------------------------------------------
17 | サーバー |[※1](#user-content-note1)
18 | ユーザー |[※1](#user-content-note1)
19 |
20 | ### 表記
21 |
22 | 表語 |例
23 | ----------------|-----------------------------------------------------------
24 | 過ぎ |OK:長過ぎ NG:長すぎ
25 | 既に |OK:既に存在 NG:すでに存在
26 | -> |OK:-> NG:→ (ambiwidthな文字は使わない)
27 | 気をつけて |NG:気を付けて (https://github.com/vim-jp/vimdoc-ja/issues/158)
28 |
29 |
30 | ## 資料
31 |
32 | * [Vimマニュアル翻訳: vim-jp/vimdoc-ja](https://github.com/vim-jp/vimdoc-ja)
33 | * [外来語の表記: 内閣告示第二号](http://www.mext.go.jp/b_menu/hakusho/nc/k19910628002/k19910628002.html)
34 |
35 | > 英語の語末の‐er, ‐or, ‐arなどに当たるものは,原則としてア列の長音とし長音符号「ー」を用いて書き表す。 (※1)
36 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ARCHIVE = vim-lang-ja
2 | ARCHIVE_EXT = xz
3 | ARCHIVE_DIR = $(ARCHIVE)
4 | ARCHIVE_FILE = $(ARCHIVE).tar.$(ARCHIVE_EXT)
5 |
6 | VIM_SRC_DIR =
7 |
8 | INSTALL_DIR = $(ARCHIVE)-runtime
9 |
10 | .PHONY: import-en-files update-src-dir \
11 | archive archive-dir release release-today test install clean distclean \
12 | force-update-all force-update-po force-update-lang force-update-tutor
13 |
14 |
15 | # Import English files from the specified Vim source directory.
16 | import-en-files:
17 | @if test ! -d "$(VIM_SRC_DIR)"; then echo VIM_SRC_DIR not specified; exit 1; fi
18 | $(MAKE) -C "$(VIM_SRC_DIR)"/src/po/ vim.pot
19 | cp "$(VIM_SRC_DIR)"/src/po/vim.pot src/po/
20 | cp "$(VIM_SRC_DIR)"/runtime/doc/evim.1 \
21 | "$(VIM_SRC_DIR)"/runtime/doc/vim.1 \
22 | "$(VIM_SRC_DIR)"/runtime/doc/vimdiff.1 \
23 | "$(VIM_SRC_DIR)"/runtime/doc/vimtutor.1 \
24 | "$(VIM_SRC_DIR)"/runtime/doc/xxd.1 \
25 | runtime/doc/
26 | cp "$(VIM_SRC_DIR)"/runtime/tutor/tutor runtime/tutor/
27 | cp "$(VIM_SRC_DIR)"/nsis/lang/english.nsi nsis/lang/
28 |
29 | # Update Vim source directory.
30 | update-src-dir:
31 | @if test ! -d "$(VIM_SRC_DIR)"; then echo VIM_SRC_DIR not specified; exit 1; fi
32 | @rm -rf $(ARCHIVE_DIR)
33 | $(MAKE) test
34 | $(MAKE) $(ARCHIVE_DIR)
35 | cp -rf $(ARCHIVE_DIR)/* "$(VIM_SRC_DIR)"
36 | rm -rf $(ARCHIVE_DIR)
37 |
38 |
39 | archive: $(ARCHIVE_FILE)
40 |
41 | archive-dir: $(ARCHIVE_DIR)
42 |
43 | # Create release package with the specified archive name.
44 | release: force-update-all
45 | @rm -rf $(ARCHIVE_DIR) $(ARCHIVE_FILE)
46 | $(MAKE) test
47 | $(MAKE) $(ARCHIVE_FILE)
48 | rm -rf $(ARCHIVE_DIR)
49 |
50 | # Create release package based on today's date.
51 | release-today:
52 | $(MAKE) release ARCHIVE=vim-lang-ja-`date +%Y%m%d`
53 |
54 | test:
55 | $(MAKE) -C src/po test
56 | $(MAKE) -C runtime/doc test
57 | $(MAKE) -C runtime/lang test
58 | $(MAKE) -C runtime/tutor test
59 |
60 | # Install the message files into the specified (runtime) directory.
61 | install: test
62 | mkdir -p $(INSTALL_DIR)/lang/ja/LC_MESSAGES
63 | mkdir -p $(INSTALL_DIR)/lang/ja.euc-jp/LC_MESSAGES
64 | mkdir -p $(INSTALL_DIR)/lang/ja.sjis/LC_MESSAGES
65 | mkdir -p $(INSTALL_DIR)/doc
66 | mkdir -p $(INSTALL_DIR)/tutor
67 | cp src/po/ja.mo $(INSTALL_DIR)/lang/ja/LC_MESSAGES/vim.mo
68 | cp src/po/ja.euc-jp.mo $(INSTALL_DIR)/lang/ja.euc-jp/LC_MESSAGES/vim.mo
69 | cp src/po/ja.sjis.mo $(INSTALL_DIR)/lang/ja.sjis/LC_MESSAGES/vim.mo
70 | cp runtime/lang/menu_ja*.vim $(INSTALL_DIR)/lang
71 | cp runtime/doc/*.UTF-8.1 $(INSTALL_DIR)/doc
72 | cp runtime/tutor/tutor.ja.* $(INSTALL_DIR)/tutor
73 |
74 | clean:
75 | rm -rf $(ARCHIVE_DIR) $(ARCHIVE_FILE)
76 | rm -rf $(INSTALL_DIR)
77 | $(MAKE) -C src/po clean
78 | $(MAKE) -C runtime/doc clean
79 | $(MAKE) -C runtime/lang clean
80 | $(MAKE) -C runtime/tutor clean
81 |
82 | distclean: clean
83 | rm -f *.tar.bz2 *.tar.gz *.tar.xz
84 |
85 | force-update-all: force-update-po force-update-lang force-update-tutor
86 |
87 | force-update-po:
88 | $(MAKE) -C src/po force
89 |
90 | force-update-lang:
91 | $(MAKE) -C runtime/lang force
92 |
93 | force-update-tutor:
94 | $(MAKE) -C runtime/tutor force
95 |
96 | $(ARCHIVE_DIR):
97 | mkdir -p $@/src/po
98 | mkdir -p $@/runtime/lang
99 | mkdir -p $@/runtime/doc
100 | mkdir -p $@/runtime/tutor
101 | mkdir -p $@/nsis/lang
102 | cp src/po/*.po $@/src/po
103 | cp runtime/lang/menu_ja*.vim $@/runtime/lang
104 | cp runtime/doc/*.UTF-8.1 $@/runtime/doc
105 | cp runtime/tutor/tutor.ja.* $@/runtime/tutor
106 | cp nsis/lang/japanese.nsi $@/nsis/lang
107 |
108 | $(ARCHIVE).tar.gz: $(ARCHIVE_DIR)
109 | tar -czf $@ $<
110 |
111 | $(ARCHIVE).tar.bz2: $(ARCHIVE_DIR)
112 | tar -cjf $@ $<
113 |
114 | $(ARCHIVE).tar.xz: $(ARCHIVE_DIR)
115 | tar -cJf $@ $<
116 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vim-jp/lang-ja
2 |
3 | [](https://gitter.im/vim-jp/lang-ja?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4 | [](https://github.com/vim-jp/lang-ja/actions/workflows/test.yml)
5 |
6 | Vimに付属する日本語翻訳ファイルを管理するリポジトリ
7 |
8 | ## ディレクトリ/ファイル 解説
9 |
10 | パス |説明
11 | -----------------------------------|-----
12 | src/po/, runtime/lang |Vimに付属の日本語翻訳ファイルが置いてあります。
13 | src/po/ja.po |Vimのメッセージ翻訳ファイルのマスター(UTF-8)
14 | runtime/lang/menu\_ja\_jp.utf-8.vim|Vimの日本語メニューファイルのマスター(UTF-8)
15 | runtime/doc/\*-ja.UTF-8.1 |日本語manファイル(UTF-8)
16 | runtime/doc/\*.1 |原文manファイル
17 | runtime/tutor/tutor.ja.utf-8 |日本語チュートリアルファイル(UTF-8)
18 | runtime/tutor/tutor |原文チュートリアルファイル
19 | nsis/lang |Windows用インストーラーの翻訳ファイル
20 |
21 | ## 原文ファイル取り込み手順
22 |
23 | 以下のコマンドを実行して原文ファイルを現在の作業ディレクトリに取り込む。
24 | (`VIM_SRC_DIR` で Vim のソースディレクトリを指定)
25 |
26 | $ make import-en-files VIM_SRC_DIR=../vim
27 |
28 | この手順では、vim.pot ファイル、man ファイル、チュートリアルファイル、NSIS
29 | ファイルの原文ファイルをまとめて取り込む。個別に取り込む場合や注意事項は以下の
30 | それぞれの項目を参照のこと。
31 |
32 | メニューファイルについては、原文ファイルにあたるものがないので、取り込みは行わ
33 | ない。`runtime/menu.vim` などの履歴を見て手動で適宜更新する必要がある。
34 |
35 | ## ja.po 更新手順
36 |
37 | 1. vim.pot を作成(要xgettext)
38 |
39 | (前述の原文ファイル取り込み手順を実施済みであれば不要。)
40 |
41 | Vimのソースで以下を実行して、生成される vim.pot を src/po へコピー
42 |
43 | $ cd src/po
44 | $ make vim.pot
45 |
46 | 註: `make vim.pot` を実行するには `src/` で `./configure` を実行しておく必
47 | 要があるが、`src/po/Makefile` の4行目の `include ../auto/config.mk` をコメ
48 | ントアウトして回避することも可能。(あるいは、空の `src/auto/config.mk` を
49 | 用意してもよい。)
50 |
51 | Windows 上で vim.pot を生成するには、Cygwin や MSYS2 等の Linux 的な環境を
52 | 使うこと。(MSVC 用の Makefile も用意されているが、ソースファイルの読み込み
53 | 順序が異なるために余計な差分が出てしまう。)
54 | また、古いソースを使って Win32 向けにビルドしたことで `src/if_perl.c` が
55 | 残っているならば、vim.pot 生成前に削除しておくこと。(余計な差分が出るのを
56 | 防ぐため。)
57 |
58 | 2. ja.po に vim.pot をマージ (古いものは ja.po.old へ退避される)
59 |
60 | $ make merge
61 |
62 | 3. ja.po のコピーライトやヘッダーを適宜修正
63 |
64 | これはPRを作るだけの場合は、やらないほうが良いかも。
65 |
66 | 4. 翻訳する
67 |
68 | Vimを使って下記の検索コマンドで翻訳すべき場所を探すと良い。
69 |
70 | /fuzzy\|^msgstr ""\(\n"\)\@!
71 |
72 | 5. 不要な情報の削除
73 |
74 | Vim で以下のようにする。
75 |
76 | :source cleanup.vim
77 |
78 | cleanup.vim は Vim 本体からのコピー (実行には Vim 8.0.0794 以降が必要)
79 |
80 | 6. チェック
81 |
82 | $ vim -S check.vim ja.po
83 |
84 | `make check` でも代替可能。
85 |
86 | 7. もう1回マージして、整形と消しすぎたコメントの復活
87 |
88 | $ make merge-force
89 | $ vim ja.po
90 | :source cleanup.vim
91 | :wq
92 |
93 | ## manファイル更新手順
94 |
95 | 1. 原文manファイルの更新
96 |
97 | (前述の原文ファイル取り込み手順を実施済みであれば不要。)
98 |
99 | Vimのソースファイルの runtime/doc/ ディレクトリから、原文manファイルを本リ
100 | ポジトリにコピー。
101 |
102 | $ cd /path/to/vim/runtime/doc
103 | $ cp evim.1 vim.1 vimdiff.1 vimtutor.1 xxd.1 /path/to/lang-ja/runtime/doc
104 |
105 | 2. 翻訳
106 |
107 | 原文の差分を見つつ翻訳ファイルを更新する。
108 |
109 | $ git diff | gvim -R -
110 |
111 | 3. 表示確認
112 |
113 | 以下のコマンドで表示を確認できる。
114 |
115 | $ groff -Tutf8 -Dutf8 -mandoc -mja vim-ja.UTF-8.1 | less -R
116 |
117 | 4. エラーチェック
118 |
119 | 以下のコマンドでmanの文法に違反していないかチェックできる。
120 |
121 | $ make test
122 |
123 | ファイル単体をチェックする場合は以下のコマンドを使う。
124 |
125 | $ LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z vim-ja.UTF-8.1 2>&1 > /dev/null | grep -v "cannot adjust line\|\(cannot\|can't\) break line"
126 |
127 | (末尾の `grep -v` は、日本語の場合に大量に表示される `cannot adjust line`
128 | と `cannot break line` (あるいは `can't break line`) を除外するためのもの。)
129 |
130 | 参照:
131 |
132 | 5. コミット
133 |
134 | 原文と日本語訳は常に同じバージョンがコミットされているように注意すること。
135 |
136 | ## チュートリアルファイル更新手順
137 |
138 | 1. 原文チュートリアルファイルの更新
139 |
140 | (前述の原文ファイル取り込み手順を実施済みであれば不要。)
141 |
142 | Vimのソースファイルの runtime/tutor/ ディレクトリから、原文チュートリアル
143 | ファイルを本リポジトリにコピー。
144 |
145 | $ cd /path/to/vim/runtime/tutor
146 | $ cp tutor /path/to/lang-ja/runtime/tutor
147 |
148 | 2. 翻訳
149 |
150 | 原文の差分を見つつ翻訳ファイルを更新する。
151 |
152 | $ git diff | gvim -R -
153 |
154 | 3. コミット
155 |
156 | 原文と日本語訳は常に同じバージョンがコミットされているように注意すること。
157 |
158 | ## NSIS ファイル更新手順
159 |
160 | 1. 原文 NSIS ファイルの更新
161 |
162 | (前述の原文ファイル取り込み手順を実施済みであれば不要。)
163 |
164 | Vimのソースファイルの nsis/lang/ ディレクトリから、原文 NSIS ファイルを
165 | 本リポジトリにコピー。
166 |
167 | $ cd /path/to/vim/nsis/lang
168 | $ cp english.nsi /path/to/lang-ja/nsis/lang
169 |
170 | 2. 翻訳
171 |
172 | 原文の差分を見つつ翻訳ファイルを更新する。
173 |
174 | $ git diff | gvim -R -
175 |
176 | 3. コミット
177 |
178 | 原文と日本語訳は常に同じバージョンがコミットされているように注意すること。
179 |
180 | ## メニューファイル更新手順
181 |
182 | 1. Vim のソースディレクトリに行き、`runtime/menu.vim` や `runtime/lang/` の
183 | 履歴を調べる。
184 |
185 | 2. 必要な変更を `runtime/lang/menu_ja*.vim` に反映する。
186 |
187 |
188 | ## リリース手順
189 |
190 | 1. 各リソースが最新に近いことを確認する
191 |
192 | TODO: 将来、より具体的で自動化された手段を提供したい
193 |
194 | 2. `PO-Revision-Date` を更新する
195 |
196 | ja.po のヘッダにある `PO-Revision-Date` を、リリース用に更新する。
197 |
198 | 3. テストをパスする
199 |
200 | $ make test
201 |
202 | [CI][#ci] で実行しているのでローカルでやる意味は無いが、テストをパスするこ
203 | とを確認する。
204 |
205 | 4. リリース用アーカイブを作成する
206 |
207 | $ make release-today
208 |
209 | `vim-lang-ja-20160131.tar.xz` といったアーカイブファイルができる。
210 | `20160131` の部分は実行した日付に置き換わる。
211 |
212 | 前回のリリースから、`*.po` 以外のファイルが更新されていない場合は、po
213 | のみのリリース用アーカイブを作成する。(Bram の要請。)
214 |
215 | $ cd src/po/
216 | $ make release-today
217 |
218 | `vim-lang-ja-po-YYYYMMDD.tar.xz` といったアーカイブファイルができる。
219 | `YYYYMMDD` の部分は実行した日付に置き換わる。
220 |
221 | 5. Vim のソースディレクトリを更新する
222 |
223 | GitHub に PR を出す場合は、以下のコマンドを実行して Vim のソースディレクト
224 | リを更新する。
225 | (`VIM_SRC_DIR` で Vim のソースディレクトリを指定)
226 |
227 | $ make update-src-dir VIM_SRC_DIR=../vim
228 |
229 | 6. タグを打ち、GitHub Releases を更新する
230 |
231 | タグの形式は YYYYMMDD とする。例:
232 |
233 | $ git tag 20181116 -m 'Catch up with 8.1.0519'
234 | $ git push origin master --tags
235 |
236 | タグが push できたら、GitHub Releases に新しいリリースを作り、アーカイブ
237 | をアップロードする。
238 |
239 | 7. Bram に対してリリースする
240 |
241 | [GitHub][#github] に PR を出す。
242 |
243 | あるいはこのアーカイブファイルを Bram と vim-dev へ更新依頼とともに送信す
244 | る。
245 | 以下、文面の一例:
246 |
247 | Hi Bram and the list,
248 |
249 | I'd like to update Japanese translations.
250 | Could you merge the contents from the attached file into Vim?
251 |
252 | The same file is also available at the vim-jp/lang-ja repository:
253 | https://github.com/vim-jp/lang-ja/releases/tag/20181116
254 |
255 | Thanks,
256 | (ここにあなたの名前。`Takata`とか)
257 |
258 |
259 | [#ci]:https://github.com/vim-jp/lang-ja/actions
260 | [#github]:https://github.com/vim/vim
261 |
--------------------------------------------------------------------------------
/nsis/lang/english.nsi:
--------------------------------------------------------------------------------
1 | # vi:set ts=8 sts=4 sw=4 et fdm=marker:
2 | #
3 | # english.nsi: English language strings for gvim NSIS installer.
4 | #
5 | # Locale ID : 1033
6 | # Locale Name : en
7 | # fileencoding : UTF-8
8 | # Author : Guopeng Wen, Ken Takata
9 |
10 | !insertmacro MUI_LANGUAGE "English"
11 |
12 |
13 | # Overwrite the default translation.
14 | # These strings should be always English. Otherwise dosinst.c fails.
15 | LangString ^SetupCaption ${LANG_ENGLISH} \
16 | "$(^Name) Setup"
17 | LangString ^UninstallCaption ${LANG_ENGLISH} \
18 | "$(^Name) Uninstall"
19 |
20 | ##############################################################################
21 | # License file for the license page {{{1
22 | ##############################################################################
23 |
24 | LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt"
25 |
26 | ##############################################################################
27 | # README.txt file, which is opened after installation {{{1
28 | ##############################################################################
29 |
30 | LangString vim_readme_file ${LANG_ENGLISH} "README.txt"
31 |
32 | ##############################################################################
33 | # MUI Configuration Strings {{{1
34 | ##############################################################################
35 |
36 | #LangString str_dest_folder ${LANG_ENGLISH} \
37 | # "Destination Folder (Must end with $\"vim$\")"
38 |
39 | LangString str_show_readme ${LANG_ENGLISH} \
40 | "Show README after installation finished"
41 |
42 | # Install types:
43 | LangString str_type_typical ${LANG_ENGLISH} \
44 | "Typical"
45 |
46 | LangString str_type_minimal ${LANG_ENGLISH} \
47 | "Minimal"
48 |
49 | LangString str_type_full ${LANG_ENGLISH} \
50 | "Full"
51 |
52 |
53 | ##############################################################################
54 | # Section Titles & Description {{{1
55 | ##############################################################################
56 |
57 | LangString str_section_old_ver ${LANG_ENGLISH} \
58 | "Uninstall Existing Version(s)"
59 | LangString str_desc_old_ver ${LANG_ENGLISH} \
60 | "Uninstall existing Vim version(s) from your system."
61 |
62 | LangString str_section_exe ${LANG_ENGLISH} \
63 | "Vim GUI and runtime files"
64 | LangString str_desc_exe ${LANG_ENGLISH} \
65 | "Vim GUI executables and runtime files. This component is required."
66 |
67 | LangString str_section_console ${LANG_ENGLISH} \
68 | "Vim console program"
69 | LangString str_desc_console ${LANG_ENGLISH} \
70 | "Console version of Vim (vim.exe)."
71 |
72 | LangString str_section_batch ${LANG_ENGLISH} \
73 | "Create .bat files"
74 | LangString str_desc_batch ${LANG_ENGLISH} \
75 | "Create .bat files for Vim variants in the Windows directory for \
76 | command line use."
77 |
78 | LangString str_group_icons ${LANG_ENGLISH} \
79 | "Create icons for Vim"
80 | LangString str_desc_icons ${LANG_ENGLISH} \
81 | "Create icons for Vim at various locations to facilitate easy access."
82 |
83 | LangString str_section_desktop ${LANG_ENGLISH} \
84 | "On the Desktop"
85 | LangString str_desc_desktop ${LANG_ENGLISH} \
86 | "Create icons for gVim executables on the desktop."
87 |
88 | LangString str_section_start_menu ${LANG_ENGLISH} \
89 | "In the Start Menu Programs Folder"
90 | LangString str_desc_start_menu ${LANG_ENGLISH} \
91 | "Add Vim in the programs folder of the start menu."
92 |
93 | #LangString str_section_quick_launch ${LANG_ENGLISH} \
94 | # "In the Quick Launch Bar"
95 | #LangString str_desc_quick_launch ${LANG_ENGLISH} \
96 | # "Add Vim shortcut in the quick launch bar."
97 |
98 | LangString str_section_edit_with ${LANG_ENGLISH} \
99 | "Add Vim Context Menu"
100 | LangString str_desc_edit_with ${LANG_ENGLISH} \
101 | "Add Vim to the $\"Open With...$\" context menu list."
102 |
103 | #LangString str_section_edit_with32 ${LANG_ENGLISH} \
104 | # "32-bit Version"
105 | #LangString str_desc_edit_with32 ${LANG_ENGLISH} \
106 | # "Add Vim to the $\"Open With...$\" context menu list \
107 | # for 32-bit applications."
108 |
109 | #LangString str_section_edit_with64 ${LANG_ENGLISH} \
110 | # "64-bit Version"
111 | #LangString str_desc_edit_with64 ${LANG_ENGLISH} \
112 | # "Add Vim to the $\"Open With...$\" context menu list \
113 | # for 64-bit applications."
114 |
115 | LangString str_section_vim_rc ${LANG_ENGLISH} \
116 | "Create Default Config"
117 | LangString str_desc_vim_rc ${LANG_ENGLISH} \
118 | "Create a default config file (_vimrc) if one does not already exist."
119 |
120 | LangString str_group_plugin ${LANG_ENGLISH} \
121 | "Create Plugin Directories"
122 | LangString str_desc_plugin ${LANG_ENGLISH} \
123 | "Create plugin directories. Plugin directories allow extending Vim \
124 | by dropping a file into a directory."
125 |
126 | LangString str_section_plugin_home ${LANG_ENGLISH} \
127 | "Private"
128 | LangString str_desc_plugin_home ${LANG_ENGLISH} \
129 | "Create plugin directories in HOME directory."
130 |
131 | LangString str_section_plugin_vim ${LANG_ENGLISH} \
132 | "Shared"
133 | LangString str_desc_plugin_vim ${LANG_ENGLISH} \
134 | "Create plugin directories in Vim install directory, it is used for \
135 | everybody on the system."
136 |
137 | LangString str_section_nls ${LANG_ENGLISH} \
138 | "Native Language Support"
139 | LangString str_desc_nls ${LANG_ENGLISH} \
140 | "Install files for native language support."
141 |
142 | LangString str_unsection_register ${LANG_ENGLISH} \
143 | "Unregister Vim"
144 | LangString str_desc_unregister ${LANG_ENGLISH} \
145 | "Unregister Vim from the system."
146 |
147 | LangString str_unsection_exe ${LANG_ENGLISH} \
148 | "Remove Vim Executables/Runtime Files"
149 | LangString str_desc_rm_exe ${LANG_ENGLISH} \
150 | "Remove all Vim executables and runtime files."
151 |
152 | LangString str_ungroup_plugin ${LANG_ENGLISH} \
153 | "Remove plugin directories"
154 | LangString str_desc_rm_plugin ${LANG_ENGLISH} \
155 | "Remove the plugin directories if they are empty."
156 |
157 | LangString str_unsection_plugin_home ${LANG_ENGLISH} \
158 | "Private"
159 | LangString str_desc_rm_plugin_home ${LANG_ENGLISH} \
160 | "Remove the plugin directories from HOME directory."
161 |
162 | LangString str_unsection_plugin_vim ${LANG_ENGLISH} \
163 | "Shared"
164 | LangString str_desc_rm_plugin_vim ${LANG_ENGLISH} \
165 | "Remove the plugin directories from Vim install directory."
166 |
167 | LangString str_unsection_rootdir ${LANG_ENGLISH} \
168 | "Remove the Vim root directory"
169 | LangString str_desc_rm_rootdir ${LANG_ENGLISH} \
170 | "Remove the Vim root directory. It contains your Vim configuration files!"
171 |
172 |
173 | ##############################################################################
174 | # Messages {{{1
175 | ##############################################################################
176 |
177 | #LangString str_msg_too_many_ver ${LANG_ENGLISH} \
178 | # "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
179 | # This installer can only handle ${VIM_MAX_OLD_VER} versions \
180 | # at most.$\r$\n\
181 | # Please remove some versions and start again."
182 |
183 | #LangString str_msg_invalid_root ${LANG_ENGLISH} \
184 | # "Invalid install path: $vim_install_root!$\r$\n\
185 | # It should end with $\"vim$\"."
186 |
187 | #LangString str_msg_bin_mismatch ${LANG_ENGLISH} \
188 | # "Binary path mismatch!$\r$\n$\r$\n\
189 | # Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
190 | # but system indicates the binary path is $\"$INSTDIR$\"."
191 |
192 | #LangString str_msg_vim_running ${LANG_ENGLISH} \
193 | # "Vim is still running on your system.$\r$\n\
194 | # Please close all instances of Vim before you continue."
195 |
196 | #LangString str_msg_register_ole ${LANG_ENGLISH} \
197 | # "Attempting to register Vim with OLE. \
198 | # There is no message indicates whether this works or not."
199 |
200 | #LangString str_msg_unreg_ole ${LANG_ENGLISH} \
201 | # "Attempting to unregister Vim with OLE. \
202 | # There is no message indicates whether this works or not."
203 |
204 | #LangString str_msg_rm_start ${LANG_ENGLISH} \
205 | # "Uninstalling the following version:"
206 |
207 | #LangString str_msg_rm_fail ${LANG_ENGLISH} \
208 | # "Fail to uninstall the following version:"
209 |
210 | #LangString str_msg_no_rm_key ${LANG_ENGLISH} \
211 | # "Cannot find uninstaller registry key."
212 |
213 | #LangString str_msg_no_rm_reg ${LANG_ENGLISH} \
214 | # "Cannot find uninstaller from registry."
215 |
216 | #LangString str_msg_no_rm_exe ${LANG_ENGLISH} \
217 | # "Cannot access uninstaller."
218 |
219 | #LangString str_msg_rm_copy_fail ${LANG_ENGLISH} \
220 | # "Fail to copy uninstaller to temporary directory."
221 |
222 | #LangString str_msg_rm_run_fail ${LANG_ENGLISH} \
223 | # "Fail to run uninstaller."
224 |
225 | #LangString str_msg_abort_install ${LANG_ENGLISH} \
226 | # "Installer will abort."
227 |
228 | LangString str_msg_install_fail ${LANG_ENGLISH} \
229 | "Installation failed. Better luck next time."
230 |
231 | LangString str_msg_rm_exe_fail ${LANG_ENGLISH} \
232 | "Some files in $0 have not been deleted!$\r$\n\
233 | You must do it manually."
234 |
235 | #LangString str_msg_rm_root_fail ${LANG_ENGLISH} \
236 | # "WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
237 |
238 | LangString str_msg_uninstalling ${LANG_ENGLISH} \
239 | "Uninstalling the old version..."
240 |
241 | LangString str_msg_registering ${LANG_ENGLISH} \
242 | "Registering..."
243 |
244 | LangString str_msg_unregistering ${LANG_ENGLISH} \
245 | "Unregistering..."
246 |
247 |
248 | ##############################################################################
249 | # Dialog Box {{{1
250 | ##############################################################################
251 |
252 | LangString str_vimrc_page_title ${LANG_ENGLISH} \
253 | "Choose _vimrc settings"
254 | LangString str_vimrc_page_subtitle ${LANG_ENGLISH} \
255 | "Choose the settings for enhancement, keyboard and mouse."
256 |
257 | LangString str_msg_compat_title ${LANG_ENGLISH} \
258 | " Vi / Vim behavior "
259 | LangString str_msg_compat_desc ${LANG_ENGLISH} \
260 | "&Compatibility and enhancements"
261 | LangString str_msg_compat_vi ${LANG_ENGLISH} \
262 | "Vi compatible"
263 | LangString str_msg_compat_vim ${LANG_ENGLISH} \
264 | "Vim original"
265 | LangString str_msg_compat_defaults ${LANG_ENGLISH} \
266 | "Vim with some enhancements (load defaults.vim)"
267 | LangString str_msg_compat_all ${LANG_ENGLISH} \
268 | "Vim with all enhancements (load vimrc_example.vim) (Default)"
269 |
270 | LangString str_msg_keymap_title ${LANG_ENGLISH} \
271 | " Mappings "
272 | LangString str_msg_keymap_desc ${LANG_ENGLISH} \
273 | "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
274 | LangString str_msg_keymap_default ${LANG_ENGLISH} \
275 | "Do not remap keys (Default)"
276 | LangString str_msg_keymap_windows ${LANG_ENGLISH} \
277 | "Remap a few keys"
278 |
279 | LangString str_msg_mouse_title ${LANG_ENGLISH} \
280 | " Mouse "
281 | LangString str_msg_mouse_desc ${LANG_ENGLISH} \
282 | "&Behavior of right and left buttons"
283 | LangString str_msg_mouse_default ${LANG_ENGLISH} \
284 | "Right: popup menu, Left: visual mode (Default)"
285 | LangString str_msg_mouse_windows ${LANG_ENGLISH} \
286 | "Right: popup menu, Left: select mode (Windows)"
287 | LangString str_msg_mouse_unix ${LANG_ENGLISH} \
288 | "Right: extends selection, Left: visual mode (Unix)"
289 |
--------------------------------------------------------------------------------
/nsis/lang/japanese.nsi:
--------------------------------------------------------------------------------
1 | # vi:set ts=8 sts=4 sw=4 et fdm=marker:
2 | #
3 | # japanese.nsi: Japanese language strings for gvim NSIS installer.
4 | #
5 | # Locale ID : 1041
6 | # Locale Name : ja
7 | # fileencoding : UTF-8
8 | # Author : Ken Takata
9 |
10 | !insertmacro MUI_LANGUAGE "Japanese"
11 |
12 |
13 | # Overwrite the default translation.
14 | # These strings should be always English. Otherwise dosinst.c fails.
15 | LangString ^SetupCaption ${LANG_JAPANESE} \
16 | "$(^Name) Setup"
17 | LangString ^UninstallCaption ${LANG_JAPANESE} \
18 | "$(^Name) Uninstall"
19 |
20 | # Workarounds for NSIS Japanese translation. The messages are too long.
21 | # These should be better to be fixed by the NSIS upstream.
22 | LangString ^SpaceAvailable ${LANG_JAPANESE} \
23 | "利用可能なディスク容量:"
24 | LangString ^SpaceRequired ${LANG_JAPANESE} \
25 | "必要なディスク容量:"
26 | # Fix another NSIS Japanese translation. The access key was missing.
27 | LangString ^InstallBtn ${LANG_JAPANESE} \
28 | "インストール(&I)"
29 |
30 | ##############################################################################
31 | # Translated license file for the license page {{{1
32 | ##############################################################################
33 |
34 | LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
35 | #LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax"
36 |
37 | ##############################################################################
38 | # Translated README.txt file, which is opened after installation {{{1
39 | ##############################################################################
40 |
41 | LangString vim_readme_file 0 "README.txt"
42 | #LangString vim_readme_file ${LANG_JAPANESE} "README.jax.txt"
43 |
44 | ##############################################################################
45 | # MUI Configuration Strings {{{1
46 | ##############################################################################
47 |
48 | #LangString str_dest_folder ${LANG_JAPANESE} \
49 | # "Destination Folder (Must end with $\"vim$\")"
50 |
51 | LangString str_show_readme ${LANG_JAPANESE} \
52 | "インストール完了後に README を表示する"
53 |
54 | # Install types:
55 | LangString str_type_typical ${LANG_JAPANESE} \
56 | "通常"
57 |
58 | LangString str_type_minimal ${LANG_JAPANESE} \
59 | "最小"
60 |
61 | LangString str_type_full ${LANG_JAPANESE} \
62 | "全て"
63 |
64 |
65 | ##############################################################################
66 | # Section Titles & Description {{{1
67 | ##############################################################################
68 |
69 | LangString str_section_old_ver ${LANG_JAPANESE} \
70 | "既存のバージョンをアンインストール"
71 | LangString str_desc_old_ver ${LANG_JAPANESE} \
72 | "すでにインストールされている Vim をシステムから削除します。"
73 |
74 | LangString str_section_exe ${LANG_JAPANESE} \
75 | "Vim GUI とランタイムファイル"
76 | LangString str_desc_exe ${LANG_JAPANESE} \
77 | "Vim GUI 実行ファイルとラインタイムファイル。このコンポーネントは必須です。"
78 |
79 | LangString str_section_console ${LANG_JAPANESE} \
80 | "Vim コンソールプログラム"
81 | LangString str_desc_console ${LANG_JAPANESE} \
82 | "コンソール版の Vim (vim.exe)。"
83 |
84 | LangString str_section_batch ${LANG_JAPANESE} \
85 | ".bat ファイルを作成"
86 | LangString str_desc_batch ${LANG_JAPANESE} \
87 | "コマンドラインから Vim と関連コマンドを実行できるように、.bat ファイルを Windows ディレクトリに作成します。"
88 |
89 | LangString str_group_icons ${LANG_JAPANESE} \
90 | "Vim のアイコンを作成"
91 | LangString str_desc_icons ${LANG_JAPANESE} \
92 | "Vim を簡単に実行できるように、いくつかの場所にアイコンを作成します。"
93 |
94 | LangString str_section_desktop ${LANG_JAPANESE} \
95 | "デスクトップ上"
96 | LangString str_desc_desktop ${LANG_JAPANESE} \
97 | "gVim 実行ファイルのアイコンをデスクトップ上に作成します。"
98 |
99 | LangString str_section_start_menu ${LANG_JAPANESE} \
100 | "スタートメニューのプログラムフォルダー上"
101 | LangString str_desc_start_menu ${LANG_JAPANESE} \
102 | "Vim のアイコンをスタートメニューのプログラムフォルダー上に作成します。"
103 |
104 | #LangString str_section_quick_launch ${LANG_JAPANESE} \
105 | # "In the Quick Launch Bar"
106 | #LangString str_desc_quick_launch ${LANG_JAPANESE} \
107 | # "Add Vim shortcut in the quick launch bar."
108 |
109 | LangString str_section_edit_with ${LANG_JAPANESE} \
110 | "Vim のコンテキストメニューを追加"
111 | LangString str_desc_edit_with ${LANG_JAPANESE} \
112 | "$\"Vimで編集する$\" をコンテキストメニューに追加します。"
113 |
114 | #LangString str_section_edit_with32 ${LANG_JAPANESE} \
115 | # "32-bit Version"
116 | #LangString str_desc_edit_with32 ${LANG_JAPANESE} \
117 | # "Add Vim to the $\"Open With...$\" context menu list \
118 | # for 32-bit applications."
119 |
120 | #LangString str_section_edit_with64 ${LANG_JAPANESE} \
121 | # "64-bit Version"
122 | #LangString str_desc_edit_with64 ${LANG_JAPANESE} \
123 | # "Add Vim to the $\"Open With...$\" context menu list \
124 | # for 64-bit applications."
125 |
126 | LangString str_section_vim_rc ${LANG_JAPANESE} \
127 | "既定のコンフィグを作成"
128 | LangString str_desc_vim_rc ${LANG_JAPANESE} \
129 | "もし無ければ、既定のコンフィグファイル (_vimrc) を作成します。"
130 |
131 | LangString str_group_plugin ${LANG_JAPANESE} \
132 | "プラグインディレクトリを作成"
133 | LangString str_desc_plugin ${LANG_JAPANESE} \
134 | "プラグインディレクトリを作成します。そこにプラグインファイルを置くことで Vim を拡張することができます。"
135 |
136 | LangString str_section_plugin_home ${LANG_JAPANESE} \
137 | "個人用"
138 | LangString str_desc_plugin_home ${LANG_JAPANESE} \
139 | "プラグインディレクトリをホームディレクトリに作成します。"
140 |
141 | LangString str_section_plugin_vim ${LANG_JAPANESE} \
142 | "共用"
143 | LangString str_desc_plugin_vim ${LANG_JAPANESE} \
144 | "プラグインディレクトリを Vim のインストールディレクトリに作成します。システムの全員で共有されます。"
145 |
146 | LangString str_section_nls ${LANG_JAPANESE} \
147 | "多言語サポート"
148 | LangString str_desc_nls ${LANG_JAPANESE} \
149 | "多言語サポート用のファイルをインストールします。"
150 |
151 | LangString str_unsection_register ${LANG_JAPANESE} \
152 | "Vim を登録解除"
153 | LangString str_desc_unregister ${LANG_JAPANESE} \
154 | "Vim をシステムから登録解除します。"
155 |
156 | LangString str_unsection_exe ${LANG_JAPANESE} \
157 | "Vim の実行ファイル/ランタイムファイルを削除"
158 | LangString str_desc_rm_exe ${LANG_JAPANESE} \
159 | "全ての Vim の実行ファイルとランタイムファイルを削除します。"
160 |
161 | LangString str_ungroup_plugin ${LANG_JAPANESE} \
162 | "プラグインディレクトリを削除"
163 | LangString str_desc_rm_plugin ${LANG_JAPANESE} \
164 | "プラグインディレクトリが空であればそれを削除します。"
165 |
166 | LangString str_unsection_plugin_home ${LANG_JAPANESE} \
167 | "個人用"
168 | LangString str_desc_rm_plugin_home ${LANG_JAPANESE} \
169 | "プラグインディレクトリをホームディレクトリから削除します。"
170 |
171 | LangString str_unsection_plugin_vim ${LANG_JAPANESE} \
172 | "共用"
173 | LangString str_desc_rm_plugin_vim ${LANG_JAPANESE} \
174 | "プラグインディレクトリを Vim のインストールディレクトリから削除します。"
175 |
176 | LangString str_unsection_rootdir ${LANG_JAPANESE} \
177 | "Vim のトップディレクトリを削除"
178 | LangString str_desc_rm_rootdir ${LANG_JAPANESE} \
179 | "Vim のトップディレクトリを削除します。あなたの Vim の設定ファイルも含まれていることに注意してください!"
180 |
181 |
182 | ##############################################################################
183 | # Messages {{{1
184 | ##############################################################################
185 |
186 | #LangString str_msg_too_many_ver ${LANG_JAPANESE} \
187 | # "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
188 | # This installer can only handle ${VIM_MAX_OLD_VER} versions \
189 | # at most.$\r$\n\
190 | # Please remove some versions and start again."
191 |
192 | #LangString str_msg_invalid_root ${LANG_JAPANESE} \
193 | # "Invalid install path: $vim_install_root!$\r$\n\
194 | # It should end with $\"vim$\"."
195 |
196 | #LangString str_msg_bin_mismatch ${LANG_JAPANESE} \
197 | # "Binary path mismatch!$\r$\n$\r$\n\
198 | # Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
199 | # but system indicates the binary path is $\"$INSTDIR$\"."
200 |
201 | #LangString str_msg_vim_running ${LANG_JAPANESE} \
202 | # "Vim is still running on your system.$\r$\n\
203 | # Please close all instances of Vim before you continue."
204 |
205 | #LangString str_msg_register_ole ${LANG_JAPANESE} \
206 | # "Attempting to register Vim with OLE. \
207 | # There is no message indicates whether this works or not."
208 |
209 | #LangString str_msg_unreg_ole ${LANG_JAPANESE} \
210 | # "Attempting to unregister Vim with OLE. \
211 | # There is no message indicates whether this works or not."
212 |
213 | #LangString str_msg_rm_start ${LANG_JAPANESE} \
214 | # "Uninstalling the following version:"
215 |
216 | #LangString str_msg_rm_fail ${LANG_JAPANESE} \
217 | # "Fail to uninstall the following version:"
218 |
219 | #LangString str_msg_no_rm_key ${LANG_JAPANESE} \
220 | # "Cannot find uninstaller registry key."
221 |
222 | #LangString str_msg_no_rm_reg ${LANG_JAPANESE} \
223 | # "Cannot find uninstaller from registry."
224 |
225 | #LangString str_msg_no_rm_exe ${LANG_JAPANESE} \
226 | # "Cannot access uninstaller."
227 |
228 | #LangString str_msg_rm_copy_fail ${LANG_JAPANESE} \
229 | # "Fail to copy uninstaller to temporary directory."
230 |
231 | #LangString str_msg_rm_run_fail ${LANG_JAPANESE} \
232 | # "Fail to run uninstaller."
233 |
234 | #LangString str_msg_abort_install ${LANG_JAPANESE} \
235 | # "Installer will abort."
236 |
237 | LangString str_msg_install_fail ${LANG_JAPANESE} \
238 | "インストールに失敗しました。次はうまくいくことを祈ります。"
239 |
240 | LangString str_msg_rm_exe_fail ${LANG_JAPANESE} \
241 | "$0 内の一部のファイルは削除できませんでした!$\r$\n\
242 | 手動で削除する必要があります。"
243 |
244 | #LangString str_msg_rm_root_fail ${LANG_JAPANESE} \
245 | # "WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
246 |
247 | LangString str_msg_uninstalling ${LANG_JAPANESE} \
248 | "古いバージョンをアンインストールしています..."
249 |
250 | LangString str_msg_registering ${LANG_JAPANESE} \
251 | "登録中..."
252 |
253 | LangString str_msg_unregistering ${LANG_JAPANESE} \
254 | "登録解除中..."
255 |
256 |
257 | ##############################################################################
258 | # Dialog Box {{{1
259 | ##############################################################################
260 |
261 | LangString str_vimrc_page_title ${LANG_JAPANESE} \
262 | "_vimrc の設定を選んでください"
263 | LangString str_vimrc_page_subtitle ${LANG_JAPANESE} \
264 | "拡張やキーボード、マウスの設定を選んでください。"
265 |
266 | LangString str_msg_compat_title ${LANG_JAPANESE} \
267 | " Vi / Vim の動作 "
268 | LangString str_msg_compat_desc ${LANG_JAPANESE} \
269 | "互換性と拡張(&C)"
270 | LangString str_msg_compat_vi ${LANG_JAPANESE} \
271 | "Vi 互換"
272 | LangString str_msg_compat_vim ${LANG_JAPANESE} \
273 | "Vim 独自"
274 | LangString str_msg_compat_defaults ${LANG_JAPANESE} \
275 | "Vim 独自と多少の拡張 (defaults.vim を読み込み)"
276 | LangString str_msg_compat_all ${LANG_JAPANESE} \
277 | "Vim 独自と全ての拡張 (vimrc_example.vim を読み込み) (既定)"
278 |
279 | LangString str_msg_keymap_title ${LANG_JAPANESE} \
280 | " マッピング "
281 | LangString str_msg_keymap_desc ${LANG_JAPANESE} \
282 | "Windows用に一部のキーをリマップする(&R) (例: Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F など)"
283 | LangString str_msg_keymap_default ${LANG_JAPANESE} \
284 | "リマップしない (既定)"
285 | LangString str_msg_keymap_windows ${LANG_JAPANESE} \
286 | "リマップする"
287 |
288 | LangString str_msg_mouse_title ${LANG_JAPANESE} \
289 | " マウス "
290 | LangString str_msg_mouse_desc ${LANG_JAPANESE} \
291 | "右ボタンと左ボタンの動作(&B)"
292 | LangString str_msg_mouse_default ${LANG_JAPANESE} \
293 | "右:ポップアップメニュー、左:ビジュアルモード (既定)"
294 | LangString str_msg_mouse_windows ${LANG_JAPANESE} \
295 | "右:ポップアップメニュー、左:選択モード (Windows)"
296 | LangString str_msg_mouse_unix ${LANG_JAPANESE} \
297 | "右:選択を拡張、左:ビジュアルモード (Unix)"
298 |
--------------------------------------------------------------------------------
/runtime/doc/Makefile:
--------------------------------------------------------------------------------
1 | JA_FILES = \
2 | evim-ja.UTF-8.1 \
3 | vimdiff-ja.UTF-8.1 \
4 | vim-ja.UTF-8.1 \
5 | vimtutor-ja.UTF-8.1 \
6 | xxd-ja.UTF-8.1
7 |
8 | test:
9 | for i in $(JA_FILES); do \
10 | echo Checking $$i; \
11 | LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $$i > $$i.log 2>&1 > /dev/null; \
12 | grep -v "cannot adjust line\|\(cannot\|can't\) break line" $$i.log && exit 1 || :; \
13 | done
14 |
15 | clean:
16 | rm -f *.log
17 |
--------------------------------------------------------------------------------
/runtime/doc/evim-ja.UTF-8.1:
--------------------------------------------------------------------------------
1 | .TH EVIM 1 "2024 August 12"
2 | .SH 名前
3 | evim \- easy Vim, モードレスエディタ Vim
4 | .SH 書式
5 | .br
6 | .B evim
7 | [options] [file ..]
8 | .br
9 | .B eview
10 | .SH 説明
11 | .B eVim
12 | は
13 | .B Vim
14 | を起動して、モードレスエディタとして動作するためのオプションを設定します。
15 | Vim の動作が point-and-click エディタのような動作になります。
16 | MS-Windows のメモ帳のような動作です。
17 | .B eVim
18 | は常に GUI で起動し、メニューとツールバーを表示します。
19 | .PP
20 | どうしても Vim の操作に馴染めない場合に使ってください。
21 | 編集効率は下がります。
22 | .PP
23 | .B eview
24 | は同様に、読み込み専用モードで起動します。evim \-R と同じです。
25 | .PP
26 | 引数や Vim についての詳細は vim(1) を参照してください。
27 | .PP
28 | オプション 'insertmode' が設定され、テキストを直接、入力できるようになります。
29 | .br
30 | コピーとペーストのキー操作が MS-Windows と同じになるように、マップが設定されます。
31 | CTRL-X が切り取り、CTRL-C がコピー、CTRL-V がペーストです。
32 | 標準の CTRL-V の操作は CTRL-Q に割り当てられます。
33 | .SH オプション
34 | vim(1) を参照してください。
35 | .SH ファイル
36 | .TP 15
37 | /usr/local/share/vim/vim??/evim.vim
38 | eVim の初期化スクリプト。
39 | .br
40 | .I vim??
41 | は短いバージョン番号で
42 | .B Vim 9.1
43 | では vim91 です。
44 | .SH 別名
45 | evim は "gumbies のための Vim" とも呼ばれています。
46 | evim を使っているあなたはきっと、頭にハンカチをかぶっているのです。
47 | (訳注: gumbies は Monty Python に登場するおもしろ集団。ハンカチをかぶっている。)
48 | .SH 関連項目
49 | vim(1)
50 | .SH 著者
51 | .B Vim
52 | のほとんどの機能は Bram Moolenaar が開発し、多くの人が協力しました。
53 | メニューの Help/Credits を参照してください。
54 |
--------------------------------------------------------------------------------
/runtime/doc/evim.1:
--------------------------------------------------------------------------------
1 | .TH EVIM 1 "2024 August 12"
2 | .SH NAME
3 | evim \- easy Vim, edit a file with Vim and setup for modeless editing
4 | .SH SYNOPSIS
5 | .br
6 | .B evim
7 | [options] [file ..]
8 | .br
9 | .B eview
10 | .SH DESCRIPTION
11 | .B eVim
12 | starts
13 | .B Vim
14 | and sets options to make it behave like a modeless editor.
15 | This is still Vim but used as a point-and-click editor.
16 | This feels a lot like using Notepad on MS-Windows.
17 | .B eVim
18 | will always run in the GUI, to enable the use of menus and toolbar.
19 | .PP
20 | Only to be used for people who really can't work with Vim in the normal way.
21 | Editing will be much less efficient.
22 | .PP
23 | .B eview
24 | is the same, but starts in read-only mode. It works just like evim \-R.
25 | .PP
26 | See vim(1) for details about Vim, options, etc.
27 | .PP
28 | The 'insertmode' option is set to be able to type text directly.
29 | .br
30 | Mappings are setup to make Copy and Paste work with the MS-Windows keys.
31 | CTRL-X cuts text, CTRL-C copies text and CTRL-V pastes text.
32 | Use CTRL-Q to obtain the original meaning of CTRL-V.
33 | .SH OPTIONS
34 | See vim(1).
35 | .SH FILES
36 | .TP 15
37 | /usr/local/share/vim/vim??/evim.vim
38 | The script loaded to initialize eVim.
39 | .br
40 | .I vim??
41 | is short version number, like vim91 for
42 | .B Vim 9.1
43 | .SH AKA
44 | Also Known As "Vim for gumbies".
45 | When using evim you are expected to take a handkerchief,
46 | make a knot in each corner and wear it on your head.
47 | .SH SEE ALSO
48 | vim(1)
49 | .SH AUTHOR
50 | Most of
51 | .B Vim
52 | was made by Bram Moolenaar, with a lot of help from others.
53 | See the Help/Credits menu.
54 |
--------------------------------------------------------------------------------
/runtime/doc/vim-ja.UTF-8.1:
--------------------------------------------------------------------------------
1 | .TH VIM 1 "2024 Aug 12"
2 | .SH 名前
3 | vim \- Vi IMproved, プログラマのテキストエディタ
4 | .SH 書式
5 | .br
6 | .B vim
7 | [options] [file ..]
8 | .br
9 | .B vim
10 | [options] \-
11 | .br
12 | .B vim
13 | [options] \-t tag
14 | .br
15 | .B vim
16 | [options] \-q [errorfile]
17 | .PP
18 | .br
19 | .B ex
20 | .br
21 | .B view
22 | .br
23 | .B gvim
24 | .B gview
25 | .B evim
26 | .B eview
27 | .br
28 | .B rvim
29 | .B rview
30 | .B rgvim
31 | .B rgview
32 | .SH 説明
33 | .B Vim
34 | は Vi 互換のテキストエディタです。
35 | どのような種類のプレインテキストでも編集できます。
36 | 特に、プログラムの編集に力を発揮します。
37 | .PP
38 | Vi に多くの改良が加えられています:
39 | 多段アンドゥ、マルチウィンドウ、マルチバッファ、構文強調表示、コマンドライン編集、ファイル名補完、ヘルプ、ビジュアル選択、などなど。
40 | .B Vim
41 | と Vi の違いについての要約は ":help vi_diff.txt" を参照してください。
42 | .PP
43 | .B Vim
44 | の実行中は ":help" コマンドでヘルプを引くことができます。
45 | 下記、オンラインヘルプの項を参照してください。
46 | .PP
47 | .B Vim
48 | は次のようなコマンドで起動できます。
49 | .PP
50 | vim file
51 | .PP
52 | 正確な書式は次の通りです:
53 | .PP
54 | vim [options] [filelist]
55 | .PP
56 | filelist を省略した場合は、空のバッファが開かれます。
57 | 指定した場合は、以下の四つのうちどれか一つの方法でファイルが開かれます。
58 | .TP 12
59 | file ..
60 | ファイルのリスト。
61 | 一番目のファイルがカレントファイルになり、バッファに読み込まれます。
62 | カーソルは、バッファの一行目に置かれます。
63 | 他のファイルを表示するには ":next" コマンドを使ってください。
64 | ファイル名がダッシュで始まるファイルを開く場合は、
65 | filelist の前に "\-\-" を指定してください。
66 | .TP
67 | \-
68 | ファイルは標準入力から読み込まれます。コマンドは標準エラー
69 | (ttyからの入力になっているはず) から読み込まれます。
70 | .TP
71 | \-t {tag}
72 | 開くファイルとカーソルの初期位置は "tag" に依存します。goto label の一種です。
73 | tags ファイルから {tag} が検索され、関連したファイルがカレントファイルになります。
74 | そして、関連したコマンドが実行されます。
75 | これは主に C 言語のファイルを開くときに使われます。
76 | その場合 {tag} に関数などを指定して使います。
77 | 関数を含んでいるファイルが開かれ、その関数の先頭にカーソルが移動する、という動作になります。
78 | 詳しくは ":help tag\-commands" を参照してください。
79 | .TP
80 | \-q [errorfile]
81 | クイックフィックスモードで起動します。
82 | [errorfile] に指定したファイルが読み込まれ、最初のエラーが表示されます。
83 | [errorfile] を省略した場合は、オプション 'errorfile' が使われます
84 | (初期設定は、Amiga では "AztecC.Err"、その他のシステムでは "errors.err" です)。
85 | ":cn" コマンドで次のエラーにジャンプできます。
86 | 詳しくは ":help quickfix" を参照してください。
87 | .PP
88 | .B Vim
89 | は、起動されたときの実行ファイルの名前によって動作を変えます
90 | (実行ファイルの実体が同じであっても)。
91 | .TP 10
92 | vim
93 | "普通" に起動します。標準の状態です。
94 | .TP
95 | ex
96 | Ex モードで起動します。
97 | ノーマルモードに切り替えるには ":vi" コマンドを使ってください。
98 | 引数に "\-e" を指定した場合と同じです。
99 | .TP
100 | view
101 | 読み込み専用モードで起動します。ファイルの保存が制限されます。
102 | 引数に "\-R" を指定した場合と同じです。
103 | .TP
104 | gvim gview
105 | GUI バージョン。
106 | 新しいウィンドウを開いて起動します。
107 | 引数に "\-g" を指定した場合と同じです。
108 | .TP
109 | evim eview
110 | 簡易モードの GUI バージョン。
111 | 新しいウィンドウを開いて起動します。
112 | 引数に "\-y" を指定した場合と同じです。
113 | .TP
114 | rvim rview rgvim rgview
115 | 上記と同じですが、制限モードで起動します。シェルコマンドを実行したり、
116 | .B Vim
117 | をサスペンドしたりできなくなります。
118 | 引数に "\-Z" を指定した場合と同じです。
119 | .SH オプション
120 | ファイル名の前でも後ろでも、好きな順番でオプションを指定できます。
121 | パラメータを必要としない引数は、一つのダッシュにまとめて指定できます。
122 | .TP 12
123 | +[num]
124 | 一番目のファイルの "num" 行目にカーソルを移動します。
125 | "num" を省略した場合は、一行目にカーソルが移動します。
126 | .TP
127 | +/{pat}
128 | 一番目のファイルの、最初に {pat} が見つかった行にカーソルが移動します。
129 | 検索パターンについては ":help search\-pattern" を参照してください。
130 | .TP
131 | +{command}
132 | .TP
133 | \-c {command}
134 | 一番目のファイルが読み込まれた後に {command} が実行されます。
135 | {command} は Ex コマンドとして解釈されます。
136 | {command} に空白を含める場合は、ダブルクォートで囲んでください (シェルに依存)。
137 | 例: vim "+set si" main.c
138 | .br
139 | Note: "+" と "\-c" は合わせて 10 個まで指定できます。
140 | .TP
141 | \-A
142 | アラビア語がサポートされていて、アラビア語キーマップがある場合は、アラビア語モードで起動します ('arabic' がオンになります)。
143 | 右横書きのファイルを編集できます。
144 | サポートされていない場合はエラーメッセージを表示して終了します。
145 | .TP
146 | \-b
147 | バイナリモード。
148 | バイナリファイルを編集するためのオプションがいくつか設定されます。
149 | .TP
150 | \-C
151 | 互換モード。'compatible' オプションがオンになります。
152 | .vimrc ファイルの有無に関わらず、
153 | .B Vim
154 | の動作が Vi 互換になります。
155 | .TP
156 | \-d
157 | 差分モードで起動します。
158 | 2 個から 8 個のファイルを引数に指定してください。
159 | 指定されたファイルが開かれ、それらのファイルの差分が表示されます。
160 | vimdiff(1) と同様の動作です。
161 | .TP
162 | \-d {device}, \-dev {device}
163 | {device} を端末として開きます。
164 | Amiga でのみ使います。
165 | 例:
166 | "\-d con:20/30/600/150".
167 | .TP
168 | \-D
169 | デバッグ。
170 | スクリプトの最初のコマンドが実行されるところからデバッグモードを開始します。
171 | .TP
172 | \-e
173 | Ex モードで起動します。
174 | 実行ファイルの名前が "ex" の場合と同じです。
175 | .TP
176 | \-E
177 | 改良版 Ex モードで起動します。
178 | 実行ファイルの名前が "exim" の場合と同じです。
179 | .TP
180 | \-f
181 | フォアグラウンド。GUI バージョンで、プロセスをフォークしなくなります。
182 | Amiga の場合は、新しいウィンドウで再起動しなくなります。
183 | メールソフトなどから
184 | .B Vim
185 | を起動して、編集が終わるまで待機したいような場合に使ってください。
186 | Amiga では、":sh" と "!" コマンドは機能しなくなります。
187 | .TP
188 | \-F
189 | ペルシア語がサポートされていて、ペルシア語キーマップがある場合は、ペルシア語モードで起動します ('fkmap' と 'rightleft' がオンになります)。
190 | 右横書きのファイルを編集できます。
191 | サポートされていない場合はエラーメッセージを表示して終了します。
192 | .br
193 | 注意: ペルシア語サポートはパッチ 8.1.0932 で削除されました。
194 | .TP
195 | \-g
196 | GUI がサポートされている場合は、GUI で起動します。
197 | サポートされていない場合はエラーメッセージを表示して終了します。
198 | .TP
199 | \-H
200 | ヘブライ語がサポートされていて、ヘブライ語キーマップがある場合は、ヘブライ語モードで起動します ('hkmap' と 'rightleft' がオンになります)。
201 | 右横書きのファイルを編集できます。
202 | サポートされていない場合はエラーメッセージを表示して終了します。
203 | .TP
204 | \-i {viminfo}
205 | 初期設定の "~/.viminfo" の代わりに、viminfo ファイルを読み書きする際に使うファイル名を指定します。
206 | "NONE" を指定すると、.viminfo ファイルを使わないように設定できます。
207 | .TP
208 | \-l
209 | lisp モード。
210 | オプションの 'lisp' と 'showmatch' がオンになります。
211 | .TP
212 | \-L
213 | \-r と同じです。
214 | .TP
215 | \-m
216 | ファイルの変更を不可能にします。
217 | オプション 'write' がオフになります。
218 | バッファを変更することはできますが、ファイルを保存することはできません。
219 | .TP
220 | \-M
221 | 変更を不可能にします。
222 | オプションの 'modifiable' と 'write' がオフになり、ファイルの変更と保存ができなくなります。
223 | Note: それらのオプションを設定すれば変更できるようになります。
224 | .TP
225 | \-n
226 | スワップファイルを使用しません。
227 | クラッシュしてもリカバリできなくなります。
228 | フロッピーディスクのような非常に低速なメディアのファイルを読み書きするときに便利です。
229 | ":set uc=0" と設定しても同じです。
230 | 戻すには ":set uc=200" と設定してください。
231 | .TP
232 | \-nb
233 | NetBeans と接続し、エディタサーバーになります。
234 | 詳しくはヘルプを参照してください。
235 | .TP
236 | \-N
237 | 非互換モード。'compatible' オプションがオフになります。
238 | .vimrc ファイルの有無に関わらず、
239 | .B Vim
240 | の改良された機能が有効になります。Vi との互換性が少し失われます。
241 | .TP
242 | \-o[N]
243 | N 個のウィンドウを水平分割で開きます。
244 | N を省略した場合は、引数のファイルを個別のウィンドウで開きます。
245 | .TP
246 | \-O[N]
247 | N 個のウィンドウを垂直分割で開きます。
248 | N を省略した場合は、引数のファイルを個別のウィンドウで開きます。
249 | .TP
250 | \-p[N]
251 | N 個のタブページを開きます。
252 | N を省略した場合は、引数のファイルを個別のタブページで開きます。
253 | .TP
254 | \-P {parent-title}
255 | Win32 のみ。親になるアプリケーションのタイトルを指定します。
256 | 可能であれば Vim はその MDI アプリケーションのウィンドウ内で起動します。
257 | {parent-title} が親アプリケーションのウィンドウのタイトルに使われていて、明確に区別できる必要があります。
258 | Note: まだ簡単に実装されているだけです。全てのアプリケーションで動くわけではありません。メニューは機能しません。
259 | .TP
260 | \-r
261 | スワップファイルの一覧を表示します。リカバリに関する情報も表示されます。
262 | .TP
263 | \-r {file}
264 | リカバリモード。
265 | スワップファイルを使って、クラッシュした編集セッションを復活させます。
266 | スワップファイルは、ファイル名に ".swp" を加えた名前のファイルです。
267 | 詳しくは ":help recovery" を参照してください。
268 | .TP
269 | \-R
270 | 読み込み専用モード。
271 | オプション 'readonly' がオンになります。
272 | バッファを変更することはできますが、間違ってファイルを上書きしてしまうのを防ぐことができます。
273 | ファイルを保存したい場合は、":w!" のように、Ex コマンドに感嘆符を付けてください。
274 | \-R オプションは \-n オプションの効果も含んでいます (上記参照)。
275 | オプション 'readonly' は ":set noro" でオフにできます。
276 | 詳しくは ":help 'readonly'" を参照してください。
277 | .TP
278 | \-s
279 | サイレントモード。"ex" という名前で起動するか、"\-e" オプションの後で
280 | "\-s" オプションが指定された場合のみ。
281 | .TP
282 | \-s {scriptin}
283 | {scriptin} をスクリプトファイルとして読み込まれます。
284 | ファイル中の文字列は、手で入力したときと同じように処理されます。
285 | これは ":source! {scriptin}" と同じ動作です。
286 | エディタが終了する前にファイルの終わりまで読み込んだ場合、それ以降はキーボードから入力を読み込みます。
287 | .TP
288 | \-S {file}
289 | 一番目のファイルが読み込まれた後に {file} が実行されます。
290 | これは \-c "source {file}" と同じ動作です。
291 | {file} の先頭が '\-' の場合は使えません。
292 | {file} が省略された場合は、"Session.vim" が使われます
293 | (ただし \-S が最後の引数だった場合のみ)。
294 | .TP
295 | \-T {terminal}
296 | 端末の名前を指定します。
297 | 端末が自動的に認識されない場合に使ってください。
298 | .B Vim
299 | が組み込みでサポートしている名前か、
300 | termcap または terminfo ファイルで定義されている名前を指定してください。
301 | .TP
302 | \-u {vimrc}
303 | {vimrc} ファイルを使って初期化します。
304 | 他の初期化処理はスキップされます。
305 | 特殊なファイルを編集する場合などに使ってください。
306 | すべての初期化をスキップするには "NONE" を指定してください。
307 | 詳しくは ":help initialization" を参照してください。
308 | .TP
309 | \-U {gvimrc}
310 | {gvimrc} ファイルを使って GUI を初期化します。
311 | 他の GUI の初期化はスキップされます。
312 | すべての GUI の初期化をスキップするには "NONE" を指定してください。
313 | 詳しくは ":help gui\-init" を参照してください。
314 | .TP
315 | \-v
316 | Vi モードで起動します。
317 | 実行ファイルの名前が "vi" の場合と同じです。
318 | 実行ファイルの名前が "ex" の場合だけ効果があります。
319 | .TP
320 | \-V[N]
321 | 冗長モード。
322 | スクリプトファイルを実行したり viminfo ファイルを読み書きするたびにメッセージを表示します。
323 | N に指定した数値が 'verbose' に設定されます。
324 | 省略した場合は 10 になります。
325 | .TP
326 | \-V[N]{filename}
327 | -V と同様で、さらに 'verbosefile' を {filename} に設定します。
328 | その結果、メッセージは表示されずにファイル {filename} に書き出されます。
329 | {filename} は数字で始まってはいけません。
330 | .TP
331 | \-w{number}
332 | オプション 'window' を {number} に設定します。
333 | .TP
334 | \-w {scriptout}
335 | 入力した文字を {scriptout} に記録します。
336 | "vim \-s" や "source!" で実行するためのスクリプトファイルを作成するのに便利です。
337 | {scriptout} ファイルがすでに存在した場合は追加保存されます。
338 | .TP
339 | \-W {scriptout}
340 | \-w と同じですが、ファイルがすでに存在した場合は上書きされます。
341 | .TP
342 | \-x
343 | .B Vim
344 | が暗号化機能付きでコンパイルされている場合、ファイルを暗号化して書き込みます。
345 | 暗号化キーの入力プロンプトが表示されます。
346 | .TP
347 | \-X
348 | X サーバーと通信しません。端末での起動時間を短くできます。
349 | しかし、ウィンドウタイトルの変更やクリップボードは使えなくなります。
350 | .TP
351 | \-y
352 | 簡易モードで起動します。
353 | 実行ファイルの名前が "evim" や "eview" の場合と同じです。
354 | .B Vim
355 | の動作がモードレスエディタ (click-and-type editor) のようになります。
356 | .TP
357 | \-Z
358 | 制限モード。
359 | 実行ファイルの名前が "r" で始まっている場合と同じです。
360 | .TP
361 | \-\-
362 | オプション指定の末尾を示す記号です。
363 | これ以降の引数はすべてファイル名として扱われます。
364 | ファイル名が '\-' で始まっているファイルを開くときに使ってください。
365 | .TP
366 | \-\-clean
367 | 一切の個人設定 (vimrc、プラグイン、その他) を使用しません。
368 | ある問題がクリーンな Vim セットアップで再現するかを確認するのに有用です。
369 | .TP
370 | \-\-cmd {command}
371 | "\-c" と同じですが、vimrc を処理する前にコマンドが実行されます。
372 | これらのコマンドは "\-c" コマンドとは別に、10 個まで指定できます。
373 | .TP
374 | \-\-echo\-wid
375 | GTK GUI のみ: Window ID を標準出力に出力します。
376 | .TP
377 | \-\-gui-dialog-file {name}
378 | GUI の使用時、ダイアログを表示する代わりとして、ファイル {name} へダイアログのタイトルとメッセージを書き込みます。
379 | ファイルは作成されるか追記されます。
380 | テストにみ有用で、見ることができないダイアログによってテストが中断されるのを防ぎます。
381 | GUI 以外ではこの引数は無視されます。
382 | .TP
383 | \-\-help, \-h, \-?
384 | コマンドライン引数やオプションのヘルプを表示して終了します。
385 | .TP
386 | \-\-literal
387 | 引数のファイル名をリテラル文字列として扱います。ワイルドカードを展開しません。
388 | Unix のように、シェルがワイルドカードを展開する場合は機能しません。
389 | .TP
390 | \-\-log {filename}
391 | もし
392 | .B Vim
393 | がチャネル機能付きでコンパイルされている場合、ログの出力を開始し、ファイル {filename} に書き込みます。
394 | これは、起動時の非常に早い段階で
395 | .I ch_logfile({filename}, 'ao')
396 | を呼び出すのと同様な動作です。
397 | .TP
398 | \-\-nofork
399 | フォアグラウンド。GUI バージョンで、プロセスをフォークしなくなります。
400 | .TP
401 | \-\-noplugin
402 | プラグインをロードしません。\-u NONE はこの動作を含んでいます。
403 | .TP
404 | \-\-not-a-term
405 | 入力と出力(もしくはどちらか一方)が端末に接続されていないことを、ユーザーが把握しているということを
406 | .B Vim
407 | に伝えます。
408 | これにより警告が表示され 2 秒間の遅延が発生するのを避けられます。
409 | .TP
410 | \-\-remote
411 | Vim サーバーと通信し、引数に指定されたファイルを Vim サーバーで開きます。
412 | サーバーが存在しない場合は、エラーメッセージを表示され、起動中の Vim でファイルが開かれます。
413 | .TP
414 | \-\-remote\-expr {expr}
415 | Vim サーバーと通信し、{expr} に与えられた式を Vim サーバーで実行し、結果を標準出力に出力します。
416 | .TP
417 | \-\-remote\-send {keys}
418 | Vim サーバーと通信し、{keys} に与えられたキーを Vim サーバーに送信します。
419 | .TP
420 | \-\-remote\-silent
421 | \-\-remote と同じですが、サーバーが存在しなくてもエラーメッセージを表示しません。
422 | .TP
423 | \-\-remote\-wait
424 | \-\-remote と同じですが、ファイルが開かれるのを確認できるまで待機します。
425 | .TP
426 | \-\-remote\-wait\-silent
427 | \-\-remote\-wait と同じですが、サーバーが存在しなくてもエラーメッセージを表示しません。
428 | .TP
429 | \-\-serverlist
430 | Vim サーバーの一覧を表示します。
431 | .TP
432 | \-\-servername {name}
433 | サーバーの名前を {name} に設定します。
434 | \-\-remote 引数を指定しなかった場合は、起動中の Vim の名前として使われるので、後からその名前を使ってサーバー通信できます。
435 | .TP
436 | \-\-socketid {id}
437 | GTK GUI のみ: GtkPlug メカニズムを使って gVim を別のウィンドウの中で実行します。
438 | .TP
439 | \-\-startuptime {file}
440 | 起動処理の間、経過時間のメッセージをファイル {fname} に書き出します。
441 | .TP
442 | \-\-ttyfail
443 | 標準入力か標準出力が端末 (tty) でない場合、すぐに終了します。
444 | .TP
445 | \-\-version
446 | バージョン情報を表示して終了します。
447 | .TP
448 | \-\-windowid {id}
449 | Win32 GUI の Vim のみ。ウィンドウ {id} を gVim の親ウィンドウにしようと試みます。
450 | 成功するとそのウィンドウの内側で起動します。
451 | .SH オンラインヘルプ
452 | ヘルプを開くには、
453 | .B Vim
454 | の中で ":help" と入力してください。
455 | ":help 調べたい項目" と入力すれば、指定した項目のヘルプが表示されます。
456 | 例: "ZZ" コマンドのヘルプを表示するには ":help ZZ" と入力します。
457 | や CTRL\-D を使って補完することもできます
458 | (":help cmdline\-completion" 参照)。
459 | ヘルプには、項目から項目へジャンプできるようにタグが埋め込まれています
460 | (ハイパーリンクのようなものです。":help" 参照)。
461 | すべてのヘルプファイルはこの方法で開くことができます。
462 | 例: ":help syntax.txt"。
463 | .SH ファイル
464 | .TP 15
465 | /usr/local/share/vim/vim??/doc/*.txt
466 | .B Vim
467 | のヘルプファイル。
468 | ファイルの一覧は ":help doc\-file\-list" に記載されています。
469 | .br
470 | .I vim??
471 | は短いバージョン番号で
472 | .B Vim 9.1
473 | では vim91 です。
474 | .TP
475 | /usr/local/share/vim/vim??/doc/tags
476 | ヘルプを検索するための tags ファイル。
477 | .TP
478 | /usr/local/share/vim/vim??/syntax/syntax.vim
479 | システムの構文定義初期化ファイル。
480 | .TP
481 | /usr/local/share/vim/vim??/syntax/*.vim
482 | いろいろな言語用の構文定義ファイル。
483 | .TP
484 | /usr/local/share/vim/vimrc
485 | システムの
486 | .B Vim
487 | 初期化ファイル。
488 | .TP
489 | ~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc
490 | ユーザーの
491 | .B Vim
492 | 初期化ファイル。(最初のものが使われます。)
493 | .TP
494 | /usr/local/share/vim/gvimrc
495 | システムの gvim 初期化ファイル。
496 | .TP
497 | ~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
498 | ユーザーの
499 | .B gVim
500 | 初期化ファイル。(最初のものが使われます。)
501 | .TP
502 | /usr/local/share/vim/vim??/optwin.vim
503 | ":options" コマンドで使われるファイル。
504 | オプションを表示したり設定したりできます。
505 | .TP
506 | /usr/local/share/vim/vim??/menu.vim
507 | システムのメニュー初期化ファイル。
508 | .B gVim
509 | で使います。
510 | .TP
511 | /usr/local/share/vim/vim??/bugreport.vim
512 | バグレポートを生成するスクリプト。":help bugs" 参照。
513 | .TP
514 | /usr/local/share/vim/vim??/filetype.vim
515 | ファイル名からファイルタイプを判定するスクリプト。":help 'filetype'" 参照。
516 | .TP
517 | /usr/local/share/vim/vim??/scripts.vim
518 | ファイルの内容からファイルタイプを判定するスクリプト。":help 'filetype'" 参照。
519 | .TP
520 | /usr/local/share/vim/vim??/print/*.ps
521 | PostScript 印刷に使われるファイル。
522 | .PP
523 | 最新の情報は VIM のホームページを参照してください:
524 | .br
525 |
526 | .SH 関連項目
527 | vimtutor(1)
528 | .SH 著者
529 | .B Vim
530 | のほとんどの機能は Bram Moolenaar が開発し、多くの人が協力しました。
531 | ":help credits" を参照してください。
532 | .br
533 | .B Vim
534 | は Stevie を基にしています。Stevie は Tim Thompson、Tony Andrews、
535 | G.R. (Fred) Walter によって開発されました。
536 | ただし、オリジナルのコードはもうほとんど残っていません。
537 | .SH バグ
538 | 既知のバグは ":help todo" に記載されています。
539 | .PP
540 | Vi の動作を忠実に再現した結果、多くの人がバグだと思うような機能もいくつかあります。
541 | "この動作は Vi と違う" からバグだと思った場合は、 vi_diff.txt を確認してみてください
542 | (ファイルを開くか、 Vim から ":help vi_diff.txt" と入力)。
543 | オプションの 'compatible' と 'cpoptions' も確認してください。
544 |
--------------------------------------------------------------------------------
/runtime/doc/vim.1:
--------------------------------------------------------------------------------
1 | .TH VIM 1 "2024 Aug 12"
2 | .SH NAME
3 | vim \- Vi IMproved, a programmer's text editor
4 | .SH SYNOPSIS
5 | .br
6 | .B vim
7 | [options] [file ..]
8 | .br
9 | .B vim
10 | [options] \-
11 | .br
12 | .B vim
13 | [options] \-t tag
14 | .br
15 | .B vim
16 | [options] \-q [errorfile]
17 | .PP
18 | .br
19 | .B ex
20 | .br
21 | .B view
22 | .br
23 | .B gvim
24 | .B gview
25 | .B evim
26 | .B eview
27 | .br
28 | .B rvim
29 | .B rview
30 | .B rgvim
31 | .B rgview
32 | .SH DESCRIPTION
33 | .B Vim
34 | is a text editor that is upwards compatible to Vi.
35 | It can be used to edit all kinds of plain text.
36 | It is especially useful for editing programs.
37 | .PP
38 | There are a lot of enhancements above Vi: multi level undo,
39 | multi windows and buffers, syntax highlighting, command line
40 | editing, filename completion, on-line help, visual selection, etc..
41 | See ":help vi_diff.txt" for a summary of the differences between
42 | .B Vim
43 | and Vi.
44 | .PP
45 | While running
46 | .B Vim
47 | a lot of help can be obtained from the on-line help system, with the ":help"
48 | command.
49 | See the ON-LINE HELP section below.
50 | .PP
51 | Most often
52 | .B Vim
53 | is started to edit a single file with the command
54 | .PP
55 | vim file
56 | .PP
57 | More generally
58 | .B Vim
59 | is started with:
60 | .PP
61 | vim [options] [filelist]
62 | .PP
63 | If the filelist is missing, the editor will start with an empty buffer.
64 | Otherwise exactly one out of the following four may be used to choose one or
65 | more files to be edited.
66 | .TP 12
67 | file ..
68 | A list of filenames.
69 | The first one will be the current file and read into the buffer.
70 | The cursor will be positioned on the first line of the buffer.
71 | You can get to the other files with the ":next" command.
72 | To edit a file that starts with a dash, precede the filelist with "\-\-".
73 | .TP
74 | \-
75 | The file to edit is read from stdin. Commands are read from stderr, which
76 | should be a tty.
77 | .TP
78 | \-t {tag}
79 | The file to edit and the initial cursor position depends on a "tag", a sort
80 | of goto label.
81 | {tag} is looked up in the tags file, the associated file becomes the current
82 | file and the associated command is executed.
83 | Mostly this is used for C programs, in which case {tag} could be a function
84 | name.
85 | The effect is that the file containing that function becomes the current file
86 | and the cursor is positioned on the start of the function.
87 | See ":help tag\-commands".
88 | .TP
89 | \-q [errorfile]
90 | Start in quickFix mode.
91 | The file [errorfile] is read and the first error is displayed.
92 | If [errorfile] is omitted, the filename is obtained from the 'errorfile'
93 | option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other
94 | systems).
95 | Further errors can be jumped to with the ":cn" command.
96 | See ":help quickfix".
97 | .PP
98 | .B Vim
99 | behaves differently, depending on the name of the command (the executable may
100 | still be the same file).
101 | .TP 10
102 | vim
103 | The "normal" way, everything is default.
104 | .TP
105 | ex
106 | Start in Ex mode.
107 | Go to Normal mode with the ":vi" command.
108 | Can also be done with the "\-e" argument.
109 | .TP
110 | view
111 | Start in read-only mode. You will be protected from writing the files.
112 | Can also be done with the "\-R" argument.
113 | .TP
114 | gvim gview
115 | The GUI version.
116 | Starts a new window.
117 | Can also be done with the "\-g" argument.
118 | .TP
119 | evim eview
120 | The GUI version in easy mode.
121 | Starts a new window.
122 | Can also be done with the "\-y" argument.
123 | .TP
124 | rvim rview rgvim rgview
125 | Like the above, but with restrictions. It will not be possible to start shell
126 | commands, or suspend
127 | .B Vim.
128 | Can also be done with the "\-Z" argument.
129 | .SH OPTIONS
130 | The options may be given in any order, before or after filenames.
131 | Options without an argument can be combined after a single dash.
132 | .TP 12
133 | +[num]
134 | For the first file the cursor will be positioned on line "num".
135 | If "num" is missing, the cursor will be positioned on the last line.
136 | .TP
137 | +/{pat}
138 | For the first file the cursor will be positioned in the line with the
139 | first occurrence of {pat}.
140 | See ":help search\-pattern" for the available search patterns.
141 | .TP
142 | +{command}
143 | .TP
144 | \-c {command}
145 | {command} will be executed after the first file has been read.
146 | {command} is interpreted as an Ex command.
147 | If the {command} contains spaces it must be enclosed in double quotes (this
148 | depends on the shell that is used).
149 | Example: vim "+set si" main.c
150 | .br
151 | Note: You can use up to 10 "+" or "\-c" commands.
152 | .TP
153 | \-A
154 | If
155 | .B Vim
156 | has been compiled with ARABIC support for editing right-to-left
157 | oriented files and Arabic keyboard mapping, this option starts
158 | .B Vim
159 | in Arabic mode, i.e. 'arabic' is set. Otherwise an error
160 | message is given and
161 | .B Vim
162 | aborts.
163 | .TP
164 | \-b
165 | Binary mode.
166 | A few options will be set that makes it possible to edit a binary or
167 | executable file.
168 | .TP
169 | \-C
170 | Compatible. Set the 'compatible' option.
171 | This will make
172 | .B Vim
173 | behave mostly like Vi, even though a .vimrc file exists.
174 | .TP
175 | \-d
176 | Start in diff mode.
177 | There should between two to eight file name arguments.
178 | .B Vim
179 | will open all the files and show differences between them.
180 | Works like vimdiff(1).
181 | .TP
182 | \-d {device}, \-dev {device}
183 | Open {device} for use as a terminal.
184 | Only on the Amiga.
185 | Example:
186 | "\-d con:20/30/600/150".
187 | .TP
188 | \-D
189 | Debugging. Go to debugging mode when executing the first command from a
190 | script.
191 | .TP
192 | \-e
193 | Start
194 | .B Vim
195 | in Ex mode, just like the executable was called "ex".
196 | .TP
197 | \-E
198 | Start
199 | .B Vim
200 | in improved Ex mode, just like the executable was called "exim".
201 | .TP
202 | \-f
203 | Foreground. For the GUI version,
204 | .B Vim
205 | will not fork and detach from the shell it was started in.
206 | On the Amiga,
207 | .B Vim
208 | is not restarted to open a new window.
209 | This option should be used when
210 | .B Vim
211 | is executed by a program that will wait for the edit
212 | session to finish (e.g. mail).
213 | On the Amiga the ":sh" and ":!" commands will not work.
214 | .TP
215 | \-F
216 | If
217 | .B Vim
218 | has been compiled with FKMAP support for editing right-to-left
219 | oriented files and Farsi keyboard mapping, this option starts
220 | .B Vim
221 | in Farsi mode, i.e. 'fkmap' and 'rightleft' are set.
222 | Otherwise an error message is given and
223 | .B Vim
224 | aborts.
225 | .br
226 | Note: Farsi support has been removed in patch 8.1.0932.
227 | .TP
228 | \-g
229 | If
230 | .B Vim
231 | has been compiled with GUI support, this option enables the GUI.
232 | If no GUI support was compiled in, an error message is given and
233 | .B Vim
234 | aborts.
235 | .TP
236 | \-H
237 | If
238 | .B Vim
239 | has been compiled with RIGHTLEFT support for editing right-to-left
240 | oriented files and Hebrew keyboard mapping, this option starts
241 | .B Vim
242 | in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set.
243 | Otherwise an error message is given and
244 | .B Vim
245 | aborts.
246 | .TP
247 | \-i {viminfo}
248 | Specifies the filename to use when reading or writing the viminfo file,
249 | instead of the default "~/.viminfo".
250 | This can also be used to skip the use of the .viminfo file, by giving the name
251 | "NONE".
252 | .TP
253 | \-l
254 | Lisp mode.
255 | Sets the 'lisp' and 'showmatch' options on.
256 | .TP
257 | \-L
258 | Same as \-r.
259 | .TP
260 | \-m
261 | Modifying files is disabled.
262 | Resets the 'write' option.
263 | You can still modify the buffer, but writing a file is not possible.
264 | .TP
265 | \-M
266 | Modifications not allowed. The 'modifiable' and 'write' options will be unset,
267 | so that changes are not allowed and files can not be written. Note that these
268 | options can be set to enable making modifications.
269 | .TP
270 | \-n
271 | No swap file will be used.
272 | Recovery after a crash will be impossible.
273 | Handy if you want to edit a file on a very slow medium (e.g. floppy).
274 | Can also be done with ":set uc=0".
275 | Can be undone with ":set uc=200".
276 | .TP
277 | \-N
278 | No-compatible mode. Resets the 'compatible' option.
279 | This will make
280 | .B Vim
281 | behave a bit better, but less Vi compatible, even though a .vimrc file does
282 | not exist.
283 | .TP
284 | \-nb
285 | Become an editor server for NetBeans. See the docs for details.
286 | .TP
287 | \-o[N]
288 | Open N windows stacked.
289 | When N is omitted, open one window for each file.
290 | .TP
291 | \-O[N]
292 | Open N windows side by side.
293 | When N is omitted, open one window for each file.
294 | .TP
295 | \-p[N]
296 | Open N tab pages.
297 | When N is omitted, open one tab page for each file.
298 | .TP
299 | \-P {parent-title}
300 | Win32 GUI only: Specify the title of the parent application. When possible, Vim
301 | will run in an MDI window inside the application. {parent-title} must appear in
302 | the window title of the parent application. Make sure that it is specific
303 | enough. Note that the implementation is still primitive. It won't work with
304 | all applications and the menu doesn't work.
305 | .TP
306 | \-r
307 | List swap files, with information about using them for recovery.
308 | .TP
309 | \-r {file}
310 | Recovery mode.
311 | The swap file is used to recover a crashed editing session.
312 | The swap file is a file with the same filename as the text file with ".swp"
313 | appended.
314 | See ":help recovery".
315 | .TP
316 | \-R
317 | Read-only mode.
318 | The 'readonly' option will be set.
319 | You can still edit the buffer, but will be prevented from accidentally
320 | overwriting a file.
321 | If you do want to overwrite a file, add an exclamation mark to the Ex command,
322 | as in ":w!".
323 | The \-R option also implies the \-n option (see above).
324 | The 'readonly' option can be reset with ":set noro".
325 | See ":help 'readonly'".
326 | .TP
327 | \-s
328 | Silent mode. Only when started as "Ex" or when the "\-e" option was given
329 | before the "\-s" option.
330 | .TP
331 | \-s {scriptin}
332 | The script file {scriptin} is read.
333 | The characters in the file are interpreted as if you had typed them.
334 | The same can be done with the command ":source! {scriptin}".
335 | If the end of the file is reached before the editor exits, further characters
336 | are read from the keyboard.
337 | .TP
338 | \-S {file}
339 | {file} will be sourced after the first file has been read.
340 | This is equivalent to \-c "source {file}".
341 | {file} cannot start with '\-'.
342 | If {file} is omitted "Session.vim" is used (only works when \-S is the last
343 | argument).
344 | .TP
345 | \-T {terminal}
346 | Tells
347 | .B Vim
348 | the name of the terminal you are using.
349 | Only required when the automatic way doesn't work.
350 | Should be a terminal known to
351 | .B Vim
352 | (builtin) or defined in the termcap or terminfo file.
353 | .TP
354 | \-u {vimrc}
355 | Use the commands in the file {vimrc} for initializations.
356 | All the other initializations are skipped.
357 | Use this to edit a special kind of files.
358 | It can also be used to skip all initializations by giving the name "NONE".
359 | See ":help initialization" within vim for more details.
360 | .TP
361 | \-U {gvimrc}
362 | Use the commands in the file {gvimrc} for GUI initializations.
363 | All the other GUI initializations are skipped.
364 | It can also be used to skip all GUI initializations by giving the name "NONE".
365 | See ":help gui\-init" within vim for more details.
366 | .TP
367 | \-v
368 | Start
369 | .B Vim
370 | in Vi mode, just like the executable was called "vi". This only has effect
371 | when the executable is called "ex".
372 | .TP
373 | \-V[N]
374 | Verbose. Give messages about which files are sourced and for reading and
375 | writing a viminfo file. The optional number N is the value for 'verbose'.
376 | Default is 10.
377 | .TP
378 | \-V[N]{filename}
379 | Like \-V and set 'verbosefile' to {filename}. The result is that messages are
380 | not displayed but written to the file {filename}. {filename} must not start
381 | with a digit.
382 | .TP
383 | \-w{number}
384 | Set the 'window' option to {number}.
385 | .TP
386 | \-w {scriptout}
387 | All the characters that you type are recorded in the file
388 | {scriptout}, until you exit
389 | .B Vim.
390 | This is useful if you want to create a script file to be used with "vim \-s" or
391 | ":source!".
392 | If the {scriptout} file exists, characters are appended.
393 | .TP
394 | \-W {scriptout}
395 | Like \-w, but an existing file is overwritten.
396 | .TP
397 | \-x
398 | If
399 | .B Vim
400 | has been compiled with encryption support, use encryption when writing files.
401 | Will prompt for a crypt key.
402 | .TP
403 | \-X
404 | Don't connect to the X server. Shortens startup time in a terminal, but the
405 | window title and clipboard will not be used.
406 | .TP
407 | \-y
408 | Start
409 | .B Vim
410 | in easy mode, just like the executable was called "evim" or "eview".
411 | Makes
412 | .B Vim
413 | behave like a click-and-type editor.
414 | .TP
415 | \-Z
416 | Restricted mode. Works like the executable starts with "r".
417 | .TP
418 | \-\-
419 | Denotes the end of the options.
420 | Arguments after this will be handled as a file name.
421 | This can be used to edit a filename that starts with a '\-'.
422 | .TP
423 | \-\-clean
424 | Do not use any personal configuration (vimrc, plugins, etc.). Useful to see if
425 | a problem reproduces with a clean Vim setup.
426 | .TP
427 | \-\-cmd {command}
428 | Like using "\-c", but the command is executed just before
429 | processing any vimrc file.
430 | You can use up to 10 of these commands, independently from "\-c" commands.
431 | .TP
432 | \-\-echo\-wid
433 | GTK GUI only: Echo the Window ID on stdout.
434 | .TP
435 | \-\-gui\-dialog\-file {name}
436 | When using the GUI, instead of showing a dialog, write the title and message of
437 | the dialog to file {name}. The file is created or appended to. Only useful
438 | for testing, to avoid that the test gets stuck on a dialog that can't be seen.
439 | Without the GUI the argument is ignored.
440 | .TP
441 | \-\-help, \-h, \-?
442 | Give a bit of help about the command line arguments and options.
443 | After this
444 | .B Vim
445 | exits.
446 | .TP
447 | \-\-literal
448 | Take file name arguments literally, do not expand wildcards. This has no
449 | effect on Unix where the shell expands wildcards.
450 | .TP
451 | \-\-log {filename}
452 | If
453 | .B Vim
454 | has been compiled with eval and channel feature, start logging and write
455 | entries to {filename}. This works like calling
456 | .I ch_logfile({filename}, 'ao')
457 | very early during startup.
458 | .TP
459 | \-\-nofork
460 | Foreground. For the GUI version,
461 | .B Vim
462 | will not fork and detach from the shell it was started in.
463 | .TP
464 | \-\-noplugin
465 | Skip loading plugins. Implied by \-u NONE.
466 | .TP
467 | \-\-not\-a\-term
468 | Tells
469 | .B Vim
470 | that the user knows that the input and/or output is not connected to a
471 | terminal. This will avoid the warning and the two second delay that would
472 | happen.
473 | .TP
474 | \-\-remote
475 | Connect to a Vim server and make it edit the files given in the rest of the
476 | arguments. If no server is found a warning is given and the files are edited
477 | in the current Vim.
478 | .TP
479 | \-\-remote\-expr {expr}
480 | Connect to a Vim server, evaluate {expr} in it and print the result on stdout.
481 | .TP
482 | \-\-remote\-send {keys}
483 | Connect to a Vim server and send {keys} to it.
484 | .TP
485 | \-\-remote\-silent
486 | As \-\-remote, but without the warning when no server is found.
487 | .TP
488 | \-\-remote\-wait
489 | As \-\-remote, but Vim does not exit until the files have been edited.
490 | .TP
491 | \-\-remote\-wait\-silent
492 | As \-\-remote\-wait, but without the warning when no server is found.
493 | .TP
494 | \-\-serverlist
495 | List the names of all Vim servers that can be found.
496 | .TP
497 | \-\-servername {name}
498 | Use {name} as the server name. Used for the current Vim, unless used with a
499 | \-\-remote argument, then it's the name of the server to connect to.
500 | .TP
501 | \-\-socketid {id}
502 | GTK GUI only: Use the GtkPlug mechanism to run gVim in another window.
503 | .TP
504 | \-\-startuptime {file}
505 | During startup write timing messages to the file {fname}.
506 | .TP
507 | \-\-ttyfail
508 | When stdin or stdout is not a a terminal (tty) then exit right away.
509 | .TP
510 | \-\-version
511 | Print version information and exit.
512 | .TP
513 | \-\-windowid {id}
514 | Win32 GUI only: Make gVim try to use the window {id} as a parent, so that it
515 | runs inside that window.
516 | .SH ON-LINE HELP
517 | Type ":help" in
518 | .B Vim
519 | to get started.
520 | Type ":help subject" to get help on a specific subject.
521 | For example: ":help ZZ" to get help for the "ZZ" command.
522 | Use and CTRL-D to complete subjects (":help cmdline\-completion").
523 | Tags are present to jump from one place to another (sort of hypertext links,
524 | see ":help").
525 | All documentation files can be viewed in this way, for example
526 | ":help syntax.txt".
527 | .SH FILES
528 | .TP 15
529 | /usr/local/share/vim/vim??/doc/*.txt
530 | The
531 | .B Vim
532 | documentation files.
533 | Use ":help doc\-file\-list" to get the complete list.
534 | .br
535 | .I vim??
536 | is short version number, like vim91 for
537 | .B Vim 9.1
538 | .TP
539 | /usr/local/share/vim/vim??/doc/tags
540 | The tags file used for finding information in the documentation files.
541 | .TP
542 | /usr/local/share/vim/vim??/syntax/syntax.vim
543 | System wide syntax initializations.
544 | .TP
545 | /usr/local/share/vim/vim??/syntax/*.vim
546 | Syntax files for various languages.
547 | .TP
548 | /usr/local/share/vim/vimrc
549 | System wide
550 | .B Vim
551 | initializations.
552 | .TP
553 | ~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc
554 | Your personal
555 | .B Vim
556 | initializations (first one found is used).
557 | .TP
558 | /usr/local/share/vim/gvimrc
559 | System wide gvim initializations.
560 | .TP
561 | ~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
562 | Your personal
563 | .B gVim
564 | initializations (first one found is used).
565 | .TP
566 | /usr/local/share/vim/vim??/optwin.vim
567 | Script used for the ":options" command, a nice way to view and set options.
568 | .TP
569 | /usr/local/share/vim/vim??/menu.vim
570 | System wide menu initializations for
571 | .B gVim.
572 | .TP
573 | /usr/local/share/vim/vim??/bugreport.vim
574 | Script to generate a bug report. See ":help bugs".
575 | .TP
576 | /usr/local/share/vim/vim??/filetype.vim
577 | Script to detect the type of a file by its name. See ":help 'filetype'".
578 | .TP
579 | /usr/local/share/vim/vim??/scripts.vim
580 | Script to detect the type of a file by its contents. See ":help 'filetype'".
581 | .TP
582 | /usr/local/share/vim/vim??/print/*.ps
583 | Files used for PostScript printing.
584 | .PP
585 | For recent info read the VIM home page:
586 | .br
587 |
588 | .SH SEE ALSO
589 | vimtutor(1)
590 | .SH AUTHOR
591 | Most of
592 | .B Vim
593 | was made by Bram Moolenaar, with a lot of help from others.
594 | See ":help credits" in
595 | .B Vim.
596 | .br
597 | .B Vim
598 | is based on Stevie, worked on by: Tim Thompson,
599 | Tony Andrews and G.R. (Fred) Walter.
600 | Although hardly any of the original code remains.
601 | .SH BUGS
602 | Probably.
603 | See ":help todo" for a list of known problems.
604 | .PP
605 | Note that a number of things that may be regarded as bugs by some, are in fact
606 | caused by a too-faithful reproduction of Vi's behaviour.
607 | And if you think other things are bugs "because Vi does it differently",
608 | you should take a closer look at the vi_diff.txt file (or type :help
609 | vi_diff.txt when in Vim).
610 | Also have a look at the 'compatible' and 'cpoptions' options.
611 |
--------------------------------------------------------------------------------
/runtime/doc/vimdiff-ja.UTF-8.1:
--------------------------------------------------------------------------------
1 | .TH VIMDIFF 1 "2021 June 13"
2 | .SH 名前
3 | vimdiff \- 2 個から 8 個のファイルを Vim で開いて、その差分を表示する
4 | .SH 書式
5 | .br
6 | .B vimdiff
7 | [options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
8 | .PP
9 | .B gvimdiff
10 | .SH 説明
11 | .B Vimdiff
12 | は、2 個から 8 個のファイルを
13 | .B Vim
14 | で開きます。
15 | ファイルは個別のウィンドウで開かれ、差分が強調表示されます。
16 | 同じファイルの別のバージョン間で、変更を確認したり、変更を移動したりするのが簡単になります。
17 | .PP
18 | Vim についての詳細は vim(1) を参照してください。
19 | .PP
20 | .B gvimdiff
21 | という名前で起動された場合は GUI で起動します。
22 | .PP
23 | 差分を強調表示するために、それぞれのウィンドウの 'diff' オプションがオンに設定されます。
24 | .br
25 | テキストを見やすくするために、オプションの 'wrap' と 'scrollbind' もオンに設定されます。
26 | .br
27 | 'foldmethod' オプションは "diff" に設定され、変更されていない行は折り畳まれます。
28 | 折り畳みの確認と開閉が簡単にできるように、'foldcolumn' は 2 に設定されます。
29 | .SH オプション
30 | 行を並べて表示するために、"\-O" 引数を使ったときのように、ウィンドウは垂直分割されます。
31 | ウィンドウを水平分割したい場合は "\-o" 引数を使ってください。
32 | .PP
33 | その他の引数については vim(1) を参照してください。
34 | .SH 関連項目
35 | vim(1)
36 | .SH 著者
37 | .B Vim
38 | のほとんどの機能は Bram Moolenaar が開発し、多くの人が協力しました。
39 | ":help credits" を参照してください。
40 |
--------------------------------------------------------------------------------
/runtime/doc/vimdiff.1:
--------------------------------------------------------------------------------
1 | .TH VIMDIFF 1 "2021 June 13"
2 | .SH NAME
3 | vimdiff \- edit between two and eight versions of a file with Vim and show differences
4 | .SH SYNOPSIS
5 | .br
6 | .B vimdiff
7 | [options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
8 | .PP
9 | .B gvimdiff
10 | .SH DESCRIPTION
11 | .B Vimdiff
12 | starts
13 | .B Vim
14 | on two up to eight files.
15 | Each file gets its own window.
16 | The differences between the files are highlighted.
17 | This is a nice way to inspect changes and to move changes from one version
18 | to another version of the same file.
19 | .PP
20 | See vim(1) for details about Vim itself.
21 | .PP
22 | When started as
23 | .B gvimdiff
24 | the GUI will be started, if available.
25 | .PP
26 | In each window the 'diff' option will be set, which causes the differences
27 | to be highlighted.
28 | .br
29 | The 'wrap' and 'scrollbind' options are set to make the text look good.
30 | .br
31 | The 'foldmethod' option is set to "diff", which puts ranges of lines without
32 | changes in a fold. 'foldcolumn' is set to two to make it easy to spot the
33 | folds and open or close them.
34 | .SH OPTIONS
35 | Vertical splits are used to align the lines, as if the "\-O" argument was used.
36 | To use horizontal splits instead, use the "\-o" argument.
37 | .PP
38 | For all other arguments see vim(1).
39 | .SH SEE ALSO
40 | vim(1)
41 | .SH AUTHOR
42 | Most of
43 | .B Vim
44 | was made by Bram Moolenaar, with a lot of help from others.
45 | See ":help credits" in
46 | .B Vim.
47 |
--------------------------------------------------------------------------------
/runtime/doc/vimtutor-ja.UTF-8.1:
--------------------------------------------------------------------------------
1 | .TH VIMTUTOR 1 "2024 August 12"
2 | .SH 名前
3 | vimtutor \- Vim チュートリアル
4 | .SH 書式
5 | .br
6 | .B vimtutor [\-g] [language]
7 | .SH 説明
8 | .B Vim
9 | のチュートリアルを起動します。
10 | 演習ファイルのコピーを使って実施するので、オリジナルの演習ファイルを壊してしまう心配はありません。
11 | .PP
12 | .B Vim
13 | を初めて学ぶ人向けのチュートリアルです。
14 | .PP
15 | 引数に \-g を指定すると GUI 版の Vim が利用可能であれば vim ではなく gvim
16 | を使って vimtutor が開始します。gvim が見つからないときは vim が使用されます。
17 | .PP
18 | [language] 引数は "ja" や "es" などの二文字の言語名です。
19 | [language] 引数を省略した場合はロケールの言語が使われます。
20 | 翻訳された演習ファイルがある場合は、そのファイルが使われます。
21 | ない場合は英語のファイルが使われます。
22 | .PP
23 | .B Vim
24 | は Vi 互換モードで起動されます。
25 | .SH ファイル
26 | .TP 15
27 | /usr/local/share/vim/vim??/tutor/tutor[.language]
28 | .B Vimtutor
29 | の演習ファイル。
30 | .I vim??
31 | は短いバージョン番号で
32 | .B Vim 9.1
33 | では vim91 です。
34 | .TP 15
35 | /usr/local/share/vim/vim??/tutor/tutor.vim
36 | 演習ファイルをコピーするための Vim スクリプト。
37 | .SH 著者
38 | .B Vimtutor
39 | は、Colorado State University の Charles Smith のアイデアを基に、
40 | Colorado School of Mines の Michael C. Pierce と Robert K. Ware
41 | の両名によって Vi 向けに作成されたものを基にしています。
42 | E-mail: bware@mines.colorado.edu (現在は無効).
43 | .br
44 | .B Vim
45 | に合わせて Bram Moolenaar が変更を加えました。
46 | 翻訳者の名前は演習ファイルを参照してください。
47 | .SH 関連項目
48 | vim(1)
49 |
--------------------------------------------------------------------------------
/runtime/doc/vimtutor.1:
--------------------------------------------------------------------------------
1 | .TH VIMTUTOR 1 "2024 August 12"
2 | .SH NAME
3 | vimtutor \- the Vim tutor
4 | .SH SYNOPSIS
5 | .br
6 | .B vimtutor [\-g] [language]
7 | .SH DESCRIPTION
8 | .B Vimtutor
9 | starts the
10 | .B Vim
11 | tutor.
12 | It copies the tutor file first, so that it can be modified without changing
13 | the original file.
14 | .PP
15 | The
16 | .B Vimtutor
17 | is useful for people that want to learn their first
18 | .B Vim
19 | commands.
20 | .PP
21 | The optional argument \-g starts vimtutor with gvim rather than vim, if the
22 | GUI version of Vim is available, or falls back to vim if gvim is not found.
23 | .PP
24 | The optional [language] argument is the two-letter name of a language, like
25 | "it" or "es".
26 | If the [language] argument is missing, the language of the current locale will
27 | be used.
28 | If a tutor in this language is available, it will be used.
29 | Otherwise the English version will be used.
30 | .PP
31 | .B Vim
32 | is always started in Vi compatible mode.
33 | .SH FILES
34 | .TP 15
35 | /usr/local/share/vim/vim??/tutor/tutor[.language]
36 | The
37 | .B Vimtutor
38 | text file(s).
39 | .br
40 | .I vim??
41 | is short version number, like vim91 for
42 | .B Vim 9.1
43 | .TP 15
44 | /usr/local/share/vim/vim??/tutor/tutor.vim
45 | The Vim script used to copy the
46 | .B Vimtutor
47 | text file.
48 | .SH AUTHOR
49 | The
50 | .B Vimtutor
51 | was originally written for Vi by Michael C. Pierce and Robert K. Ware,
52 | Colorado School of Mines using ideas supplied by Charles Smith,
53 | Colorado State University.
54 | E-mail: bware@mines.colorado.edu (now invalid).
55 | .br
56 | It was modified for
57 | .B Vim
58 | by Bram Moolenaar.
59 | For the names of the translators see the tutor files.
60 | .SH SEE ALSO
61 | vim(1)
62 |
--------------------------------------------------------------------------------
/runtime/doc/xxd-ja.UTF-8.1:
--------------------------------------------------------------------------------
1 | .TH XXD 1 "May 2024" "Manual page for xxd"
2 | .\"
3 | .\" 21st May 1996
4 | .\" Man page author:
5 | .\" Tony Nugent
6 | .\" Changes by Bram Moolenaar
7 | .SH 名前
8 | .I xxd
9 | \- 16 進ダンプを作成したり、元に戻したり。
10 | .SH 書式
11 | .B xxd
12 | \-h[elp]
13 | .br
14 | .B xxd
15 | [options] [infile [outfile]]
16 | .br
17 | .B xxd
18 | \-r[evert] [options] [infile [outfile]]
19 | .SH 説明
20 | ファイルや標準入力から 16 進ダンプを作成します。
21 | 16 進ダンプから元のバイナリに戻すこともできます。
22 | .BR uuencode (1)
23 | や
24 | .BR uudecode (1)
25 | のように、バイナリデータを、メールに貼り付け可能な ASCII 形式に変換できたり、標準出力に出力することもできます。
26 | さらに、バイナリファイルにパッチを当てるという使い方もできます。
27 | .SH オプション
28 | .I infile
29 | を指定しなかった場合は、標準入力が読み込まれます。
30 | .I infile
31 | に
32 | .RB \` \- '
33 | を指定した場合も、標準入力から読み込まれます。
34 | .I outfile
35 | を指定しなかった (または
36 | .RB \` \- '
37 | を指定した) 場合は、標準出力に出力されます。
38 | .PP
39 | 引数の解釈処理は適当なので注意してください。
40 | パラメータを取らない引数は最初の一文字だけチェックされます。
41 | 引数の文字とパラメータの間のスペースは省略可能です。
42 | パラメータは 10 進数、16 進数、8 進数で指定できます。
43 | .BR \-c8
44 | 、
45 | .BR "\-c 8"
46 | 、
47 | .B \-c 010
48 | 、
49 | .B \-cols 8
50 | はすべて同じ意味です。
51 | .PP
52 | .TP
53 | .IR \-a " | " \-autoskip
54 | オートスキップ: 連続した nul 行を一つの '*' で置き換える。
55 | .TP
56 | .IR \-b " | " \-bits
57 | ビット (2進数) ダンプ。
58 | 1 オクテットが "1" と "0" の 8 文字で出力されます。
59 | 各行の行頭には 16 進数の行番号が表示されます。
60 | 行末には ASCII (または EBCDIC) で表した場合の文字が表示されます。
61 | このモードでは \-p、\-i は機能しません。
62 | .TP
63 | .IR \-e
64 | リトルエンディアンの 16 進ダンプに切り替える。
65 | このオプションは、バイトのグループをリトルエンディアンのバイト順のワードとして扱います。
66 | 標準のグルーピングは 4 バイトですが、
67 | .RI "" \-g
68 | を使うことで変更可能です。
69 | このオプションは 16 進ダンプのみに適用され、ASCII (あるいは EBCDIC)
70 | 表示は変更されません。
71 | このモードでは \-r、\-p、\-i は機能しません。
72 | .TP
73 | .IR "\-c cols " | " \-cols cols"
74 | 一行
75 | .RI < cols >
76 | オクテットで出力する。標準設定は 16 (\-i: 12, \-ps: 30, \-b: 6)。最大 256。
77 | \-ps には最大値がありません。 \-ps 付きの場合、0 を指定すると単一の長い行で出力されます。
78 | .TP
79 | .IR \-C " | " \-capitalize
80 | \-i を使用した際に、C インクルードファイル形式の変数名を大文字にする。
81 | .TP
82 | .I \-d
83 | オフセットを 16 進の代わりに 10 進で表示する。
84 | .TP
85 | .IR \-E " | " \-EBCDIC
86 | 右端に出力される文字のエンコーディングを ASCII から EBCDIC に変更する。
87 | 16 進ダンプの出力形式は変更されません。
88 | \-r、\-p、\-i が同時に指定された場合は何の効果もありません。
89 | .TP
90 | .IR "\-g bytes " | " \-groupsize bytes"
91 | 出力を
92 | .RI < bytes >
93 | バイト (2 文字の 16 進数、または 8 文字の 2 進数) ごとにスペースで区切ります。
94 | 区切らずに出力するには
95 | .I \-g 0
96 | を指定してください。
97 | .RI < Bytes >
98 | の標準設定は \fI2\fP で、リトルエンディアンモードの場合は \fI4\fP 、
99 | 2 進ダンプの場合は \fI1\fP です。
100 | ポストスクリプト形式やインクルード形式で出力するときは、このオプションは使われません。
101 | .TP
102 | .IR \-h " | " \-help
103 | コマンドの説明を出力して終了する。変換は実行されません。
104 | .TP
105 | .IR \-i " | " \-include
106 | C インクルードファイル形式で出力する。
107 | 入力ファイルの名前が付けられた静的配列の定義が出力されます。
108 | 標準入力の場合は定義の中身だけ出力されます。
109 | .TP
110 | .IR "\-l len " | " \-len len"
111 | .RI < len >
112 | オクテットだけ出力する。
113 | .TP
114 | .I "\-n name " | " \-name name"
115 | \-i が使われたときに変数名の出力を上書きする。
116 | 配列は \fIname\fP と名付けられ、長さは \fIname\fP_len と名付けられます。
117 | .TP
118 | .I \-o offset
119 | 表示されるファイル位置に
120 | .RI < offset >
121 | を加算する。
122 | .TP
123 | .IR \-p " | " \-ps " | " \-postscript " | " \-plain
124 | ポストスクリプト形式の 16 進ダンプを出力する。別名 プレーン 16 進ダンプ。
125 | .TP
126 | .IR \-r " | " \-revert
127 | 元に戻す: 16 進ダンプからバイナリ形式に変換 (またはパッチ) します。
128 | ファイルへ出力する場合、出力先のファイルは切り詰めされません。
129 | 行番号や特定の書式がないプレーン 16 進ダンプを読み込む場合は、
130 | .I \-r \-p
131 | の組み合わせを使ってください。空白と改行は無視されます。
132 | 16 進ダンプの代わりにビットダンプを読み込むには、
133 | .I \-r \-b
134 | の組み合わせを使ってください。
135 | .TP
136 | .IR \-R " " when
137 | 16 進の値に基づいて、16 進の値とその値の両方が同じ色でカラー表示される。
138 | たいていは、表示可能文字と非表示可能文字を区別するのに有用です。
139 | .I \fIwhen\fP
140 | は
141 | .BR never ", " always ", あるいは " auto " (デフォルト: auto)
142 | のいずれかです。
143 | .BR $NO_COLOR
144 | 環境変数が設定されているときは、カラー表示は無効化されます。
145 | .TP
146 | .I \-seek offset
147 | .IR \-r
148 | の後で使われた場合: 16 進ダンプを出力するファイルの位置に
149 | .RI < offset >
150 | を加える。
151 | .TP
152 | .I \-s [+][\-]seek
153 | infile の
154 | .RI < seek >
155 | バイト目 (絶対位置、または相対位置) から開始する。
156 | \fI+ \fRは、現在の標準入力の位置から相対的な位置を示します
157 | (標準入力から読み込むときのみ意味があります)。
158 | \fI\- \fRは、入力の終わりからの文字数を示します
159 | (\fI+\fR と同時に指定した場合は、現在の標準入力の位置から手前の位置を示します)。
160 | \-s 引数を指定しなかった場合は、現在のファイル位置から開始されます。
161 | .TP
162 | .I \-u
163 | 16 進数の表記に大文字を使います。指定がない場合は小文字で出力されます。
164 | .TP
165 | .IR \-v " | " \-version
166 | バージョンを表示します。
167 | .SH 警告
168 | .PP
169 | .I xxd \-r
170 | では行番号の評価に関しての暗黙のルールがいくつかあります。
171 | 出力ファイルがシーク可能なら、各行の行番号が順番通りに並んでなくても構いません。
172 | 位置が飛んでいても重なっていても大丈夫です。
173 | その場合、次の位置に移動するために lseek(2) が使われます。
174 | 出力ファイルがシーク不可なら、「隙間」だけが処理可能です。
175 | 隙間は null バイトで埋められます。
176 | .PP
177 | .I xxd \-r
178 | は不正な入力をエラーにしません。ゴミは静かに読み飛ばされます。
179 | .PP
180 | 16 進ダンプを編集するときは注意が必要です。
181 | .I xxd \-r
182 | は必要な桁 (\-c 引数参照) だけ 16 進データを読み込んで、行の残りを無視します。
183 | つまり、ASCII (または EBCDIC) を示している列への変更は無視されます。
184 | xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダンプを元に戻す場合は、列の数は影響しません。
185 | 2 桁の 16 進数と認識できるものはすべて変換されます。
186 | .PP
187 | \fI% xxd \-i file\fR
188 | .br
189 | と
190 | .br
191 | \fI% xxd \-i < file\fR
192 | .br
193 | の結果は違います。注意してください。
194 | .PP
195 | .I xxd \-s +seek
196 | と
197 | .IR "xxd \-s seek" ,
198 | の違いは、lseek(2) を使って入力を "巻き戻す" かどうかです。'+' が意味を持つのは、入力が標準入力で、xxd
199 | が起動されたときに標準入力のファイル位置がファイルの先頭ではなかった場合です。
200 | 以下の例が分かりやすいかもしれません (もっと混乱するかも!):
201 | .PP
202 | `cat' が既に標準入力を終わりまで読んでいるので、読む前に標準入力を巻き戻す必要がある。
203 | .br
204 | \fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
205 | .PP
206 | ファイル位置 0x480 (=1024+128) 前方から 16 進ダンプする。
207 | `+' は 「現在地からの相対位置」を意味するので、dd が 1k 処理した後から、さらに `128' 進めます。
208 | .br
209 | \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
210 | .PP
211 | ファイル位置 0x100 (=1024\-768) から 16 進ダンプする。
212 | .br
213 | \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
214 | .PP
215 | このような使い方はあまりしませんし、`+' を使うこともほとんどないでしょう。
216 | \-s を使うときはいつでも、strace(1) や truss(1) を使って、xxd の働きをチェックすることをお勧めします。
217 | .SH 例
218 | .PP
219 | .br
220 | .BR ファイル
221 | の最初の三行 (16 進数で 0x30 バイト) 以降を出力する。
222 | .br
223 | \fI% xxd \-s 0x30 file\fR
224 | .PP
225 | .br
226 | .BR ファイル
227 | の最後から三行 (16 進数で 0x30 バイト) を出力する。
228 | .br
229 | \fI% xxd \-s \-0x30 file\fR
230 | .PP
231 | 注意: 以下の例の結果は 2024 年 5 月時点の xxd.1 マニュアルページに基づいています。
232 | .PP
233 | .br
234 | 120 バイトを、平文 16 進ダンプ形式で一行に 20 オクテットずつ出力する。
235 | .br
236 | \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
237 | .br
238 | 2e544820585844203120224d6179203230323422
239 | .br
240 | 20224d616e75616c207061676520666f72207878
241 | .br
242 | 64220a2e5c220a2e5c222032317374204d617920
243 | .br
244 | 313939360a2e5c22204d616e2070616765206175
245 | .br
246 | 74686f723a0a2e5c2220202020546f6e79204e75
247 | .br
248 | 67656e74203c746f6e79407363746e7567656e2e
249 | .br
250 |
251 | .br
252 | この man ページの先頭から 120 バイトを一行に 12 オクテットずつ 16 進ダンプする。
253 | .br
254 | \fI% xxd \-l 120 \-c 12 xxd.1\fR
255 | .br
256 | 00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
257 | .br
258 | 0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
259 | .br
260 | 00000018: 6e75 616c 2070 6167 6520 666f nual page fo
261 | .br
262 | 00000024: 7220 7878 6422 0a2e 5c22 0a2e r xxd"..\\"..
263 | .br
264 | 00000030: 5c22 2032 3173 7420 4d61 7920 \\" 21st May
265 | .br
266 | 0000003c: 3139 3936 0a2e 5c22 204d 616e 1996..\\" Man
267 | .br
268 | 00000048: 2070 6167 6520 6175 7468 6f72 page author
269 | .br
270 | 00000054: 3a0a 2e5c 2220 2020 2054 6f6e :..\\" Ton
271 | .br
272 | 00000060: 7920 4e75 6765 6e74 203c 746f y Nugent output_file\fR
290 | .br
291 |
292 | .br
293 | xxd.1 の日付を修正する。
294 | .br
295 | \fI% echo "0000034: 3574 68" | xxd \-r \- xxd.1\fR
296 | .br
297 | \fI% xxd \-s 0x33 \-l 13 \-c 13 xxd.1\fR
298 | .br
299 | 00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
300 | .PP
301 | .br
302 | 中身がすべて 0x00 の 65537 バイトのファイルを作成する。
303 | ただし、最後のバイトだけは 'A' (hex 0x41)。
304 | .br
305 | \fI% echo "010000: 41" | xxd \-r > file\fR
306 | .PP
307 | .br
308 | 作成したファイルをオートスキップを使って 16 進ダンプする。
309 | .br
310 | \fI% xxd \-a \-c 12 file\fR
311 | .br
312 | 00000000: 0000 0000 0000 0000 0000 0000 ............
313 | .br
314 | *
315 | .br
316 | 0000fffc: 0000 0000 41 ....A
317 | .PP
318 | 一文字の 'A' からなる 1 バイトのファイルを作成する。
319 | '\-r \-s' の後に指定した数値がファイル中の行番号に加算され、結果、余計なバイトが飛ばされる。
320 | .br
321 | \fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
322 | .PP
323 | .B vim(1)
324 | の中から xxd をフィルタとして実行し、
325 | マークされた `a' から `z' までの領域を 16 進ダンプする。
326 | .br
327 | \fI:'a,'z!xxd\fR
328 | .PP
329 | .B vim(1)
330 | の中から xxd をフィルタとして実行し、
331 | マークされた `a' から `z' までの領域をバイナリに戻す。
332 | .br
333 | \fI:'a,'z!xxd \-r\fR
334 | .PP
335 | .B vim(1)
336 | の中から xxd をフィルタとして実行し、16 進ダンプされた行を元に戻す。
337 | 戻したい行にカーソルを移動して:
338 | .br
339 | \fI!!xxd \-r\fR
340 | .PP
341 | シリアル行から一文字読み込む
342 | .br
343 | \fI% xxd \-c1 < /dev/term/b &\fR
344 | .br
345 | \fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
346 | .br
347 | \fI% echo \-n foo > /dev/term/b\fR
348 | .PP
349 | .SH 返り値
350 | 以下のエラー値が返ります:
351 | .TP
352 | 0
353 | エラーなし。
354 | .TP
355 | \-1
356 | 操作がサポートされていない
357 | \%(\c
358 | .I \%xxd \-r \-i
359 | はまだ不可です)。
360 | .TP
361 | 1
362 | 引数の解釈に関するエラー。
363 | .TP
364 | 2
365 | 入力ファイルに関する問題。
366 | .TP
367 | 3
368 | 出力ファイルに関する問題。
369 | .TP
370 | 4,5
371 | 指定された位置へシークできなかった。
372 | .SH 関連項目
373 | uuencode(1), uudecode(1), patch(1)
374 | .br
375 | .SH 警告
376 | この奇妙なツールは作者が使いやすいように作られています。
377 | 自己責任で使ってください。ファイルをコピーし、それを調べ、ウィザードたれ。
378 | .br
379 | .SH バージョン
380 | このマニュアルは xxd バージョン 1.7 (2024-05) について説明しています。
381 | .SH 著者
382 | .br
383 | (c) 1990-1997 by Juergen Weigert
384 | .br
385 |
386 | .LP
387 | 私の功績として自由に配布してください。
388 | .br
389 | 儲かったら教えてください。
390 | .br
391 | 損しても知りません。
392 | .PP
393 | マニュアルは Tony Nugent
394 | .br
395 |
396 | .br
397 | によって書かれ、
398 | Bram Moolenaar が少し変更を加え、
399 | Juergen Weigert が編集しました。
400 | .PP
401 |
--------------------------------------------------------------------------------
/runtime/doc/xxd.1:
--------------------------------------------------------------------------------
1 | .TH XXD 1 "May 2024" "Manual page for xxd"
2 | .\"
3 | .\" 21st May 1996
4 | .\" Man page author:
5 | .\" Tony Nugent
6 | .\" Changes by Bram Moolenaar
7 | .SH NAME
8 | .I xxd
9 | \- make a hex dump or do the reverse.
10 | .SH SYNOPSIS
11 | .B xxd
12 | \-h[elp]
13 | .br
14 | .B xxd
15 | [options] [infile [outfile]]
16 | .br
17 | .B xxd
18 | \-r[evert] [options] [infile [outfile]]
19 | .SH DESCRIPTION
20 | .I xxd
21 | creates a hex dump of a given file or standard input.
22 | It can also convert a hex dump back to its original binary form.
23 | Like
24 | .BR uuencode (1)
25 | and
26 | .BR uudecode (1)
27 | it allows the transmission of binary data in a `mail-safe' ASCII representation,
28 | but has the advantage of decoding to standard output.
29 | Moreover, it can be used to perform binary file patching.
30 | .SH OPTIONS
31 | If no
32 | .I infile
33 | is given, standard input is read.
34 | If
35 | .I infile
36 | is specified as a
37 | .RB \` \- '
38 | character, then input is taken from standard input.
39 | If no
40 | .I outfile
41 | is given (or a
42 | .RB \` \- '
43 | character is in its place), results are sent to standard output.
44 | .PP
45 | Note that a "lazy" parser is used which does not check for more than the first
46 | option letter, unless the option is followed by a parameter.
47 | Spaces between a single option letter and its parameter are optional.
48 | Parameters to options can be specified in decimal, hexadecimal or octal
49 | notation.
50 | Thus
51 | .BR \-c8 ,
52 | .BR "\-c 8" ,
53 | .B \-c 010
54 | and
55 | .B \-cols 8
56 | are all equivalent.
57 | .PP
58 | .TP
59 | .IR \-a " | " \-autoskip
60 | Toggle autoskip: A single '*' replaces NUL-lines. Default off.
61 | .TP
62 | .IR \-b " | " \-bits
63 | Switch to bits (binary digits) dump, rather than hex dump.
64 | This option writes octets as eight digits "1"s and "0"s instead of a normal
65 | hexadecimal dump. Each line is preceded by a line number in hexadecimal and
66 | followed by an ASCII (or EBCDIC) representation. The command line switches
67 | \-p, \-i do not work with this mode.
68 | .TP
69 | .IR "\-c cols " | " \-cols cols"
70 | Format
71 | .RI < cols >
72 | octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
73 | No maximum for \-ps. With \-ps, 0 results in one long line of output.
74 | .TP
75 | .IR \-C " | " \-capitalize
76 | Capitalize variable names in C include file style, when using \-i.
77 | .TP
78 | .I \-d
79 | show offset in decimal instead of hex.
80 | .TP
81 | .IR \-E " | " \-EBCDIC
82 | Change the character encoding in the righthand column from ASCII to EBCDIC.
83 | This does not change the hexadecimal representation. The option is
84 | meaningless in combinations with \-r, \-p or \-i.
85 | .TP
86 | .IR \-e
87 | Switch to little-endian hex dump.
88 | This option treats byte groups as words in little-endian byte order.
89 | The default grouping of 4 bytes may be changed using
90 | .RI "" \-g .
91 | This option only applies to the hex dump, leaving the ASCII (or EBCDIC)
92 | representation unchanged.
93 | The command line switches
94 | \-r, \-p, \-i do not work with this mode.
95 | .TP
96 | .IR "\-g bytes " | " \-groupsize bytes"
97 | Separate the output of every
98 | .RI < bytes >
99 | bytes (two hex characters or eight bit digits each) by a whitespace.
100 | Specify
101 | .I \-g 0
102 | to suppress grouping.
103 | .RI < Bytes "> defaults to " 2
104 | in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
105 | Grouping does not apply to PostScript or include style.
106 | .TP
107 | .IR \-h " | " \-help
108 | Print a summary of available commands and exit. No hex dumping is performed.
109 | .TP
110 | .IR \-i " | " \-include
111 | Output in C include file style. A complete static array definition is written
112 | (named after the input file), unless xxd reads from stdin.
113 | .TP
114 | .IR "\-l len " | " \-len len"
115 | Stop after writing
116 | .RI < len >
117 | octets.
118 | .TP
119 | .I "\-n name " | " \-name name"
120 | Override the variable name output when \-i is used. The array is named
121 | \fIname\fP and the length is named \fIname\fP_len.
122 | .TP
123 | .I \-o offset
124 | Add
125 | .RI < offset >
126 | to the displayed file position.
127 | .TP
128 | .IR \-p " | " \-ps " | " \-postscript " | " \-plain
129 | Output in PostScript continuous hex dump style. Also known as plain hex dump
130 | style.
131 | .TP
132 | .IR \-r " | " \-revert
133 | Reverse operation: convert (or patch) hex dump into binary.
134 | If not writing to stdout, xxd writes into its output file without truncating
135 | it. Use the combination
136 | .I \-r \-p
137 | to read plain hexadecimal dumps without line number information and without a
138 | particular column layout. Additional whitespace and line breaks are allowed
139 | anywhere. Use the combination
140 | .I \-r \-b
141 | to read a bits dump instead of a hex dump.
142 | .TP
143 | .IR \-R " " when
144 | In the output the hex-value and the value are both colored with the same color
145 | depending on the hex-value. Mostly helping to differentiate printable and
146 | non-printable characters.
147 | .I \fIwhen\fP
148 | is
149 | .BR never ", " always ", or " auto " (default: auto).
150 | When the
151 | .BR $NO_COLOR
152 | environment variable is set, colorization will be disabled.
153 | .TP
154 | .I \-seek offset
155 | When used after
156 | .IR \-r :
157 | revert with
158 | .RI < offset >
159 | added to file positions found in hex dump.
160 | .TP
161 | .I \-s [+][\-]seek
162 | Start at
163 | .RI < seek >
164 | bytes abs. (or rel.) infile offset.
165 | \fI+ \fRindicates that the seek is relative to the current stdin file position
166 | (meaningless when not reading from stdin). \fI\- \fRindicates that the seek
167 | should be that many characters from the end of the input (or if combined with
168 | \fI+\fR: before the current stdin file position).
169 | Without \-s option, xxd starts at the current file position.
170 | .TP
171 | .I \-u
172 | Use upper-case hex letters. Default is lower-case.
173 | .TP
174 | .IR \-v " | " \-version
175 | Show version string.
176 | .SH CAVEATS
177 | .PP
178 | .I xxd \-r
179 | has some built-in magic while evaluating line number information.
180 | If the output file is seekable, then the line numbers at the start of each
181 | hex dump line may be out of order, lines may be missing, or overlapping. In
182 | these cases xxd will lseek(2) to the next position. If the output file is not
183 | seekable, only gaps are allowed, which will be filled by null-bytes.
184 | .PP
185 | .I xxd \-r
186 | never generates parse errors. Garbage is silently skipped.
187 | .PP
188 | When editing hex dumps, please note that
189 | .I xxd \-r
190 | skips everything on the input line after reading enough columns of hexadecimal
191 | data (see option \-c). This also means that changes to the printable ASCII (or
192 | EBCDIC) columns are always ignored. Reverting a plain (or PostScript) style
193 | hex dump with xxd \-r \-p does not depend on the correct number of columns.
194 | Here, anything that looks like a pair of hex digits is interpreted.
195 | .PP
196 | Note the difference between
197 | .br
198 | \fI% xxd \-i file\fR
199 | .br
200 | and
201 | .br
202 | \fI% xxd \-i < file\fR
203 | .PP
204 | .I xxd \-s +seek
205 | may be different from
206 | .IR "xxd \-s seek" ,
207 | as lseek(2) is used to "rewind" input. A '+'
208 | makes a difference if the input source is stdin, and if stdin's file position
209 | is not at the start of the file by the time xxd is started and given its input.
210 | The following examples may help to clarify (or further confuse!):
211 | .PP
212 | Rewind stdin before reading; needed because the `cat' has already read to the
213 | end of stdin.
214 | .br
215 | \fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
216 | .PP
217 | Hex dump from file position 0x480 (=1024+128) onwards.
218 | The `+' sign means "relative to the current position", thus the `128' adds to
219 | the 1k where dd left off.
220 | .br
221 | \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
222 | .PP
223 | Hex dump from file position 0x100 (=1024\-768) onwards.
224 | .br
225 | \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
226 | .PP
227 | However, this is a rare situation and the use of `+' is rarely needed.
228 | The author prefers to monitor the effect of xxd with strace(1) or truss(1),
229 | whenever \-s is used.
230 | .SH EXAMPLES
231 | .PP
232 | .br
233 | Print everything but the first three lines (hex 0x30 bytes) of
234 | .BR file .
235 | .br
236 | \fI% xxd \-s 0x30 file\fR
237 | .PP
238 | .br
239 | Print 3 lines (hex 0x30 bytes) from the end of
240 | .BR file .
241 | .br
242 | \fI% xxd \-s \-0x30 file\fR
243 | .PP
244 | Note: The results of the examples below are relevant to the xxd.1 man page as of
245 | May 2024
246 | .PP
247 | .br
248 | Print 120 bytes as a continuous hex dump with 20 octets per line.
249 | .br
250 | \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
251 | .br
252 | 2e544820585844203120224d6179203230323422
253 | .br
254 | 20224d616e75616c207061676520666f72207878
255 | .br
256 | 64220a2e5c220a2e5c222032317374204d617920
257 | .br
258 | 313939360a2e5c22204d616e2070616765206175
259 | .br
260 | 74686f723a0a2e5c2220202020546f6e79204e75
261 | .br
262 | 67656e74203c746f6e79407363746e7567656e2e
263 | .br
264 |
265 | .br
266 | Hex dump the first 120 bytes of this man page with 12 octets per line.
267 | .br
268 | \fI% xxd \-l 120 \-c 12 xxd.1\fR
269 | .br
270 | 00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
271 | .br
272 | 0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
273 | .br
274 | 00000018: 6e75 616c 2070 6167 6520 666f nual page fo
275 | .br
276 | 00000024: 7220 7878 6422 0a2e 5c22 0a2e r xxd"..\\"..
277 | .br
278 | 00000030: 5c22 2032 3173 7420 4d61 7920 \\" 21st May
279 | .br
280 | 0000003c: 3139 3936 0a2e 5c22 204d 616e 1996..\\" Man
281 | .br
282 | 00000048: 2070 6167 6520 6175 7468 6f72 page author
283 | .br
284 | 00000054: 3a0a 2e5c 2220 2020 2054 6f6e :..\\" Ton
285 | .br
286 | 00000060: 7920 4e75 6765 6e74 203c 746f y Nugent output_file\fR
305 | .br
306 |
307 | .br
308 | Patch the date in the file xxd.1
309 | .br
310 | \fI% echo "0000034: 3574 68" | xxd \-r \- xxd.1\fR
311 | .br
312 | \fI% xxd \-s 0x33 \-l 13 \-c 13 xxd.1\fR
313 | .br
314 | 00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
315 | .PP
316 | .br
317 | Create a 65537 byte file with all bytes 0x00,
318 | except for the last one which is 'A' (hex 0x41).
319 | .br
320 | \fI% echo "010000: 41" | xxd \-r > file\fR
321 | .PP
322 | .br
323 | Hex dump this file with autoskip.
324 | .br
325 | \fI% xxd \-a \-c 12 file\fR
326 | .br
327 | 00000000: 0000 0000 0000 0000 0000 0000 ............
328 | .br
329 | *
330 | .br
331 | 0000fffc: 0000 0000 41 ....A
332 | .PP
333 | Create a 1 byte file containing a single 'A' character.
334 | The number after '\-r \-s' adds to the line numbers found in the file;
335 | in effect, the leading bytes are suppressed.
336 | .br
337 | \fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
338 | .PP
339 | Use xxd as a filter within an editor such as
340 | .B vim(1)
341 | to hex dump a region marked between `a' and `z'.
342 | .br
343 | \fI:'a,'z!xxd\fR
344 | .PP
345 | Use xxd as a filter within an editor such as
346 | .B vim(1)
347 | to recover a binary hex dump marked between `a' and `z'.
348 | .br
349 | \fI:'a,'z!xxd \-r\fR
350 | .PP
351 | Use xxd as a filter within an editor such as
352 | .B vim(1)
353 | to recover one line of a hex dump. Move the cursor over the line and type:
354 | .br
355 | \fI!!xxd \-r\fR
356 | .PP
357 | Read single characters from a serial line
358 | .br
359 | \fI% xxd \-c1 < /dev/term/b &\fR
360 | .br
361 | \fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
362 | .br
363 | \fI% echo \-n foo > /dev/term/b\fR
364 | .PP
365 | .SH "RETURN VALUES"
366 | The following error values are returned:
367 | .TP
368 | 0
369 | no errors encountered.
370 | .TP
371 | \-1
372 | operation not supported
373 | \%(\c
374 | .I \%xxd \-r \-i
375 | still impossible).
376 | .TP
377 | 1
378 | error while parsing options.
379 | .TP
380 | 2
381 | problems with input file.
382 | .TP
383 | 3
384 | problems with output file.
385 | .TP
386 | 4,5
387 | desired seek position is unreachable.
388 | .SH "SEE ALSO"
389 | uuencode(1), uudecode(1), patch(1)
390 | .br
391 | .SH WARNINGS
392 | The tool's weirdness matches its creator's brain.
393 | Use entirely at your own risk. Copy files. Trace it. Become a wizard.
394 | .br
395 | .SH VERSION
396 | This manual page documents xxd version 1.7 from 2024-05.
397 | .SH AUTHOR
398 | .br
399 | (c) 1990-1997 by Juergen Weigert
400 | .br
401 |
402 | .LP
403 | Distribute freely and credit me,
404 | .br
405 | make money and share with me,
406 | .br
407 | lose money and don't ask me.
408 | .PP
409 | Manual page started by Tony Nugent
410 | .br
411 |
412 | .br
413 | Small changes by Bram Moolenaar.
414 | Edited by Juergen Weigert.
415 | .PP
416 |
--------------------------------------------------------------------------------
/runtime/lang/.gitignore:
--------------------------------------------------------------------------------
1 | /menu_ja_jp.euc-jp.vim
2 | /menu_japanese_japan.932.vim
3 |
--------------------------------------------------------------------------------
/runtime/lang/Makefile:
--------------------------------------------------------------------------------
1 | MASTER_MENU = menu_ja_jp.utf-8.vim
2 |
3 | SED = LANG=C sed
4 |
5 | test: update
6 |
7 | update: menu_ja_jp.euc-jp.vim menu_japanese_japan.932.vim
8 |
9 | menu_ja_jp.euc-jp.vim: $(MASTER_MENU)
10 | iconv -f UTF-8 -t EUC-JP $< | \
11 | $(SED) -e 's/scriptencoding utf-8/scriptencoding euc-jp/' \
12 | -e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
13 | -e 's/\(" Menu Translations:.*\)(.*)/\1(EUC-JP)/' \
14 | > $@
15 |
16 | menu_japanese_japan.932.vim: $(MASTER_MENU)
17 | iconv -f UTF-8 -t CP932 $< | \
18 | $(SED) -e 's/scriptencoding utf-8/scriptencoding cp932/' \
19 | -e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
20 | -e 's/\(" Menu Translations:.*\)(.*)/\1(CP932)/' \
21 | > $@
22 |
23 | force: touch
24 | @$(MAKE) update
25 |
26 | touch: $(MASTER_MENU)
27 | touch $<
28 |
29 | clean:
30 | rm -f menu_ja_jp.euc-jp.vim menu_japanese_japan.932.vim
31 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja.cp932.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for Windows)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | source :p:h/menu_japanese_japan.932.vim
9 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja.euc-jp.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for UNIX)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | " ja is the same as ja_jp. Source the other one from here.
9 | source :p:h/menu_ja_jp.euc-jp.vim
10 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja.eucjp.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for UNIX)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | " eucjp is the same as euc-jp. Source the other one from here.
9 | source :p:h/menu_ja_jp.euc-jp.vim
10 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja.ujis.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for UNIX)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | " ujis is the same as euc-jp. Source the other one from here.
9 | source :p:h/menu_ja_jp.euc-jp.vim
10 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja.utf-8.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese
2 |
3 | " ja is the same as ja_jp. Source the other one from here.
4 | source :p:h/menu_ja_jp.utf-8.vim
5 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja_jp.cp932.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for Windows)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | source :p:h/menu_japanese_japan.932.vim
9 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja_jp.eucjp.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for UNIX)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | " eucjp is the same as euc-jp. Source the other one from here.
9 | source :p:h/menu_ja_jp.euc-jp.vim
10 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja_jp.ujis.vim:
--------------------------------------------------------------------------------
1 | " Menu Translations: Japanese (for UNIX)
2 | " Translated By: MURAOKA Taro
3 | " Last Change: 15-Jun-2012.
4 | "
5 | " Copyright (C) 2004,12 MURAOKA Taro
6 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7 |
8 | " ujis is the same as euc-jp. Source the other one from here.
9 | source :p:h/menu_ja_jp.euc-jp.vim
10 |
--------------------------------------------------------------------------------
/runtime/lang/menu_ja_jp.utf-8.vim:
--------------------------------------------------------------------------------
1 | " vi:set ts=8 sts=8 sw=8 tw=0:
2 | "
3 | " Menu Translations: Japanese (UTF-8)
4 | " Last Translator: MURAOKA Taro
5 | " Last Change: 18-Dec-2023.
6 | "
7 | " Copyright (C) 2001-2023 MURAOKA Taro ,
8 | " vim-jp
9 | "
10 | " THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
11 | "
12 | " Original translations
13 |
14 | " Quit when menu translations have already been done.
15 | if exists("did_menu_trans")
16 | finish
17 | endif
18 | let did_menu_trans = 1
19 | let s:keepcpo= &cpo
20 | set cpo&vim
21 |
22 | scriptencoding utf-8
23 |
24 | " Help menu
25 | menutrans &Help ヘルプ(&H)
26 | menutrans &Overview 概略(&O)
27 | menutrans &User\ Manual ユーザーマニュアル(&U)
28 | menutrans &How-To\ links &How-toリンク
29 | menutrans &Credits クレジット(&C)
30 | menutrans Co&pying 著作権情報(&P)
31 | menutrans &Sponsor/Register スポンサー/登録(&S)
32 | menutrans O&rphans 孤児(&R)
33 | menutrans &Version バージョン情報(&V)
34 | menutrans &About Vimについて(&A)
35 |
36 | let g:menutrans_help_dialog = "ヘルプを検索したいコマンドもしくは単語を入力してください:\n\n挿入モードのコマンドには i_ を先頭に付加します. (例: i_CTRL-X)\nコマンドライン編集コマンドには c_ を先頭に付加します. (例: c_)\nオプションの名前には ' を付加します. (例: 'shiftwidth')"
37 |
38 | " File menu
39 | menutrans &File ファイル(&F)
40 | menutrans &Open\.\.\.:e 開く(&O)\.\.\.:e
41 | menutrans Sp&lit-Open\.\.\.:sp 分割して開く(&L)\.\.\.:sp
42 | menutrans Open\ &Tab\.\.\.:tabnew タブページで開く(&T):tabnew
43 | menutrans &New:enew 新規作成(&N):enew
44 | menutrans &Close:close 閉じる(&C):close
45 | menutrans &Save:w 保存(&S):w
46 | menutrans Save\ &As\.\.\.:sav 名前を付けて保存(&A)\.\.\.:sav
47 | menutrans Split\ &Diff\ with\.\.\. 差分表示(&D)\.\.\.
48 | menutrans Split\ Patched\ &By\.\.\. パッチ結果を表示(&B)\.\.\.
49 | menutrans &Print 印刷(&P)
50 | menutrans Sa&ve-Exit:wqa 保存して終了(&V):wqa
51 | menutrans E&xit:qa 終了(&X):qa
52 |
53 | " Edit menu
54 | menutrans &Edit 編集(&E)
55 | menutrans &Undou 取り消す(&U)u
56 | menutrans &Redo^R もう一度やる(&R)^R
57 | menutrans Rep&eat\. 繰り返す(&E)\.
58 | menutrans Cu&t"+x 切り取り(&T)"+x
59 | menutrans &Copy"+y コピー(&C)"+y
60 | menutrans &Paste"+gP 貼り付け(&P)"+gP
61 | menutrans Put\ &Before[p 前に貼る(&B)[p
62 | menutrans Put\ &After]p 後に貼る(&A)]p
63 | menutrans &Deletex 消す(&D)x
64 | menutrans &Select\ AllggVG 全て選択(&S)ggVG
65 | menutrans &Find\.\.\. 検索(&F)\.\.\.
66 | menutrans &Find/ 検索(&F)/
67 | menutrans Find\ and\ Rep&lace\.\.\. 置換(&L)\.\.\.
68 | menutrans Find\ and\ Rep&lace:%s 置換(&L):%s
69 | menutrans Find\ and\ Rep&lace:s 置換(&L):s
70 | "menutrans Options\.\.\. オプション(&O)\.\.\.
71 | menutrans Settings\ &Window 設定ウィンドウ(&W)
72 | menutrans Startup\ &Settings 起動時の設定(&S)
73 |
74 | " Edit/Global Settings
75 | menutrans &Global\ Settings 全体設定(&G)
76 | menutrans Toggle\ Pattern\ &Highlight:set\ hls!
77 | \ パターン強調切替(&H):set\ hls!
78 | menutrans Toggle\ &Ignoring\ Case:set\ ic!
79 | \ 大小文字区別切替(&I):set\ ic!
80 | menutrans Toggle\ &Showing\ Matched\ Pairs:set\ sm!
81 | \ マッチ表示切替(&S):set\ sm!
82 | menutrans &Context\ lines カーソル周辺行数(&C)
83 | menutrans &Virtual\ Edit 仮想編集(&V)
84 | menutrans Never 無効
85 | menutrans Block\ Selection ブロック選択時
86 | menutrans Insert\ mode 挿入モード時
87 | menutrans Block\ and\ Insert ブロック/挿入モード時
88 | menutrans Always 常時
89 | menutrans Toggle\ Insert\ &Mode:set\ im!
90 | \ 挿入(初心者)モード切替(&M):set\ im!
91 | menutrans Toggle\ Vi\ C&ompatibility:set\ cp!
92 | \ Vi互換モード切替(&O):set\ cp!
93 | menutrans Search\ &Path\.\.\. 検索パス(&P)\.\.\.
94 | menutrans Ta&g\ Files\.\.\. タグファイル(&G)\.\.\.
95 | "
96 | " GUI options
97 | menutrans Toggle\ &Toolbar ツールバー表示切替(&T)
98 | menutrans Toggle\ &Bottom\ Scrollbar スクロールバー(下)表示切替(&B)
99 | menutrans Toggle\ &Left\ Scrollbar スクロールバー(左)表示切替(&L)
100 | menutrans Toggle\ &Right\ Scrollbar スクロールバー(右)表示切替(&R)
101 |
102 | let g:menutrans_path_dialog = "ファイルの検索パスを入力してください:\nディレクトリ名はカンマ ( , ) で区切ってください."
103 | let g:menutrans_tags_dialog = "タグファイルの名前を入力してください:\n名前はカンマ ( , ) で区切ってください."
104 |
105 | " Edit/File Settings
106 |
107 | " Boolean options
108 | menutrans F&ile\ Settings ファイル設定(&I)
109 | menutrans Toggle\ Line\ &Numbering:set\ nu!
110 | \ 行番号表示切替(&N):set\ nu!
111 | menutrans Toggle\ Relati&ve\ Line\ Numbering:set\ rnu!
112 | \ 相対行番号表示切替(&V):set\ rnu!
113 | menutrans Toggle\ &List\ Mode:set\ list!
114 | \ リストモード切替(&L):set\ list!
115 | menutrans Toggle\ Line\ &Wrapping:set\ wrap!
116 | \ 行折返し切替(&W):set\ wrap!
117 | menutrans Toggle\ W&rapping\ at\ word:set\ lbr!
118 | \ 単語折返し切替(&R):set\ lbr!
119 | menutrans Toggle\ Tab\ &Expanding:set\ et!
120 | \ タブ展開切替(&E):set\ et!
121 | menutrans Toggle\ &Auto\ Indenting:set\ ai!
122 | \ 自動字下げ切替(&A):set\ ai!
123 | menutrans Toggle\ &C-Style\ Indenting:set\ cin!
124 | \ C言語字下げ切替(&C):set\ cin!
125 |
126 | " other options
127 | menutrans &Shiftwidth シフト幅(&S)
128 | menutrans Soft\ &Tabstop ソフトウェアタブ幅(&T)
129 | menutrans Te&xt\ Width\.\.\. テキスト幅(&X)\.\.\.
130 | menutrans &File\ Format\.\.\. 改行記号選択(&F)\.\.\.
131 |
132 | let g:menutrans_textwidth_dialog = "テキストの幅('textwidth')を設定してください (0で整形を無効化):"
133 | let g:menutrans_fileformat_dialog = "ファイル出力の際の改行記号の形式を選んでください."
134 | let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\nキャンセル(&C)"
135 |
136 | menutrans Show\ C&olor\ Schemes\ in\ Menu 色テーマをメニューに表示(&O)
137 | menutrans C&olor\ Scheme 色テーマ選択(&O)
138 | menutrans Show\ &Keymaps\ in\ Menu キーマップをメニューに表示(&K)
139 | menutrans &Keymap キーマップ(&K)
140 | menutrans None なし
141 |
142 | " Programming menu
143 | menutrans &Tools ツール(&T)
144 | menutrans &Jump\ to\ this\ tagg^] タグジャンプ(&J)g^]
145 | menutrans Jump\ &back^T 戻る(&B)^T
146 | menutrans Build\ &Tags\ File タグファイル作成(&T)
147 | menutrans &Make:make ビルド(&M):make
148 | menutrans &List\ Errors:cl エラーリスト(&L):cl
149 | menutrans L&ist\ Messages:cl! メッセージリスト(&I):cl!
150 | menutrans &Next\ Error:cn 次のエラーへ(&N):cn
151 | menutrans &Previous\ Error:cp 前のエラーへ(&P):cp
152 | menutrans &Older\ List:cold 古いリスト(&O):cold
153 | menutrans N&ewer\ List:cnew 新しいリスト(&E):cnew
154 | menutrans Error\ &Window エラーウィンドウ(&W)
155 | menutrans &Update:cwin 更新(&U):cwin
156 | menutrans &Open:copen 開く(&O):copen
157 | menutrans &Close:cclose 閉じる(&C):cclose
158 | menutrans &Convert\ to\ HEX:%!xxd HEXへ変換(&C):%!xxd
159 | menutrans Conve&rt\ back:%!xxd\ -r HEXから逆変換(&R)%!xxd\ -r
160 | menutrans Show\ Compiler\ Se&ttings\ in\ Menu コンパイラ設定をメニューに表示(&T)
161 | menutrans Se&t\ Compiler コンパイラ設定(&T)
162 |
163 | " Tools.Spelling Menu
164 | menutrans &Spelling スペリング(&S)
165 | menutrans &Spell\ Check\ On スペルチェック有効(&S)
166 | menutrans Spell\ Check\ &Off スペルチェック無効(&O)
167 | menutrans To\ &Next\ error]s 次のエラー(&N)]s
168 | menutrans To\ &Previous\ error[s 前のエラー(&P)[s
169 | menutrans Suggest\ &Correctionsz= 修正候補(&C)z=
170 | menutrans &Repeat\ correction:spellrepall 修正を繰り返す(&R):spellrepall
171 | menutrans Set\ language\ to\ "en" 言語を\ "en"\ に設定する
172 | menutrans Set\ language\ to\ "en_au" 言語を\ "en_au"\ に設定する
173 | menutrans Set\ language\ to\ "en_ca" 言語を\ "en_ca"\ に設定する
174 | menutrans Set\ language\ to\ "en_gb" 言語を\ "en_gb"\ に設定する
175 | menutrans Set\ language\ to\ "en_nz" 言語を\ "en_nz"\ に設定する
176 | menutrans Set\ language\ to\ "en_us" 言語を\ "en_us"\ に設定する
177 | menutrans &Find\ More\ Languages 他の言語を検索する(&F)
178 |
179 | let g:menutrans_spell_change_ARG_to = '"%s"\ を変更'
180 | let g:menutrans_spell_add_ARG_to_word_list = '"%s"\ を単語リストに追加'
181 | let g:menutrans_spell_ignore_ARG = '"%s"\ を無視'
182 |
183 | " Tools.Fold Menu
184 | menutrans &Folding 折畳み(&F)
185 | " open close folds
186 | menutrans &Enable/Disable\ foldszi 有効/無効切替(&E)zi
187 | menutrans &View\ Cursor\ Linezv カーソル行を表示(&V)zv
188 | menutrans Vie&w\ Cursor\ Line\ onlyzMzx カーソル行だけを表示(&W)zMzx
189 | menutrans C&lose\ more\ foldszm 折畳みを閉じる(&L)zm
190 | menutrans &Close\ all\ foldszM 全折畳みを閉じる(&C)zM
191 | menutrans O&pen\ more\ foldszr 折畳みを開く(&P)zr
192 | menutrans &Open\ all\ foldszR 全折畳みを開く(&O)zR
193 | " fold method
194 | menutrans Fold\ Met&hod 折畳み方法(&H)
195 | menutrans M&anual 手動(&A)
196 | menutrans I&ndent インデント(&N)
197 | menutrans E&xpression 式評価(&X)
198 | menutrans S&yntax シンタックス(&Y)
199 | menutrans &Diff 差分(&D)
200 | menutrans Ma&rker マーカー(&R)
201 | " create and delete folds
202 | menutrans Create\ &Foldzf 折畳み作成(&F)zf
203 | menutrans &Delete\ Foldzd 折畳み削除(&D)zd
204 | menutrans Delete\ &All\ FoldszD 全折畳み削除(&A)zD
205 | " moving around in folds
206 | menutrans Fold\ col&umn\ width 折畳みカラム幅(&U)
207 |
208 | menutrans &Update 更新(&U)
209 | menutrans &Get\ Block ブロック抽出(&G)
210 | menutrans &Put\ Block ブロック適用(&P)
211 |
212 | " Names for buffer menu.
213 | menutrans &Buffers バッファ(&B)
214 | menutrans &Refresh\ menu メニュー再読込(&R)
215 | menutrans &Delete 削除(&D)
216 | menutrans &Alternate 裏へ切替(&A)
217 | menutrans &Next 次のバッファ(&N)
218 | menutrans &Previous 前のバッファ(&P)
219 | let g:menutrans_no_file = "[無名]"
220 |
221 | " Window menu
222 | menutrans &Window ウィンドウ(&W)
223 | menutrans &New^Wn 新規作成(&N)^Wn
224 | menutrans S&plit^Ws 分割(&P)^Ws
225 | menutrans Sp&lit\ To\ #^W^^ 裏バッファへ分割(&L)^W^^
226 | menutrans Split\ &Vertically^Wv 垂直分割(&V)^Wv
227 | menutrans Split\ File\ E&xplorer ファイルエクスプローラ(&X)
228 | menutrans &Close^Wc 閉じる(&C)^Wc
229 | menutrans Move\ &To 移動(&T)
230 | menutrans &Top^WK 上(&T)^WK
231 | menutrans &Bottom^WJ 下(&B)^WJ
232 | menutrans &Left\ side^WH 左(&L)^WH
233 | menutrans &Right\ side^WL 右(&R)^WL
234 | menutrans Close\ &Other(s)^Wo 他を閉じる(&O)^Wo
235 | menutrans Ne&xt^Ww 次へ(&X)^Ww
236 | menutrans P&revious^WW 前へ(&R)^WW
237 | menutrans &Equal\ Size^W= 同じ高さに(&E)^W=
238 | menutrans &Max\ Height^W_ 最大高に(&M)^W_
239 | menutrans M&in\ Height^W1_ 最小高に(&i)^W1_
240 | menutrans Max\ &Width^W\| 最大幅に(&W)^W\|
241 | menutrans Min\ Widt&h^W1\| 最小幅に(&H)^W1\|
242 | menutrans Rotate\ &Up^WR 上にローテーション(&U)^WR
243 | menutrans Rotate\ &Down^Wr 下にローテーション(&D)^Wr
244 | menutrans Select\ Fo&nt\.\.\. フォント設定(&N)\.\.\.
245 |
246 | " The popup menu
247 | menutrans &Undo 取り消す(&U)
248 | menutrans Cu&t 切り取り(&T)
249 | menutrans &Copy コピー(&C)
250 | menutrans &Paste 貼り付け(&P)
251 | menutrans &Delete 削除(&D)
252 | menutrans Select\ Blockwise 矩形ブロック選択
253 | menutrans Select\ &Word 単語選択(&W)
254 | menutrans Select\ &Sentence 文選択(&S)
255 | menutrans Select\ Pa&ragraph 段落選択(&R)
256 | menutrans Select\ &Line 行選択(&L)
257 | menutrans Select\ &Block ブロック選択(&B)
258 | menutrans Select\ &All すべて選択(&A)
259 |
260 | " The GUI toolbar (for Win32 or GTK)
261 | if has("toolbar")
262 | if exists("*Do_toolbar_tmenu")
263 | delfun Do_toolbar_tmenu
264 | endif
265 | fun Do_toolbar_tmenu()
266 | tmenu ToolBar.Open ファイルを開く
267 | tmenu ToolBar.Save 現在のファイルを保存
268 | tmenu ToolBar.SaveAll すべてのファイルを保存
269 | tmenu ToolBar.Print 印刷
270 | tmenu ToolBar.Undo 取り消し
271 | tmenu ToolBar.Redo もう一度やる
272 | tmenu ToolBar.Cut クリップボードへ切り取り
273 | tmenu ToolBar.Copy クリップボードへコピー
274 | tmenu ToolBar.Paste クリップボードから貼り付け
275 | tmenu ToolBar.Replace 検索 / 置換...
276 | tmenu ToolBar.FindNext 次を検索
277 | tmenu ToolBar.FindPrev 前を検索
278 | if 0 " disabled; These are in the Windows menu
279 | tmenu ToolBar.New 新規ウィンドウ作成
280 | tmenu ToolBar.WinSplit ウィンドウ分割
281 | tmenu ToolBar.WinMax ウィンドウ最大化
282 | tmenu ToolBar.WinMin ウィンドウ最小化
283 | tmenu ToolBar.WinClose ウィンドウを閉じる
284 | endif
285 | tmenu ToolBar.LoadSesn セッション読込
286 | tmenu ToolBar.SaveSesn セッション保存
287 | tmenu ToolBar.RunScript Vimスクリプト実行
288 | tmenu ToolBar.Make プロジェクトをMake
289 | tmenu ToolBar.Shell シェルを開く
290 | tmenu ToolBar.RunCtags tags作成
291 | tmenu ToolBar.TagJump タグジャンプ
292 | tmenu ToolBar.Help Vimヘルプ
293 | tmenu ToolBar.FindHelp Vimヘルプ検索
294 | endfun
295 | endif
296 |
297 | " Syntax menu
298 | menutrans &Syntax シンタックス(&S)
299 | menutrans &Show\ File\ Types\ in\ Menu 対応形式をメニューに表示(&S)
300 | menutrans Set\ '&syntax'\ only 'syntax'だけ設定(&S)
301 | menutrans Set\ '&filetype'\ too 'filetype'も設定(&F)
302 | menutrans &Off 無効化(&O)
303 | menutrans &Manual 手動設定(&M)
304 | menutrans A&utomatic 自動設定(&U)
305 | menutrans on/off\ for\ &This\ file
306 | \ オン/オフ切替(&T)
307 | menutrans Co&lor\ test カラーテスト(&L)
308 | menutrans &Highlight\ test ハイライトテスト(&H)
309 | menutrans &Convert\ to\ HTML HTMLへコンバート(&C)
310 |
311 | let &cpo = s:keepcpo
312 | unlet s:keepcpo
313 |
314 | " filler to avoid the line above being recognized as a modeline
315 | " filler
316 |
--------------------------------------------------------------------------------
/runtime/tutor/.gitignore:
--------------------------------------------------------------------------------
1 | /tutor.ja.sjis
2 | /tutor.ja.euc
3 |
--------------------------------------------------------------------------------
/runtime/tutor/Makefile:
--------------------------------------------------------------------------------
1 | MASTER_TUTOR = tutor.ja.utf-8
2 |
3 | test: update
4 |
5 | update: tutor.ja.sjis tutor.ja.euc
6 |
7 | tutor.ja.sjis: $(MASTER_TUTOR)
8 | iconv -f utf-8 -t cp932 < $< > $@
9 |
10 | tutor.ja.euc: $(MASTER_TUTOR)
11 | iconv -f utf-8 -t euc-jp < $< > $@
12 |
13 | force: touch
14 | @$(MAKE) update
15 |
16 | touch: $(MASTER_TUTOR)
17 | touch $<
18 |
19 | clean:
20 | rm -f tutor.ja.sjis tutor.ja.euc
21 |
--------------------------------------------------------------------------------
/runtime/tutor/tutor:
--------------------------------------------------------------------------------
1 | ===============================================================================
2 | = W e l c o m e t o t h e V I M T u t o r - Version 1.7 =
3 | ===============================================================================
4 |
5 | Vim is a very powerful editor that has many commands, too many to
6 | explain in a tutor such as this. This tutor is designed to describe
7 | enough of the commands that you will be able to easily use Vim as
8 | an all-purpose editor.
9 |
10 | The approximate time required to complete the tutor is 30 minutes,
11 | depending upon how much time is spent with experimentation.
12 |
13 | ATTENTION:
14 | The commands in the lessons will modify the text. Make a copy of this
15 | file to practice on (if you started "vimtutor" this is already a copy).
16 |
17 | It is important to remember that this tutor is set up to teach by
18 | use. That means that you need to execute the commands to learn them
19 | properly. If you only read the text, you will forget the commands!
20 |
21 | Now, make sure that your Caps-Lock key is NOT depressed and press
22 | the j key enough times to move the cursor so that lesson 1.1
23 | completely fills the screen.
24 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 | Lesson 1.1: MOVING THE CURSOR
26 |
27 |
28 | ** To move the cursor, press the h,j,k,l keys as indicated. **
29 | ^
30 | k Hint: The h key is at the left and moves left.
31 | < h l > The l key is at the right and moves right.
32 | j The j key looks like a down arrow.
33 | v
34 | 1. Move the cursor around the screen until you are comfortable.
35 |
36 | 2. Hold down the down key (j) until it repeats.
37 | Now you know how to move to the next lesson.
38 |
39 | 3. Using the down key, move to lesson 1.2.
40 |
41 | NOTE: If you are ever unsure about something you typed, press to place
42 | you in Normal mode. Then retype the command you wanted.
43 |
44 | NOTE: The cursor keys should also work. But using hjkl you will be able to
45 | move around much faster, once you get used to it. Really!
46 |
47 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 | Lesson 1.2: EXITING VIM
49 |
50 |
51 | !! NOTE: Before executing any of the steps below, read this entire lesson!!
52 |
53 | 1. Press the key (to make sure you are in Normal mode).
54 |
55 | 2. Type: :q! .
56 | This exits the editor, DISCARDING any changes you have made.
57 |
58 | 3. Get back here by executing the command that got you into this tutor. That
59 | might be: vimtutor
60 |
61 | 4. If you have these steps memorized and are confident, execute steps
62 | 1 through 3 to exit and re-enter the editor.
63 |
64 | NOTE: :q! discards any changes you made. In a few lessons you
65 | will learn how to save the changes to a file.
66 |
67 | 5. Move the cursor down to lesson 1.3.
68 |
69 |
70 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | Lesson 1.3: TEXT EDITING - DELETION
72 |
73 |
74 | ** Press x to delete the character under the cursor. **
75 |
76 | 1. Move the cursor to the line below marked --->.
77 |
78 | 2. To fix the errors, move the cursor until it is on top of the
79 | character to be deleted.
80 |
81 | 3. Press the x key to delete the unwanted character.
82 |
83 | 4. Repeat steps 2 through 4 until the sentence is correct.
84 |
85 | ---> The ccow jumpedd ovverr thhe mooon.
86 |
87 | 5. Now that the line is correct, go on to lesson 1.4.
88 |
89 | NOTE: As you go through this tutor, do not try to memorize, learn by usage.
90 |
91 |
92 |
93 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 | Lesson 1.4: TEXT EDITING - INSERTION
95 |
96 |
97 | ** Press i to insert text. **
98 |
99 | 1. Move the cursor to the first line below marked --->.
100 |
101 | 2. To make the first line the same as the second, move the cursor on top
102 | of the character BEFORE which the text is to be inserted.
103 |
104 | 3. Press i and type in the necessary additions.
105 |
106 | 4. As each error is fixed press to return to Normal mode.
107 | Repeat steps 2 through 4 to correct the sentence.
108 |
109 | ---> There is text misng this .
110 | ---> There is some text missing from this line.
111 |
112 | 5. When you are comfortable inserting text move to lesson 1.5.
113 |
114 |
115 |
116 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117 | Lesson 1.5: TEXT EDITING - APPENDING
118 |
119 |
120 | ** Press A to append text. **
121 |
122 | 1. Move the cursor to the first line below marked --->.
123 | It does not matter on what character the cursor is in that line.
124 |
125 | 2. Press A and type in the necessary additions.
126 |
127 | 3. As the text has been appended press to return to Normal mode.
128 |
129 | 4. Move the cursor to the second line marked ---> and repeat
130 | steps 2 and 3 to correct this sentence.
131 |
132 | ---> There is some text missing from th
133 | There is some text missing from this line.
134 | ---> There is also some text miss
135 | There is also some text missing here.
136 |
137 | 5. When you are comfortable appending text move to lesson 1.6.
138 |
139 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140 | Lesson 1.6: EDITING A FILE
141 |
142 | ** Use :wq to save a file and exit. **
143 |
144 | !! NOTE: Before executing any of the steps below, read this entire lesson!!
145 |
146 | 1. If you have access to another terminal, do the following there.
147 | Otherwise, exit this tutor as you did in lesson 1.2: :q!
148 |
149 | 2. At the shell prompt type this command: vim file.txt
150 | 'vim' is the command to start the Vim editor, 'file.txt' is the name of
151 | the file you wish to edit. Use the name of a file that you can change.
152 |
153 | 3. Insert and delete text as you learned in the previous lessons.
154 |
155 | 4. Save the file with changes and exit Vim with: :wq
156 |
157 | 5. If you have quit vimtutor in step 1 restart the vimtutor and move down to
158 | the following summary.
159 |
160 | 6. After reading the above steps and understanding them: do it.
161 |
162 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 | Lesson 1 SUMMARY
164 |
165 |
166 | 1. The cursor is moved using either the arrow keys or the hjkl keys.
167 | h (left) j (down) k (up) l (right)
168 |
169 | 2. To start Vim from the shell prompt type: vim FILENAME
170 |
171 | 3. To exit Vim type: :q! to trash all changes.
172 | OR type: :wq to save the changes.
173 |
174 | 4. To delete the character at the cursor type: x
175 |
176 | 5. To insert or append text type:
177 | i type inserted text insert before the cursor
178 | A type appended text append after the line
179 |
180 | NOTE: Pressing will place you in Normal mode or will cancel
181 | an unwanted and partially completed command.
182 |
183 | Now continue with lesson 2.
184 |
185 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186 | Lesson 2.1: DELETION COMMANDS
187 |
188 |
189 | ** Type dw to delete a word. **
190 |
191 | 1. Press to make sure you are in Normal mode.
192 |
193 | 2. Move the cursor to the line below marked --->.
194 |
195 | 3. Move the cursor to the beginning of a word that needs to be deleted.
196 |
197 | 4. Type dw to make the word disappear.
198 |
199 | NOTE: The letter d will appear on the last line of the screen as you type
200 | it. Vim is waiting for you to type w . If you see another character
201 | than d you typed something wrong; press and start over.
202 |
203 | ---> There are a some words fun that don't belong paper in this sentence.
204 |
205 | 5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 2.2.
206 |
207 |
208 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209 | Lesson 2.2: MORE DELETION COMMANDS
210 |
211 |
212 | ** Type d$ to delete to the end of the line. **
213 |
214 | 1. Press to make sure you are in Normal mode.
215 |
216 | 2. Move the cursor to the line below marked --->.
217 |
218 | 3. Move the cursor to the end of the correct line (AFTER the first . ).
219 |
220 | 4. Type d$ to delete to the end of the line.
221 |
222 | ---> Somebody typed the end of this line twice. end of this line twice.
223 |
224 |
225 | 5. Move on to lesson 2.3 to understand what is happening.
226 |
227 |
228 |
229 |
230 |
231 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232 | Lesson 2.3: ON OPERATORS AND MOTIONS
233 |
234 |
235 | Many commands that change text are made from an operator and a motion.
236 | The format for a delete command with the d delete operator is as follows:
237 |
238 | d motion
239 |
240 | Where:
241 | d - is the delete operator.
242 | motion - is what the operator will operate on (listed below).
243 |
244 | A short list of motions:
245 | w - until the start of the next word, EXCLUDING its first character.
246 | e - to the end of the current word, INCLUDING the last character.
247 | $ - to the end of the line, INCLUDING the last character.
248 |
249 | Thus typing de will delete from the cursor to the end of the word.
250 |
251 | NOTE: Pressing just the motion while in Normal mode without an operator will
252 | move the cursor as specified.
253 |
254 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
255 | Lesson 2.4: USING A COUNT FOR A MOTION
256 |
257 |
258 | ** Typing a number before a motion repeats it that many times. **
259 |
260 | 1. Move the cursor to the start of the line below marked --->.
261 |
262 | 2. Type 2w to move the cursor two words forward.
263 |
264 | 3. Type 3e to move the cursor to the end of the third word forward.
265 |
266 | 4. Type 0 (zero) to move to the start of the line.
267 |
268 | 5. Repeat steps 2 and 3 with different numbers.
269 |
270 | ---> This is just a line with words you can move around in.
271 |
272 | 6. Move on to lesson 2.5.
273 |
274 |
275 |
276 |
277 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278 | Lesson 2.5: USING A COUNT TO DELETE MORE
279 |
280 |
281 | ** Typing a number with an operator repeats it that many times. **
282 |
283 | In the combination of the delete operator and a motion mentioned above you
284 | insert a count before the motion to delete more:
285 | d number motion
286 |
287 | 1. Move the cursor to the first UPPER CASE word in the line marked --->.
288 |
289 | 2. Type d2w to delete the two UPPER CASE words.
290 |
291 | 3. Repeat steps 1 and 2 with a different count to delete the consecutive
292 | UPPER CASE words with one command.
293 |
294 | ---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
295 |
296 |
297 |
298 |
299 |
300 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301 | Lesson 2.6: OPERATING ON LINES
302 |
303 |
304 | ** Type dd to delete a whole line. **
305 |
306 | Due to the frequency of whole line deletion, the designers of Vi decided
307 | it would be easier to simply type two d's to delete a line.
308 |
309 | 1. Move the cursor to the second line in the phrase below.
310 | 2. Type dd to delete the line.
311 | 3. Now move to the fourth line.
312 | 4. Type 2dd to delete two lines.
313 |
314 | ---> 1) Roses are red,
315 | ---> 2) Mud is fun,
316 | ---> 3) Violets are blue,
317 | ---> 4) I have a car,
318 | ---> 5) Clocks tell time,
319 | ---> 6) Sugar is sweet
320 | ---> 7) And so are you.
321 |
322 | Doubling to operate on a line also works for operators mentioned below.
323 |
324 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325 | Lesson 2.7: THE UNDO COMMAND
326 |
327 |
328 | ** Press u to undo the last commands, U to fix a whole line. **
329 |
330 | 1. Move the cursor to the line below marked ---> and place it on the
331 | first error.
332 | 2. Type x to delete the first unwanted character.
333 | 3. Now type u to undo the last command executed.
334 | 4. This time fix all the errors on the line using the x command.
335 | 5. Now type a capital U to return the line to its original state.
336 | 6. Now type u a few times to undo the U and preceding commands.
337 | 7. Now type CTRL-R (keeping CTRL key pressed while hitting R) a few times
338 | to redo the commands (undo the undos).
339 |
340 | ---> Fiix the errors oon thhis line and reeplace them witth undo.
341 |
342 | 8. These are very useful commands. Now move on to the lesson 2 Summary.
343 |
344 |
345 |
346 |
347 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348 | Lesson 2 SUMMARY
349 |
350 | 1. To delete from the cursor up to the next word type: dw
351 | 2. To delete from the cursor up to the end of the word type: de
352 | 3. To delete from the cursor to the end of a line type: d$
353 | 4. To delete a whole line type: dd
354 |
355 | 5. To repeat a motion prepend it with a number: 2w
356 | 6. The format for a change command is:
357 | operator [number] motion
358 | where:
359 | operator - is what to do, such as d for delete
360 | [number] - is an optional count to repeat the motion
361 | motion - moves over the text to operate on, such as w (word),
362 | e (end of word), $ (end of the line), etc.
363 |
364 | 7. To move to the start of the line use a zero: 0
365 |
366 | 8. To undo previous actions, type: u (lowercase u)
367 | To undo all the changes on a line, type: U (capital U)
368 | To undo the undos, type: CTRL-R
369 |
370 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371 | Lesson 3.1: THE PUT COMMAND
372 |
373 |
374 | ** Type p to put previously deleted text after the cursor. **
375 |
376 | 1. Move the cursor to the first line below marked --->.
377 |
378 | 2. Type dd to delete the line and store it in a Vim register.
379 |
380 | 3. Move the cursor to the c) line, ABOVE where the deleted line should go.
381 |
382 | 4. Type p to put the line below the cursor.
383 |
384 | 5. Repeat steps 2 through 4 to put all the lines in correct order.
385 |
386 | ---> d) Can you learn too?
387 | ---> b) Violets are blue,
388 | ---> c) Intelligence is learned,
389 | ---> a) Roses are red,
390 |
391 |
392 |
393 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
394 | Lesson 3.2: THE REPLACE COMMAND
395 |
396 |
397 | ** Type rx to replace the character at the cursor with x . **
398 |
399 | 1. Move the cursor to the first line below marked --->.
400 |
401 | 2. Move the cursor so that it is on top of the first error.
402 |
403 | 3. Type r and then the character which should be there.
404 |
405 | 4. Repeat steps 2 and 3 until the first line is equal to the second one.
406 |
407 | ---> Whan this lime was tuoed in, someone presswd some wrojg keys!
408 | ---> When this line was typed in, someone pressed some wrong keys!
409 |
410 | 5. Now move on to lesson 3.3.
411 |
412 | NOTE: Remember that you should be learning by doing, not memorization.
413 |
414 |
415 |
416 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
417 | Lesson 3.3: THE CHANGE OPERATOR
418 |
419 |
420 | ** To change until the end of a word, type ce . **
421 |
422 | 1. Move the cursor to the first line below marked --->.
423 |
424 | 2. Place the cursor on the u in lubw.
425 |
426 | 3. Type ce and the correct word (in this case, type ine ).
427 |
428 | 4. Press and move to the next character that needs to be changed.
429 |
430 | 5. Repeat steps 3 and 4 until the first sentence is the same as the second.
431 |
432 | ---> This lubw has a few wptfd that mrrf changing usf the change operator.
433 | ---> This line has a few words that need changing using the change operator.
434 |
435 | Notice that ce deletes the word and places you in Insert mode.
436 | cc does the same for the whole line.
437 |
438 |
439 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
440 | Lesson 3.4: MORE CHANGES USING c
441 |
442 |
443 | ** The change operator is used with the same motions as delete. **
444 |
445 | 1. The change operator works in the same way as delete. The format is:
446 |
447 | c [number] motion
448 |
449 | 2. The motions are the same, such as w (word) and $ (end of line).
450 |
451 | 3. Move the cursor to the first line below marked --->.
452 |
453 | 4. Move the cursor to the first error.
454 |
455 | 5. Type c$ and type the rest of the line like the second and press .
456 |
457 | ---> The end of this line needs some help to make it like the second.
458 | ---> The end of this line needs to be corrected using the c$ command.
459 |
460 | NOTE: You can use the Backspace key to correct mistakes while typing.
461 |
462 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
463 | Lesson 3 SUMMARY
464 |
465 |
466 | 1. To put back text that has just been deleted, type p . This puts the
467 | deleted text AFTER the cursor (if a line was deleted it will go on the
468 | line below the cursor).
469 |
470 | 2. To replace the character under the cursor, type r and then the
471 | character you want to have there.
472 |
473 | 3. The change operator allows you to change from the cursor to where the
474 | motion takes you. eg. Type ce to change from the cursor to the end of
475 | the word, c$ to change to the end of a line.
476 |
477 | 4. The format for change is:
478 |
479 | c [number] motion
480 |
481 | Now go on to the next lesson.
482 |
483 |
484 |
485 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486 | Lesson 4.1: CURSOR LOCATION AND FILE STATUS
487 |
488 | ** Type CTRL-G to show your location in the file and the file status.
489 | Type G to move to a line in the file. **
490 |
491 | NOTE: Read this entire lesson before executing any of the steps!!
492 |
493 | 1. Hold down the Ctrl key and press g . We call this CTRL-G.
494 | A message will appear at the bottom of the page with the filename and the
495 | position in the file. Remember the line number for Step 3.
496 |
497 | NOTE: You may see the cursor position in the lower right corner of the screen
498 | This happens when the 'ruler' option is set (see :help 'ruler' )
499 |
500 | 2. Press G to move you to the bottom of the file.
501 | Type gg to move you to the start of the file.
502 |
503 | 3. Type the number of the line you were on and then G . This will
504 | return you to the line you were on when you first pressed CTRL-G.
505 |
506 | 4. If you feel confident to do this, execute steps 1 through 3.
507 |
508 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
509 | Lesson 4.2: THE SEARCH COMMAND
510 |
511 |
512 | ** Type / followed by a phrase to search for the phrase. **
513 |
514 | 1. In Normal mode type the / character. Notice that it and the cursor
515 | appear at the bottom of the screen as with the : command.
516 |
517 | 2. Now type 'errroor' . This is the word you want to search for.
518 |
519 | 3. To search for the same phrase again, simply type n .
520 | To search for the same phrase in the opposite direction, type N .
521 |
522 | 4. To search for a phrase in the backward direction, use ? instead of / .
523 |
524 | 5. To go back to where you came from press CTRL-O (Keep Ctrl down while
525 | pressing the letter o). Repeat to go back further. CTRL-I goes forward.
526 |
527 | ---> "errroor" is not the way to spell error; errroor is an error.
528 | NOTE: When the search reaches the end of the file it will continue at the
529 | start, unless the 'wrapscan' option has been reset.
530 |
531 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532 | Lesson 4.3: MATCHING PARENTHESES SEARCH
533 |
534 |
535 | ** Type % to find a matching ),], or } . **
536 |
537 | 1. Place the cursor on any (, [, or { in the line below marked --->.
538 |
539 | 2. Now type the % character.
540 |
541 | 3. The cursor will move to the matching parenthesis or bracket.
542 |
543 | 4. Type % to move the cursor to the other matching bracket.
544 |
545 | 5. Move the cursor to another (,),[,],{ or } and see what % does.
546 |
547 | ---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
548 |
549 |
550 | NOTE: This is very useful in debugging a program with unmatched parentheses!
551 |
552 |
553 |
554 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
555 | Lesson 4.4: THE SUBSTITUTE COMMAND
556 |
557 |
558 | ** Type :s/old/new/g to substitute 'new' for 'old'. **
559 |
560 | 1. Move the cursor to the line below marked --->.
561 |
562 | 2. Type :s/thee/the . Note that this command only changes the
563 | first occurrence of "thee" in the line.
564 |
565 | 3. Now type :s/thee/the/g . Adding the g flag means to substitute
566 | globally in the line, change all occurrences of "thee" in the line.
567 |
568 | ---> thee best time to see thee flowers is in thee spring.
569 |
570 | 4. To change every occurrence of a character string between two lines,
571 | type :#,#s/old/new/g where #,# are the line numbers of the range
572 | of lines where the substitution is to be done.
573 | Type :%s/old/new/g to change every occurrence in the whole file.
574 | Type :%s/old/new/gc to find every occurrence in the whole file,
575 | with a prompt whether to substitute or not.
576 |
577 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
578 | Lesson 4 SUMMARY
579 |
580 |
581 | 1. CTRL-G displays your location in the file and the file status.
582 | G moves to the end of the file.
583 | number G moves to that line number.
584 | gg moves to the first line.
585 |
586 | 2. Typing / followed by a phrase searches FORWARD for the phrase.
587 | Typing ? followed by a phrase searches BACKWARD for the phrase.
588 | After a search type n to find the next occurrence in the same direction
589 | or N to search in the opposite direction.
590 | CTRL-O takes you back to older positions, CTRL-I to newer positions.
591 |
592 | 3. Typing % while the cursor is on a (,),[,],{, or } goes to its match.
593 |
594 | 4. To substitute new for the first old in a line type :s/old/new
595 | To substitute new for all 'old's on a line type :s/old/new/g
596 | To substitute phrases between two line #'s type :#,#s/old/new/g
597 | To substitute all occurrences in the file type :%s/old/new/g
598 | To ask for confirmation each time add 'c' :%s/old/new/gc
599 |
600 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
601 | Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND
602 |
603 |
604 | ** Type :! followed by an external command to execute that command. **
605 |
606 | 1. Type the familiar command : to set the cursor at the bottom of the
607 | screen. This allows you to enter a command-line command.
608 |
609 | 2. Now type the ! (exclamation point) character. This allows you to
610 | execute any external shell command.
611 |
612 | 3. As an example type ls following the ! and then hit . This
613 | will show you a listing of your directory, just as if you were at the
614 | shell prompt. Or use :!dir if ls doesn't work.
615 |
616 | NOTE: It is possible to execute any external command this way, also with
617 | arguments.
618 |
619 | NOTE: All : commands must be finished by hitting
620 | From here on we will not always mention it.
621 |
622 |
623 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
624 | Lesson 5.2: MORE ON WRITING FILES
625 |
626 |
627 | ** To save the changes made to the text, type :w FILENAME **
628 |
629 | 1. Type :!dir or :!ls to get a listing of your directory.
630 | You already know you must hit after this.
631 |
632 | 2. Choose a filename that does not exist yet, such as TEST.
633 |
634 | 3. Now type: :w TEST (where TEST is the filename you chose.)
635 |
636 | 4. This saves the whole file (the Vim Tutor) under the name TEST.
637 | To verify this, type :!dir or :!ls again to see your directory.
638 |
639 | NOTE: If you were to exit Vim and start it again with vim TEST , the file
640 | would be an exact copy of the tutor when you saved it.
641 |
642 | 5. Now remove the file by typing (Windows): :!del TEST
643 | or (Unix): :!rm TEST
644 |
645 |
646 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
647 | Lesson 5.3: SELECTING TEXT TO WRITE
648 |
649 |
650 | ** To save part of the file, type v motion :w FILENAME **
651 |
652 | 1. Move the cursor to this line.
653 |
654 | 2. Press v and move the cursor to the fifth item below. Notice that the
655 | text is highlighted.
656 |
657 | 3. Press the : character. At the bottom of the screen :'<,'> will appear.
658 |
659 | 4. Type w TEST , where TEST is a filename that does not exist yet. Verify
660 | that you see :'<,'>w TEST before you press .
661 |
662 | 5. Vim will write the selected lines to the file TEST. Use :!dir or :!ls
663 | to see it. Do not remove it yet! We will use it in the next lesson.
664 |
665 | NOTE: Pressing v starts Visual selection. You can move the cursor around
666 | to make the selection bigger or smaller. Then you can use an operator
667 | to do something with the text. For example, d deletes the text.
668 |
669 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
670 | Lesson 5.4: RETRIEVING AND MERGING FILES
671 |
672 |
673 | ** To insert the contents of a file, type :r FILENAME **
674 |
675 | 1. Place the cursor just above this line.
676 |
677 | NOTE: After executing Step 2 you will see text from lesson 5.3. Then move
678 | DOWN to see this lesson again.
679 |
680 | 2. Now retrieve your TEST file using the command :r TEST where TEST is
681 | the name of the file you used.
682 | The file you retrieve is placed below the cursor line.
683 |
684 | 3. To verify that a file was retrieved, cursor back and notice that there
685 | are now two copies of lesson 5.3, the original and the file version.
686 |
687 | NOTE: You can also read the output of an external command. For example,
688 | :r !ls reads the output of the ls command and puts it below the
689 | cursor.
690 |
691 |
692 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
693 | Lesson 5 SUMMARY
694 |
695 |
696 | 1. :!command executes an external command.
697 |
698 | Some useful examples are:
699 | (Windows) (Unix)
700 | :!dir :!ls - shows a directory listing.
701 | :!del FILENAME :!rm FILENAME - removes file FILENAME.
702 |
703 | 2. :w FILENAME writes the current Vim file to disk with name FILENAME.
704 |
705 | 3. v motion :w FILENAME saves the Visually selected lines in file
706 | FILENAME.
707 |
708 | 4. :r FILENAME retrieves disk file FILENAME and puts it below the
709 | cursor position.
710 |
711 | 5. :r !dir reads the output of the dir command and puts it below the
712 | cursor position.
713 |
714 |
715 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
716 | Lesson 6.1: THE OPEN COMMAND
717 |
718 |
719 | ** Type o to open a line below the cursor and place you in Insert mode. **
720 |
721 | 1. Move the cursor to the first line below marked --->.
722 |
723 | 2. Type the lowercase letter o to open up a line BELOW the cursor and place
724 | you in Insert mode.
725 |
726 | 3. Now type some text and press to exit Insert mode.
727 |
728 | ---> After typing o the cursor is placed on the open line in Insert mode.
729 |
730 | 4. To open up a line ABOVE the cursor, simply type a capital O , rather
731 | than a lowercase o. Try this on the line below.
732 |
733 | ---> Open up a line above this by typing O while the cursor is on this line.
734 |
735 |
736 |
737 |
738 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
739 | Lesson 6.2: THE APPEND COMMAND
740 |
741 |
742 | ** Type a to insert text AFTER the cursor. **
743 |
744 | 1. Move the cursor to the start of the first line below marked --->.
745 |
746 | 2. Press e until the cursor is on the end of li .
747 |
748 | 3. Type an a (lowercase) to append text AFTER the cursor.
749 |
750 | 4. Complete the word like the line below it. Press to exit Insert
751 | mode.
752 |
753 | 5. Use e to move to the next incomplete word and repeat steps 3 and 4.
754 |
755 | ---> This li will allow you to pract appendi text to a line.
756 | ---> This line will allow you to practice appending text to a line.
757 |
758 | NOTE: a, i and A all go to the same Insert mode, the only difference is where
759 | the characters are inserted.
760 |
761 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
762 | Lesson 6.3: ANOTHER WAY TO REPLACE
763 |
764 |
765 | ** Type a capital R to replace more than one character. **
766 |
767 | 1. Move the cursor to the first line below marked --->. Move the cursor to
768 | the beginning of the first xxx .
769 |
770 | 2. Now press R and type the number below it in the second line, so that it
771 | replaces the xxx .
772 |
773 | 3. Press to leave Replace mode. Notice that the rest of the line
774 | remains unmodified.
775 |
776 | 4. Repeat the steps to replace the remaining xxx.
777 |
778 | ---> Adding 123 to xxx gives you xxx.
779 | ---> Adding 123 to 456 gives you 579.
780 |
781 | NOTE: Replace mode is like Insert mode, but every typed character deletes an
782 | existing character.
783 |
784 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
785 | Lesson 6.4: COPY AND PASTE TEXT
786 |
787 |
788 | ** Use the y operator to copy text and p to paste it **
789 |
790 | 1. Move to the line below marked ---> and place the cursor after "a)".
791 |
792 | 2. Start Visual mode with v and move the cursor to just before "first".
793 |
794 | 3. Type y to yank (copy) the highlighted text.
795 |
796 | 4. Move the cursor to the end of the next line: j$
797 |
798 | 5. Type p to put (paste) the text. Then type: a second .
799 |
800 | 6. Use Visual mode to select " item.", yank it with y , move to the end of
801 | the next line with j$ and put the text there with p .
802 |
803 | ---> a) this is the first item.
804 | b)
805 |
806 | NOTE: You can also use y as an operator: yw yanks one word,
807 | yy yanks the whole line, then p puts that line.
808 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
809 | Lesson 6.5: SET OPTION
810 |
811 |
812 | ** Set an option so a search or substitute ignores case **
813 |
814 | 1. Search for 'ignore' by entering: /ignore
815 | Repeat several times by pressing n .
816 |
817 | 2. Set the 'ic' (Ignore case) option by entering: :set ic
818 |
819 | 3. Now search for 'ignore' again by pressing n
820 | Notice that Ignore and IGNORE are now also found.
821 |
822 | 4. Set the 'hlsearch' and 'incsearch' options: :set hls is
823 |
824 | 5. Now type the search command again and see what happens: /ignore
825 |
826 | 6. To disable ignoring case enter: :set noic
827 |
828 | NOTE: To remove the highlighting of matches enter: :nohlsearch
829 | NOTE: If you want to ignore case for just one search command, use \c
830 | in the phrase: /ignore\c
831 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
832 | Lesson 6 SUMMARY
833 |
834 | 1. Type o to open a line BELOW the cursor and start Insert mode.
835 | Type O to open a line ABOVE the cursor.
836 |
837 | 2. Type a to insert text AFTER the cursor.
838 | Type A to insert text after the end of the line.
839 |
840 | 3. The e command moves to the end of a word.
841 |
842 | 4. The y operator yanks (copies) text, p puts (pastes) it.
843 |
844 | 5. Typing a capital R enters Replace mode until is pressed.
845 |
846 | 6. Typing ":set xxx" sets the option "xxx". Some options are:
847 | 'ic' 'ignorecase' ignore upper/lower case when searching
848 | 'is' 'incsearch' show partial matches for a search phrase
849 | 'hls' 'hlsearch' highlight all matching phrases
850 | You can either use the long or the short option name.
851 |
852 | 7. Prepend "no" to switch an option off: :set noic
853 |
854 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
855 | Lesson 7.1: GETTING HELP
856 |
857 |
858 | ** Use the on-line help system **
859 |
860 | Vim has a comprehensive on-line help system. To get started, try one of
861 | these three:
862 | - press the key (if you have one)
863 | - press the key (if you have one)
864 | - type :help
865 |
866 | Read the text in the help window to find out how the help works.
867 | Type CTRL-W CTRL-W to jump from one window to another.
868 | Type :q to close the help window.
869 |
870 | You can find help on just about any subject, by giving an argument to the
871 | ":help" command. Try these (don't forget pressing ):
872 |
873 | :help w
874 | :help c_CTRL-D
875 | :help insert-index
876 | :help user-manual
877 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
878 | Lesson 7.2: CREATE A STARTUP SCRIPT
879 |
880 |
881 | ** Enable Vim features **
882 |
883 | Vim has many more features than Vi, but most of them are disabled by
884 | default. To start using more features you should create a "vimrc" file.
885 |
886 | 1. Start editing the "vimrc" file. This depends on your system:
887 | :e ~/.vimrc for Unix
888 | :e ~/_vimrc for Windows
889 |
890 | 2. Now read the example "vimrc" file contents:
891 | :r $VIMRUNTIME/vimrc_example.vim
892 |
893 | 3. Write the file with:
894 | :w
895 |
896 | The next time you start Vim it will use syntax highlighting.
897 | You can add all your preferred settings to this "vimrc" file.
898 | For more information type :help vimrc-intro
899 |
900 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
901 | Lesson 7.3: COMPLETION
902 |
903 |
904 | ** Command line completion with CTRL-D and **
905 |
906 | 1. Make sure Vim is not in compatible mode: :set nocp
907 |
908 | 2. Look what files exist in the directory: :!ls or :!dir
909 |
910 | 3. Type the start of a command: :e
911 |
912 | 4. Press CTRL-D and Vim will show a list of commands that start with "e".
913 |
914 | 5. Type d and Vim will complete the command name to ":edit".
915 |
916 | 6. Now add a space and the start of an existing file name: :edit FIL
917 |
918 | 7. Press . Vim will complete the name (if it is unique).
919 |
920 | NOTE: Completion works for many commands. Just try pressing CTRL-D and
921 |