Skip to content

Commit e9dd164

Browse files
committed
Update os_mac from Vim 8.0 to 8.1
1 parent 919ffa4 commit e9dd164

File tree

2 files changed

+148
-19
lines changed

2 files changed

+148
-19
lines changed

doc/os_mac.jax

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*os_mac.txt* For Vim バージョン 8.0. Last change: 2006 Apr 30
1+
*os_mac.txt* For Vim バージョン 8.1. Last change: 2018 Jan 21
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -13,10 +13,12 @@ NOTE: このファイルの内容は少し古いです。つぎのサイトで
1313

1414
1. ファイル名の決まりごと |mac-filename|
1515
2. .vimrc と .vim ファイル |mac-vimfile|
16-
3. FAQ |mac-faq|
17-
4. 知られている不足事項 |mac-lack|
18-
5. Mac バグレポート |mac-bug|
19-
6. Vim のコンパイル |mac-compile|
16+
3. 標準のマップ |mac-standard-mappings|
17+
4. FAQ |mac-faq|
18+
5. 知られている不足事項 |mac-lack|
19+
6. Mac バグレポート |mac-bug|
20+
7. Vim のコンパイル |mac-compile|
21+
8. ダーウィン機能 |mac-darwin-feature|
2022

2123
以前には、Vimのバージョン3.0のMac移植版がありました。ここに以前のファイルの最
2224
初の数行を示します:
@@ -71,7 +73,19 @@ rcファイルは、"vimrc" または "_vimrc"、"gvimrc" または "_gvimrc"
7173
ん。
7274

7375
==============================================================================
74-
3. Mac FAQ *mac-faq*
76+
3. 標準のマップ *mac-standard-mappings*
77+
78+
クリップボードからのペーストやクリップボードへのカット/コピー用に、以下のマッ
79+
プを使用することができます。
80+
81+
キー ノーマル ビジュアル 挿入 説明 ~
82+
Command-v "*P "-d"*P <C-R>* テキストのペースト *<D-v>*
83+
Command-c "*y ビジュアルテキストのコピー *<D-c>*
84+
Command-x "*d ビジュアルテキストのカット *<D-x>*
85+
Backspace "*d ビジュアルテキストのカット
86+
87+
==============================================================================
88+
4. Mac FAQ *mac-faq*
7589

7690
FAQ はインターネット上でも参照できます: http://macvim.org/OSX/index.php#FAQ
7791

@@ -94,13 +108,13 @@ A: ほとんどのシェルで次のトリックがうまくいきます。vimrc
94108
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
95109
96110
==============================================================================
97-
4. 知られている不足事項 *mac-lack*
111+
5. 知られている不足事項 *mac-lack*
98112

99113
ターミナルでは CTRL-^ は Shift-Control-6 とタイプする必要があります。CTRL-@
100114
Shift-Control-2 です。
101115

102116
==============================================================================
103-
5. Mac バグ レポート *mac-bug*
117+
6. Mac バグ レポート *mac-bug*
104118

105119
Mac版の特定のバグや特性の変更をレポートするときは、vim-macメーリングリストを
106120
使ってください|vim-mac|。メーリングリストに登録したくないなら代わりにMacVimの
@@ -109,9 +123,60 @@ Mac版の特定のバグや特性の変更をレポートするときは、vim-m
109123
110124

111125
==============================================================================
112-
6. Vim のコンパイル *mac-compile*
126+
7. Vim のコンパイル *mac-compile*
113127

114128
ソースファイルと一緒にある "src/INSTALLmac.txt" を見てください。
115129

130+
==============================================================================
131+
8. ダーウィン機能 *mac-darwin-feature*
132+
133+
とても古い Mac でなければ、ダーウィンとも呼ばれる OS X を使用しているでしょう。
134+
ダーウィンの 1 つ前の OS は Mac OS 9 です。ダーウィン機能は Vim がダーウィン特
135+
有の資産を使えるようにします。
136+
137+
この機能によって実現されるものは 2 つあります:
138+
139+
- Vim をシステムクリップボードと連携可能にします。
140+
- いくつかのプラットフォーム特有の文字エンコーディングと Vim が認識しているそ
141+
れらの差分を橋渡しする変換モジュールを Vim に組み入れます。
142+
143+
言うまでもなく、同じデスクトップ環境上で動く他のアプリケーションとうまく連携す
144+
るまともなテキストエディタにとって、この両方は必要不可欠なものです。
145+
146+
Vim は macOS 専用のアプリケーションではないので、他のプラットフォーム上のユー
147+
ザーが得ているユーザー体験を macOS 上の人々にも提供するための特別な機能を追加
148+
する必要があります。
149+
150+
簡単のために、この特定のプラットフォームに特化した Vim の機能は "ダーウィン"
151+
と呼ばれます。
152+
153+
この機能は configuration のオプションです。したがって有効か無効かはビルド時に
154+
決定され、一度有効にするよう選択されると組み込まれてしまい、それゆえ実行時に無
155+
効にすることはできません。
156+
157+
この機能は標準で有効になっています。簡単に後述する特別なニーズでもない限り、ほ
158+
とんどのユーザーにとってこれは満足のゆくものでしょう。
159+
160+
無効にしたい場合は、configure スクリプトに `--disable-darwin` を渡してください: >
161+
162+
./configure --disable-darwin <その他のオプション>
163+
164+
その後 Vim をビルドするために `make` を実行してください。オプションの順番は関
165+
係ありません。
166+
167+
実行時にダーウィン機能が組み込まれているかどうかを確かめるには
168+
`has('osxdarwin')` を使用することができ、機能が組み込まれている場合には 1 が返
169+
り、それ以外では 0 が返ります。後方互換性のため、`osxdarwin` の代わりに
170+
`macunix` もまだ使用することができます。
171+
172+
`--disable-darwin` が有用だと分かった着目すべきケースは次のとおりです:
173+
174+
- システムクリップボードの代わりに |x11-selection| を使用したいとき。
175+
- |x11-clientserver| を使用したいとき。
176+
177+
どちらも適切に動作するために X11 のクライアント間通信を利用する必要があって、
178+
通信メカニズムがシステムクリップボードと競合する可能性があるので、実行時に Vim
179+
が停止するのを防ぐためダーウィン機能は無効にしておくべきです。
180+
116181

