mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Update word completion list setting interface
This commit is contained in:
parent
a4c8bc1097
commit
4a09df48c0
@ -9,7 +9,8 @@ develop
|
||||
|
||||
- [beta][non-AppStore ver.] Change to not check pre-release versions on default.
|
||||
- New pre-releases are always subject of the update check no matter the user setting if the current runnning CotEditor is a pre-release version.
|
||||
- Update some Japanese localization.
|
||||
- Update word completion list setting in Edit pane in Preferences (The previous setting has been reset).
|
||||
- Tweak some Japanese localization.
|
||||
|
||||
|
||||
|
||||
|
@ -70,46 +70,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dte-ly-fKQ">
|
||||
<rect key="frame" x="117" y="141" width="212" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Completion list includes words in:" usesSingleLineMode="YES" id="dLj-Kh-KtX">
|
||||
<rect key="frame" x="117" y="141" width="156" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Completion list includes:" usesSingleLineMode="YES" id="dLj-Kh-KtX">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="686">
|
||||
<rect key="frame" x="144" y="51" width="299" height="86"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="cellSize" width="299" height="20"/>
|
||||
<size key="intercellSpacing" width="4" height="2"/>
|
||||
<buttonCell key="prototype" type="radio" title="Syntax Style only" imagePosition="left" alignment="left" tag="3" inset="2" id="SU9-92-Q86">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<cells>
|
||||
<column>
|
||||
<buttonCell type="radio" title="Document only" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="689">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<buttonCell type="radio" title="Syntax Style only" bezelStyle="regularSquare" imagePosition="left" alignment="left" tag="3" inset="2" id="690">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<buttonCell type="radio" title="Document + Syntax Style" bezelStyle="regularSquare" imagePosition="left" alignment="left" tag="1" inset="2" id="691">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<buttonCell type="radio" title="Document + Syntax Style + Standard Words" imagePosition="left" alignment="left" tag="2" inset="2" id="r6f-b7-fJY">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</column>
|
||||
</cells>
|
||||
<connections>
|
||||
<binding destination="26" name="selectedTag" keyPath="values.completeAddStandardWords" id="j63-Mq-XMI"/>
|
||||
</connections>
|
||||
</matrix>
|
||||
<textField horizontalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="IXD-kJ-dvh">
|
||||
<rect key="frame" x="50" y="580" width="63" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="Behavior:" usesSingleLineMode="YES" id="SqI-BC-ar9">
|
||||
@ -210,6 +177,28 @@
|
||||
<binding destination="26" name="value" keyPath="values.autoComplete" id="HrP-lE-CrB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="lO2-uf-OLD">
|
||||
<rect key="frame" x="142" y="117" width="142" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Words in document" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="EJZ-N6-54G">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="updateCompletionListWords:" target="-2" id="e8v-4g-iBC"/>
|
||||
<binding destination="26" name="value" keyPath="values.completesDocumentWords" id="Ecf-pT-NXw"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="t0Y-p1-xOb">
|
||||
<rect key="frame" x="142" y="93" width="203" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Words defined in syntax style" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="1v9-7i-9RL">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="updateCompletionListWords:" target="-2" id="Mtc-IH-B2R"/>
|
||||
<binding destination="26" name="value" keyPath="values.completesSyntaxWords" id="fQq-LZ-Edi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="750" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="oXk-4y-elJ">
|
||||
<rect key="frame" x="34" y="167" width="79" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="Completion:" usesSingleLineMode="YES" id="gDN-SU-sZH">
|
||||
@ -440,6 +429,28 @@
|
||||
<action selector="openHelpAnchor:" target="-1" id="hyu-2z-avq"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="w2P-Vr-ZDY">
|
||||
<rect key="frame" x="142" y="69" width="120" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Standard words" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="c5j-0N-f2R">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="updateCompletionListWords:" target="-2" id="IYB-au-5bs"/>
|
||||
<binding destination="26" name="value" keyPath="values.completesStandardWords" id="kjP-Da-g0b"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="btC-lZ-pQ7">
|
||||
<rect key="frame" x="117" y="49" width="405" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Completion can be performed manually with: Esc or ⌘." id="dmb-pc-4M5">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="completionHintMessage" id="XIv-Zf-aQ7"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="z5v-7l-1C4" secondAttribute="bottom" constant="20" symbolic="YES" id="0Ke-Pr-SYk"/>
|
||||
@ -449,12 +460,14 @@
|
||||
<constraint firstItem="282" firstAttribute="baseline" secondItem="283" secondAttribute="baseline" id="2eo-GD-Kfb"/>
|
||||
<constraint firstItem="C2I-Ub-oUU" firstAttribute="leading" secondItem="644" secondAttribute="leading" id="3eN-aj-0ZB"/>
|
||||
<constraint firstItem="844" firstAttribute="top" secondItem="mK4-4e-plf" secondAttribute="bottom" constant="10" id="53U-9L-xPq"/>
|
||||
<constraint firstItem="t0Y-p1-xOb" firstAttribute="leading" secondItem="lO2-uf-OLD" secondAttribute="leading" id="5d4-UU-RBZ"/>
|
||||
<constraint firstItem="224" firstAttribute="baseline" secondItem="221" secondAttribute="baseline" id="6ki-ac-drF"/>
|
||||
<constraint firstItem="221" firstAttribute="leading" secondItem="249" secondAttribute="leading" id="7h3-GD-axK"/>
|
||||
<constraint firstItem="aZf-lI-jGQ" firstAttribute="top" secondItem="283" secondAttribute="bottom" constant="20" id="7ve-Dq-5V1"/>
|
||||
<constraint firstItem="235" firstAttribute="baseline" secondItem="221" secondAttribute="baseline" id="9lC-ZO-zFe"/>
|
||||
<constraint firstItem="lO2-uf-OLD" firstAttribute="top" secondItem="Dte-ly-fKQ" secondAttribute="bottom" constant="8" symbolic="YES" id="Axl-g5-SRk"/>
|
||||
<constraint firstItem="1Oj-wo-mCu" firstAttribute="top" secondItem="69" secondAttribute="bottom" constant="20" id="B5N-mq-gDa"/>
|
||||
<constraint firstItem="686" firstAttribute="leading" secondItem="Dte-ly-fKQ" secondAttribute="leading" constant="25" id="Bxt-Lh-ZU5"/>
|
||||
<constraint firstItem="Dte-ly-fKQ" firstAttribute="leading" secondItem="btC-lZ-pQ7" secondAttribute="leading" id="CyA-0F-v2g"/>
|
||||
<constraint firstItem="r9C-0B-mga" firstAttribute="baseline" secondItem="1Oj-wo-mCu" secondAttribute="baseline" id="FG7-G9-euH"/>
|
||||
<constraint firstItem="aZf-lI-jGQ" firstAttribute="leading" secondItem="VBo-Ii-1PR" secondAttribute="trailing" constant="8" symbolic="YES" id="Fhr-la-WI5"/>
|
||||
<constraint firstItem="160" firstAttribute="top" secondItem="209" secondAttribute="bottom" constant="10" id="Frm-gK-yPu"/>
|
||||
@ -463,6 +476,8 @@
|
||||
<constraint firstItem="283" firstAttribute="top" secondItem="160" secondAttribute="bottom" constant="10" id="IM6-11-CAa"/>
|
||||
<constraint firstItem="644" firstAttribute="leading" secondItem="1Oj-wo-mCu" secondAttribute="leading" id="J6i-07-RCr"/>
|
||||
<constraint firstItem="644" firstAttribute="leading" secondItem="IXD-kJ-dvh" secondAttribute="trailing" constant="8" symbolic="YES" id="Kcl-7N-AbQ"/>
|
||||
<constraint firstItem="t0Y-p1-xOb" firstAttribute="leading" secondItem="w2P-Vr-ZDY" secondAttribute="leading" id="MaU-8f-QTA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="btC-lZ-pQ7" secondAttribute="trailing" constant="20" symbolic="YES" id="NeW-xi-Gzc"/>
|
||||
<constraint firstItem="Dte-ly-fKQ" firstAttribute="top" secondItem="C2I-Ub-oUU" secondAttribute="bottom" constant="10" id="OMk-af-bir"/>
|
||||
<constraint firstItem="247" firstAttribute="leading" secondItem="249" secondAttribute="trailing" constant="8" symbolic="YES" id="QB9-YF-TQu"/>
|
||||
<constraint firstItem="282" firstAttribute="centerY" secondItem="iub-4d-NyY" secondAttribute="centerY" id="QWl-29-mP4"/>
|
||||
@ -478,15 +493,15 @@
|
||||
<constraint firstItem="249" firstAttribute="baseline" secondItem="247" secondAttribute="baseline" id="abF-SR-IDN"/>
|
||||
<constraint firstItem="243" firstAttribute="width" secondItem="247" secondAttribute="width" id="bJI-zN-7dz"/>
|
||||
<constraint firstItem="870" firstAttribute="top" secondItem="867" secondAttribute="bottom" constant="10" id="bLh-rA-4nS"/>
|
||||
<constraint firstItem="z5v-7l-1C4" firstAttribute="top" secondItem="686" secondAttribute="bottom" constant="10" id="cFs-dY-MCS"/>
|
||||
<constraint firstItem="874" firstAttribute="leading" secondItem="244" secondAttribute="leading" id="cVK-e1-ToG"/>
|
||||
<constraint firstItem="874" firstAttribute="leading" secondItem="235" secondAttribute="leading" id="cg2-af-4WR"/>
|
||||
<constraint firstItem="btC-lZ-pQ7" firstAttribute="top" secondItem="w2P-Vr-ZDY" secondAttribute="bottom" constant="8" symbolic="YES" id="dKt-0g-uDe"/>
|
||||
<constraint firstItem="244" firstAttribute="top" secondItem="235" secondAttribute="bottom" constant="10" id="dx8-My-4SK"/>
|
||||
<constraint firstItem="69" firstAttribute="leading" secondItem="fR5-Ie-WnP" secondAttribute="trailing" constant="8" symbolic="YES" id="e18-6y-ozt"/>
|
||||
<constraint firstItem="w2P-Vr-ZDY" firstAttribute="top" secondItem="t0Y-p1-xOb" secondAttribute="bottom" constant="10" id="e1S-pc-Nus"/>
|
||||
<constraint firstItem="N9e-hF-BPy" firstAttribute="leading" secondItem="iub-4d-NyY" secondAttribute="trailing" constant="8" symbolic="YES" id="eJ7-3F-ASx"/>
|
||||
<constraint firstItem="867" firstAttribute="top" secondItem="844" secondAttribute="bottom" constant="10" id="eN6-pI-vDL"/>
|
||||
<constraint firstItem="oXk-4y-elJ" firstAttribute="baseline" secondItem="C2I-Ub-oUU" secondAttribute="baseline" id="ebU-SQ-ueL"/>
|
||||
<constraint firstItem="686" firstAttribute="top" secondItem="Dte-ly-fKQ" secondAttribute="bottom" constant="4" id="exZ-lo-1E8"/>
|
||||
<constraint firstItem="236" firstAttribute="leading" secondItem="243" secondAttribute="leading" id="fBh-m9-U8F"/>
|
||||
<constraint firstItem="69" firstAttribute="top" secondItem="Vf0-M7-9ji" secondAttribute="bottom" constant="20" id="fgf-3E-dzG"/>
|
||||
<constraint firstItem="IXD-kJ-dvh" firstAttribute="top" secondItem="s6I-DY-Ii0" secondAttribute="top" constant="20" symbolic="YES" id="gJQ-Aw-eFi"/>
|
||||
@ -505,7 +520,9 @@
|
||||
<constraint firstItem="VBo-Ii-1PR" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="s6I-DY-Ii0" secondAttribute="leading" constant="20" symbolic="YES" id="o2w-sC-kkc"/>
|
||||
<constraint firstItem="IXD-kJ-dvh" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="s6I-DY-Ii0" secondAttribute="leading" constant="20" symbolic="YES" id="ofc-c0-fEp"/>
|
||||
<constraint firstItem="243" firstAttribute="width" secondItem="236" secondAttribute="width" id="q7A-SC-Ewq"/>
|
||||
<constraint firstItem="Dte-ly-fKQ" firstAttribute="leading" secondItem="lO2-uf-OLD" secondAttribute="leading" constant="-25" id="q9d-qo-vO1"/>
|
||||
<constraint firstItem="243" firstAttribute="width" secondItem="224" secondAttribute="width" id="rFX-pM-okS"/>
|
||||
<constraint firstItem="t0Y-p1-xOb" firstAttribute="top" secondItem="lO2-uf-OLD" secondAttribute="bottom" constant="10" id="rHi-wD-6T9"/>
|
||||
<constraint firstItem="644" firstAttribute="leading" secondItem="844" secondAttribute="leading" id="sce-Ba-PNP"/>
|
||||
<constraint firstItem="C2I-Ub-oUU" firstAttribute="top" secondItem="874" secondAttribute="bottom" constant="20" id="skU-e7-gNm"/>
|
||||
<constraint firstItem="iub-4d-NyY" firstAttribute="leading" secondItem="282" secondAttribute="trailing" constant="4" id="tek-TW-5hT"/>
|
||||
|
@ -87,17 +87,15 @@
|
||||
<dd><dl>
|
||||
<dt>Auto complete</dt>
|
||||
<dd>When this option is turned on, completion list will be automatically shown if words to complete exist.</dd>
|
||||
<dt>Completion list includes words in:</dt>
|
||||
<dt>Completion list includes:</dt>
|
||||
<dd>Here, you can change the range of possible completions that appear in the completion list.</dd>
|
||||
<dd><dl>
|
||||
<dt>Document only</dt>
|
||||
<dd>The list shows only the words appear in your document.</dd>
|
||||
<dt>Syntax Style only</dt>
|
||||
<dd>The list shows only the words defined by your syntax style (in the case you've not specified any completions, the words generated by the syntax coloring rule appear).</dd>
|
||||
<dt>Document + Syntax Style</dt>
|
||||
<dd>In addition to the in-document words, the words defined by your syntax style appear in the list.</dd>
|
||||
<dt>Document + Syntax Style + Standard Words</dt>
|
||||
<dd>In addition to all of the above, the list shows standard words as well.</dd>
|
||||
<dt>Words in document</dt>
|
||||
<dd>The list includes the words appear in your document.</dd>
|
||||
<dt>Words defined in syntax style</dt>
|
||||
<dd>The list includes the words defined by your syntax style (in the case you've not specified any completions, the words generated by the syntax coloring rule appear).</dd>
|
||||
<dt>Standard words</dt>
|
||||
<dd>The list includes standard words.</dd>
|
||||
</dl></dd>
|
||||
</dl></dd>
|
||||
</dl>
|
||||
|
@ -80,6 +80,7 @@
|
||||
<li>Print settings preset can be stored in the print panel.</li>
|
||||
</ul></li>
|
||||
<li>Better file encoding handling on revert action.</li>
|
||||
<li>Update word completion list setting in Edit pane in Preferences (The previous setting has been reset).</li>
|
||||
<li>Set access-group <code>com.coteditor.CotEditor.edit</code> to CotEditor's script definition.</li>
|
||||
<li>Change behavior to save <code>com.apple.TextEncoding</code> xattr on saving if the file had no content.</li>
|
||||
<li>Improve window restoration:
|
||||
@ -93,6 +94,7 @@
|
||||
</ul></li>
|
||||
<li>Optimize saving process.</li>
|
||||
<li>Improve compatibility with OS X 10.11 El Capitan.</li>
|
||||
<li>Tweak some Japanese licalization.</li>
|
||||
<li>Change source code license from the GNU General Public License version 2 to the Apache License version 2.0.</li>
|
||||
<li>[non-AppStore ver.] Add option to check pre-release versions.
|
||||
<ul>
|
||||
|
@ -87,14 +87,12 @@
|
||||
<dt>入力補完候補リストに含む単語</dt>
|
||||
<dd>入力補完するときに表示する候補を設定します。</dd>
|
||||
<dd><dl>
|
||||
<dt>ファイル内からのみ</dt>
|
||||
<dd>ファイル内にある単語だけをリストアップします。</dd>
|
||||
<dt>シンタックススタイルからのみ</dt>
|
||||
<dd>シンタックススタイルで設定された入力補完文字リスト(設定されていなければカラーリング設定から生成)を表示します。</dd>
|
||||
<dt>ファイル + シンタックススタイルから</dt>
|
||||
<dd>ファイル内にある単語に加え、シンタックススタイルで設定された入力補完文字リストを表示します。</dd>
|
||||
<dt>ファイル + シンタックススタイル + 一般英単語から</dt>
|
||||
<dd>上記に加え、一般英単語を表示します。</dd>
|
||||
<dt>書類に含まれる単語</dt>
|
||||
<dd>書類に含まれる単語が候補に含まれます。</dd>
|
||||
<dt>シンタックススタイルで定義された単語</dt>
|
||||
<dd>シンタックススタイルで設定された入力補完文字リスト(設定されていなければカラーリング設定から生成)の単語が候補に含まれます。</dd>
|
||||
<dt>一般英単語</dt>
|
||||
<dd>一般英単語が候補に含まれます。</dd>
|
||||
</dl></dd>
|
||||
</dl></dd>
|
||||
</dl>
|
||||
|
@ -80,6 +80,7 @@
|
||||
<li>印刷設定のプリセットに CotEditor 独自の設定も保存されるように</li>
|
||||
</ul></li>
|
||||
<li>書類復帰時の文字エンコーディングの扱いを改善</li>
|
||||
<li>入力補完候補リストの設定インターフェイスの刷新(以前の設定はリセットされます)</li>
|
||||
<li>CotEditor のスクリプト定義に アクセスグループ (access-group) <code>com.coteditor.CotEditor.edit</code> を追加</li>
|
||||
<li>ウインドウ復帰に関する改善:
|
||||
<ul>
|
||||
@ -91,6 +92,7 @@
|
||||
<li>より早い起動</li>
|
||||
</ul></li>
|
||||
<li>OS X 10.11 El Capitan 対応の強化</li>
|
||||
<li>日本語ローカライズの調整</li>
|
||||
<li>ソースコードのライセンスを GNU General Public License version 2 から Apache Lisence version 2.0 に変更</li>
|
||||
<li>[非 AppStore 版のみ] プレリリース版を更新対象に含めるオプションを追加
|
||||
<ul>
|
||||
|
@ -158,7 +158,9 @@
|
||||
CEDefaultCommentsAtLineHeadKey: @YES,
|
||||
CEDefaultShouldAntialiasKey: @YES,
|
||||
CEDefaultAutoCompleteKey: @NO,
|
||||
CEDefaultCompletionWordsKey: @2U,
|
||||
CEDefaultCompletesDocumentWordsKey: @YES,
|
||||
CEDefaultCompletesSyntaxWordsKey: @YES,
|
||||
CEDefaultCompletesStandartWordsKey: @NO,
|
||||
CEDefaultShowPageGuideKey: @NO,
|
||||
CEDefaultPageGuideColumnKey: @80,
|
||||
CEDefaultLineSpacingKey: @0.1f,
|
||||
|
@ -39,6 +39,7 @@
|
||||
@property (nonatomic, nonnull, copy) NSArray *invisibleTabs;
|
||||
@property (nonatomic, nonnull, copy) NSArray *invisibleNewLines;
|
||||
@property (nonatomic, nonnull, copy) NSArray *invisibleFullWidthSpaces;
|
||||
@property (nonatomic, nonnull, copy) NSString *completionHintMessage;
|
||||
|
||||
@end
|
||||
|
||||
@ -82,6 +83,8 @@
|
||||
[fullWidthSpaces addObject:[NSString stringWithFormat:@"%C", [CEUtils invisibleFullwidthSpaceChar:i]]];
|
||||
}
|
||||
_invisibleFullWidthSpaces = fullWidthSpaces;
|
||||
|
||||
[self updateCompletionHintMessage];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -103,4 +106,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark Action Messages
|
||||
|
||||
// ------------------------------------------------------
|
||||
///
|
||||
- (IBAction)updateCompletionListWords:(nullable id)sender
|
||||
// ------------------------------------------------------
|
||||
{
|
||||
[self updateCompletionHintMessage];
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark Private Methods
|
||||
|
||||
// ------------------------------------------------------
|
||||
- (void)updateCompletionHintMessage
|
||||
// ------------------------------------------------------
|
||||
{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *message;
|
||||
|
||||
if (![defaults boolForKey:CEDefaultCompletesDocumentWordsKey] &&
|
||||
![defaults boolForKey:CEDefaultCompletesSyntaxWordsKey] &&
|
||||
![defaults boolForKey:CEDefaultCompletesStandartWordsKey])
|
||||
{
|
||||
message = [NSString stringWithFormat:@"⚠️ %@", NSLocalizedString(@"Select at least one item to perform completion.", nil)];
|
||||
} else {
|
||||
message = [NSString stringWithFormat:NSLocalizedString(@"Completion can be performed manually with: %@ or %@", nil), @"Esc", @"⌘."];
|
||||
}
|
||||
|
||||
[self setCompletionHintMessage:message];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -350,12 +350,11 @@
|
||||
// ------------------------------------------------------
|
||||
{
|
||||
NSMutableOrderedSet *candidateWords = [NSMutableOrderedSet orderedSet];
|
||||
NSUInteger addingMode = [[NSUserDefaults standardUserDefaults] integerForKey:CEDefaultCompletionWordsKey];
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *partialWord = [[textView string] substringWithRange:charRange];
|
||||
|
||||
|
||||
//"ファイル中の語彙" を検索して candidateWords に入れる
|
||||
if (addingMode != 3) {
|
||||
// extract words in document and set to candidateWords
|
||||
if ([defaults boolForKey:CEDefaultCompletesDocumentWordsKey]) {
|
||||
if (charRange.length == 1 && ![[NSCharacterSet alphanumericCharacterSet] characterIsMember:[partialWord characterAtIndex:0]]) {
|
||||
// do nothing if the particle word is an symbol
|
||||
|
||||
@ -373,8 +372,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
//"カラーシンタックス辞書の語彙" をコピーする
|
||||
if (addingMode >= 1) {
|
||||
// copy words defined in syntax style
|
||||
if ([defaults boolForKey:CEDefaultCompletesSyntaxWordsKey]) {
|
||||
NSArray *syntaxWords = [[self syntaxParser] completionWords];
|
||||
for (NSString *word in syntaxWords) {
|
||||
if ([word rangeOfString:partialWord options:NSCaseInsensitiveSearch|NSAnchoredSearch].location != NSNotFound) {
|
||||
@ -383,14 +382,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
//デフォルトの候補から "一般英単語" をコピーする
|
||||
if (addingMode == 2) {
|
||||
// copy the standard words from default completion words
|
||||
if ([defaults boolForKey:CEDefaultCompletesStandartWordsKey]) {
|
||||
[candidateWords addObjectsFromArray:words];
|
||||
}
|
||||
|
||||
// 入力済みの単語と同じ候補しかないときは表示しない
|
||||
// provide nothing if there is only a candidate which is same as input word
|
||||
if ([candidateWords count] == 1 && [[candidateWords firstObject] caseInsensitiveCompare:partialWord] == NSOrderedSame) {
|
||||
return nil;
|
||||
return @[];
|
||||
}
|
||||
|
||||
return [candidateWords array];
|
||||
|
@ -161,7 +161,9 @@ extern NSString *__nonnull const CEDefaultFileDropArrayKey;
|
||||
extern NSString *__nonnull const CEDefaultSmartInsertAndDeleteKey;
|
||||
extern NSString *__nonnull const CEDefaultShouldAntialiasKey;
|
||||
extern NSString *__nonnull const CEDefaultAutoCompleteKey;
|
||||
extern NSString *__nonnull const CEDefaultCompletionWordsKey;
|
||||
extern NSString *__nonnull const CEDefaultCompletesDocumentWordsKey;
|
||||
extern NSString *__nonnull const CEDefaultCompletesSyntaxWordsKey;
|
||||
extern NSString *__nonnull const CEDefaultCompletesStandartWordsKey;
|
||||
extern NSString *__nonnull const CEDefaultShowPageGuideKey;
|
||||
extern NSString *__nonnull const CEDefaultPageGuideColumnKey;
|
||||
extern NSString *__nonnull const CEDefaultLineSpacingKey;
|
||||
|
@ -160,7 +160,9 @@ NSString *__nonnull const CEDefaultFileDropArrayKey = @"fileDropArray";
|
||||
NSString *__nonnull const CEDefaultSmartInsertAndDeleteKey = @"smartInsertAndDelete";
|
||||
NSString *__nonnull const CEDefaultShouldAntialiasKey = @"shouldAntialias";
|
||||
NSString *__nonnull const CEDefaultAutoCompleteKey = @"autoComplete";
|
||||
NSString *__nonnull const CEDefaultCompletionWordsKey = @"completeAddStandardWords";
|
||||
NSString *__nonnull const CEDefaultCompletesDocumentWordsKey = @"completesDocumentWords";
|
||||
NSString *__nonnull const CEDefaultCompletesSyntaxWordsKey = @"completesSyntaxWords";
|
||||
NSString *__nonnull const CEDefaultCompletesStandartWordsKey = @"completesStandardWords";
|
||||
NSString *__nonnull const CEDefaultShowPageGuideKey = @"showPageGuide";
|
||||
NSString *__nonnull const CEDefaultPageGuideColumnKey = @"pageGuideColumn";
|
||||
NSString *__nonnull const CEDefaultLineSpacingKey = @"lineSpacing";
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
© 2014 CotEditor Project
|
||||
© 2014-2015 CotEditor Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -86,13 +86,11 @@
|
||||
/* Class = "NSButtonCell"; title = "Auto complete"; ObjectID = "J1B-wA-rdr"; */
|
||||
"J1B-wA-rdr.title" = "自動入力補完";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Completion list includes words in:"; ObjectID = "dLj-Kh-KtX"; */
|
||||
/* Class = "NSTextFieldCell"; title = "Completion list includes:"; ObjectID = "dLj-Kh-KtX"; */
|
||||
"dLj-Kh-KtX.title" = "入力補完候補リストに含む単語:";
|
||||
/* Class = "NSButtonCell"; title = "Document only"; ObjectID = "689"; */
|
||||
"689.title" = "ファイル内からのみ";
|
||||
/* Class = "NSButtonCell"; title = "Syntax Style only"; ObjectID = "690"; */
|
||||
"690.title" = "シンタックススタイルからのみ";
|
||||
/* Class = "NSButtonCell"; title = "Document + Syntax Style"; ObjectID = "691"; */
|
||||
"691.title" = "ファイル + シンタックススタイルから";
|
||||
/* Class = "NSButtonCell"; title = "Document + Syntax Style + Standard Words"; ObjectID = "r6f-b7-fJY"; */
|
||||
"r6f-b7-fJY.title" = "ファイル + シンタックススタイル + 一般英単語から";
|
||||
/* Class = "NSButtonCell"; title = "Words in document"; ObjectID = "EJZ-N6-54G"; */
|
||||
"EJZ-N6-54G.title" = "書類に含まれる単語";
|
||||
/* Class = "NSButtonCell"; title = "Words defined in syntax style"; ObjectID = "1v9-7i-9RL"; */
|
||||
"1v9-7i-9RL.title" = "シンタックススタイルで定義された単語";
|
||||
/* Class = "NSButtonCell"; title = "Standard words"; ObjectID = "c5j-0N-f2R"; */
|
||||
"c5j-0N-f2R.title" = "一般英単語";
|
||||
|
@ -260,6 +260,10 @@
|
||||
// Smart quotes/dashes
|
||||
" (on Mavericks and later)" = "(Mavericks 以上)";
|
||||
|
||||
// Hint message for the completion list
|
||||
"Completion can be performed manually with: %@ or %@" = "入力補完候補リストの表示: %@ もしくは %@";
|
||||
"Select at least one item to perform completion." = "入力補完をするためには1つ以上の項目を選択する必要があります。";
|
||||
|
||||
// Appearance pane
|
||||
"Duplicate “%@”" = "“%@”を複製";
|
||||
"Restore “%@”" = "“%@”を元に戻す";
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
© 2014 CotEditor Project
|
||||
© 2014-2015 CotEditor Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -87,13 +87,11 @@
|
||||
/* Class = "NSButtonCell"; title = "Auto complete"; ObjectID = "J1B-wA-rdr"; */
|
||||
"J1B-wA-rdr.title" = "自动补全";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Completion list includes words in:"; ObjectID = "dLj-Kh-KtX"; */
|
||||
"dLj-Kh-KtX.title" = "补全列表包括的单词来源:";
|
||||
/* Class = "NSButtonCell"; title = "Document only"; ObjectID = "689"; */
|
||||
"689.title" = "仅文档";
|
||||
/* Class = "NSButtonCell"; title = "Syntax Style only"; ObjectID = "690"; */
|
||||
"690.title" = "仅语法风格";
|
||||
/* Class = "NSButtonCell"; title = "Document + Syntax Style"; ObjectID = "691"; */
|
||||
"691.title" = "文档 + 语法风格";
|
||||
/* Class = "NSButtonCell"; title = "Document + Syntax Style + Standard Words"; ObjectID = "r6f-b7-fJY"; */
|
||||
"r6f-b7-fJY.title" = "文档 + 语法风格 + 标准单词";
|
||||
/* Class = "NSTextFieldCell"; title = "Completion list includes:"; ObjectID = "dLj-Kh-KtX"; */
|
||||
"dLj-Kh-KtX.title" = "补全列表包括的单词来源:"; // FIXME: changed
|
||||
/* Class = "NSButtonCell"; title = "Words in document"; ObjectID = "EJZ-N6-54G"; */
|
||||
"EJZ-N6-54G.title" = "Words in document"; // FIXME: added
|
||||
/* Class = "NSButtonCell"; title = "Words defined in syntax style"; ObjectID = "1v9-7i-9RL"; */
|
||||
"1v9-7i-9RL.title" = "Words defined in syntax style"; // FIXME: added
|
||||
/* Class = "NSButtonCell"; title = "Standard words"; ObjectID = "c5j-0N-f2R"; */
|
||||
"c5j-0N-f2R.title" = "标准单词";
|
||||
|
@ -259,6 +259,10 @@
|
||||
// Smart quotes/dashes
|
||||
" (on Mavericks and later)" = "(Mavericks 或更新版本)";
|
||||
|
||||
// Hint message for the completion list
|
||||
"Completion can be performed manually with: %@ or %@" = "Completion can be performed manually with: %@ or %@"; // FIXME: added
|
||||
"Select at least one item to perform completion." = "Select at least one item to perform completion."; // FIXME: added
|
||||
|
||||
// Appearance pane
|
||||
"Duplicate “%@”" = "拷贝 “%@”";
|
||||
"Restore “%@”" = "还原 “%@”";
|
||||
|
Loading…
Reference in New Issue
Block a user