質問

いる道用語集vimから画面のコピー-モード

Ctrl-A f

同様にしてまで外部ファイルによるVim

Ctrl-W f

どのようにすることができます道であVimでは画面のコピー-モードになっていますか?


---よろしくお願いしまSamuilの焦点の移動

そのマウスでのパス/ファイルを次のコードである場合の表示画面で

text[space]PATH/file[space]text

Iを押す^fでパス/ファイルです。で保存するパスファイルのファイルに/tmp/screenCopyFileなどが利用できま cat 以下のコマンドの ^A f べき開始:

^A: exec vim `cat PATH/file`

私のコマンドを実行し動秀丸.で広がっているcatコマンドで開くというファイルと猫。

言いたいの手紙 f

exec vim `cat /tmp/screenCopyFile`

結合す。screenrc.

まRampionお答え!

役に立ちましたか?

解決

Ok、液

れ、以下の /path/to/edit-file-under-cursor.screen:

# edit-file-under-cursor.screen

# prevent messages from slowing this down
msgminwait 0
# copy path starting at cursor
stuff " Ebe "
# write the path to a file
writebuf /tmp/screen-copied-path
# open that file in vim in a new screen window
screen /bin/sh -c 'vim `cat /tmp/screen-copied-path`'
# turn message waiting back on
msgminwait 1

# vi: ft=screen

その本を .screenrc:

# bind CTRL-f to open the file starting at the cursor
# when in copy mode
bindkey -m ^f source /path/to/edit-file-under-cursor.screen

(変更 /path/to/ を適切に

そして、ただくには再開 screen (または再読み込みの .screenrc).入力モードのコピー ^A[, 、カーソルを先頭文字のファイル名をタイプ そしてヒット CTRL-f.

私はこの試験で作ったく問題が生じた場合は、速やか.

したい場合はどのように、"チェック man screen へ どの様々なコマンドです。

の開発環境に最適化できるのはこのパスがまったくだめだったことを確実にのみ画面のコピーモードに移動コマンドの例その第 / の"/a/path"に移転 | の"|/a/path")

これにより、安定した制限 screen's"移動コマンドをコピーモード:

Movement keys:
  h, j, k, l move the cursor line by line or column by column.
  0, ^ and $ move to the leftmost column, to the first or last non-whitespace character on the line.
  H, M and L move the cursor to the leftmost column of the top, center or bottom line of the window.
  + and - positions one line up and down.
  G moves to the specified absolute line (default: end of buffer).
  | moves to the specified absolute column.
  w, b, e move the cursor word by word.
  B, E move the cursor WORD by WORD (as in vi).
  C-u and C-d scroll the display up/down by the specified amount of lines while preserving the cursor position. (Default: half screen-full).
  C-b and C-f scroll the display up/down a full screen.
  g moves to the beginning of the buffer.
  % jumps to the specified percentage of the buffer.
...
Searching:
  / Vi-like search forward.
  ? Vi-like search backward.
  C-a s Emacs style incremental search forward.
  C-r Emacs style reverse i-search.

なので変更いたしましたの stuff 線上に

stuff "Bw Ebe "

このタパスがいもなどの非空白文字のジャンクより使い易くするためのパスです。そしてすべてのパスを空白で区切って(両面)こう。

実際に

stuff "B//^M E?/^Me "

うなものかと探しに / (タイプの ^M vimで叩CTRL-vを入力します).まだ試すべての場合には、そのように:

 /a/path
 #/a/path
 /a/path#

しかし、これが正常に行えない現象を改善

 a/relative/path

他のヒント

わからないのでvimも良いが、複数のコマンドで行います。時だき,誠にありがとうございファイル名おpastebuffer、これらの利用に便利なコマンド:

^A : writebuf /tmp/.screenpomfile
^A : exec vim parameters

分かりませんか vim readファイル名からファイルできると思うが、でき :exec 自分のスクリプトで書かれたシェルでの解析 `expr 表現として:

#!/bin/sh
vim `cat /tmp/.screenpomfile`

その後結合でき独自のキーにこれらの行動は、それらを使って非常に有効である。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top