Groups
Sign in
Groups
vim_jp
Conversations
Labels
About
Send feedback
Help
vim(ver 8.1.5)のhelp の間違い
42 views
カーソル移動
Skip to first unread message
tora
unread,
Nov 10, 2018, 3:42:57 AM
11/10/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim_jp
vim(8.1.5) 香り屋版を使用させていただいています。
先日、:help search で関数の使用方法を調べたところ、つぎの間違いを見つけました。
マッチが見つかった場合はその行番号を返す。
マッチがない場合は0を返し、カーソルは移動
しない
。エラーメッ
セージは表示されない。
search関数は作用してみると、カーソルが
移動します
。
フラグに 'n' カーソルを移動させない がありますので、どうも変だと思っていました。
原語のほうは確認していません。
tyru
unread,
Nov 10, 2018, 3:57:31 AM
11/10/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
こんにちは。
「マッチがない場合は0を返し、カーソルは移動しない」なので、マッチがあったのではないでしょうか?
マッチがあった場合にはカーソルは移動します。
:call search('バッファに存在しない単語')
のように実行すると移動しないはずです。
ちなみにフラグ 'n' は「マッチがある場合でもカーソルは移動しない」ためのフラグです。
" 「foo」が存在してもカーソルが移動しない
:call search('foo', 'n')
2018年11月10日(土) 17:42 tora <
horinom...@gmail.com
>:
> --
> このメールは Google グループのグループ「vim_jp」に登録しているユーザーに送られています。
> このグループから退会し、グループからのメールの配信を停止するには
vim_jp+un...@googlegroups.com
にメールを送信してください。
> このグループに投稿するには
vim...@googlegroups.com
にメールを送信してください。
>
https://groups.google.com/group/vim_jp
からこのグループにアクセスしてください。
> その他のオプションについては
https://groups.google.com/d/optout
にアクセスしてください。
--
Takuya Fujiwara
tora
unread,
Nov 12, 2018, 7:41:57 PM
11/12/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim_jp
Fujiwara さんのご指摘の通りでした。私の確認不足でした。
どうも、お騒がせしてもうしわけありません。
素人の希望はこの部分はもう少し、丁寧に「マッチが見つかった場合は、その先頭に
カーソルが移動し、search関数はその行番号を返す。」というような文章に
して欲しかったです。
Reply all
Reply to author
Forward
0 new messages