117182
vim:tw=78:ts=8:noet:ft=help:norl:

en/os_mac.txt

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*os_mac.txt* For Vim version 8.0. Last change: 2006 Apr 30
1+
*os_mac.txt* For Vim version 8.1. Last change: 2018 Jan 21
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -12,11 +12,13 @@ NOTE: This file is a bit outdated. You might find more useful info here:
1212
http://macvim.org/
1313

1414
1. Filename Convention |mac-filename|
15-
2. .vimrc an .vim files |mac-vimfile|
16-
3. FAQ |mac-faq|
17-
4. Known Lack |mac-lack|
18-
5. Mac Bug Report |mac-bug|
19-
6. Compiling Vim |mac-compile|
15+
2. .vimrc and .vim files |mac-vimfile|
16+
3. Standard mappings |mac-standard-mappings|
17+
4. FAQ |mac-faq|
18+
5. Known Lack |mac-lack|
19+
6. Mac Bug Report |mac-bug|
20+
7. Compiling Vim |mac-compile|
21+
8. The darwin feature |mac-darwin-feature|
2022

2123
There was a Mac port for version 3.0 of Vim. Here are the first few lines
2224
from the old file:
@@ -72,7 +74,18 @@ the |'nocompatible'| option is set, otherwise it will only handle mac format
7274
files.
7375

7476
==============================================================================
75-
3. Mac FAQ *mac-faq*
77+
3. Standard mappings *mac-standard-mappings*
78+
79+
The following mappings are available for cut/copy/paste from/to clipboard.
80+
81+
key Normal Visual Insert Description ~
82+
Command-v "*P "-d"*P <C-R>* paste text *<D-v>*
83+
Command-c "*y copy Visual text *<D-c>*
84+
Command-x "*d cut Visual text *<D-x>*
85+
Backspace "*d cut Visual text
86+
87+
==============================================================================
88+
4. Mac FAQ *mac-faq*
7689

7790
On the internet: http://macvim.org/OSX/index.php#FAQ
7891

@@ -95,13 +108,13 @@ A: The following trick works with most shells. Put it in your vimrc file.
95108
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
96109
97110
==============================================================================
98-
4. Mac Lack *mac-lack*
111+
5. Mac Lack *mac-lack*
99112

100113
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
101114
Shift-Control-2.
102115

103116
==============================================================================
104-
5. Mac Bug Report *mac-bug*
117+
6. Mac Bug Report *mac-bug*
105118

106119
When reporting any Mac specific bug or feature change, please use the vim-mac
107120
maillist |vim-mac|. However, you need to be subscribed. An alternative is to
@@ -110,9 +123,60 @@ send a message to the current MacVim maintainers:
110123
111124

112125
==============================================================================
113-
6. Compiling Vim *mac-compile*
126+
7. Compiling Vim *mac-compile*
114127

115128
See the file "src/INSTALLmac.txt" that comes with the source files.
116129

130+
==============================================================================
131+
8. The Darwin Feature *mac-darwin-feature*
132+
133+
If you have a Mac that isn't very old, you will be running OS X, also called
134+
Darwin. The last pre-Darwin OS was Mac OS 9. The darwin feature makes Vim
135+
use Darwin-specific properties.
136+
137+
What is accomplished with this feature is two-fold:
138+
139+
- Make Vim interoperable with the system clipboard.
140+
- Incorporate into Vim a converter module that bridges the gap between some
141+
character encodings specific to the platform and those known to Vim.
142+
143+
Needless to say, both are not to be missed for any decent text editor to work
144+
nicely with other applications running on the same desktop environment.
145+
146+
As Vim is not an application dedicated only to macOS, we need an extra feature
147+
to add in order for it to offer the same user experience that our users on
148+
other platforms enjoy to people on macOS.
149+
150+
For brevity, the feature is referred to as "darwin" to signify it one of the
151+
Vim features that are specific to that particular platform.
152+
153+
The feature is a configuration option. Accordingly, whether it is enabled or
154+
not is determined at build time; once it is selected to be enabled, it is
155+
compiled in and hence cannot be disabled at runtime.
156+
157+
The feature is enabled by default. For most macOS users, that should be
158+
sufficient unless they have specific needs mentioned briefly below.
159+
160+
If you want to disable it, pass `--disable-darwin` to the configure script: >
161+
162+
./configure --disable-darwin <other options>
163+
164+
and then run `make` to build Vim. The order of the options doesn't matter.
165+
166+
To make sure at runtime whether or not the darwin feature is compiled in, you
167+
can use `has('osxdarwin')` which returns 1 if the feature is compiled in; 0
168+
otherwise. For backward compatibility, you can still use `macunix` instead of
169+
`osxdarwin`.
170+
171+
Notable use cases where `--disable-darwin` is turned out to be useful are:
172+
173+
- When you want to use |x11-selection| instead of the system clipboard.
174+
- When you want to use |x11-clientserver|.
175+
176+
Since both have to make use of X11 inter-client communication for them to work
177+
properly, and since the communication mechanism can come into conflict with
178+
the system clipboard, the darwin feature should be disabled to prevent Vim
179+
from hanging at runtime.
180+
117181

118182
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)