vimで貼り付けると、前のコンテンツと余白の間のコンテンツが圧縮されます。

vimで貼り付けると、前のコンテンツと余白の間のコンテンツが圧縮されます。

私はvimを学び、コピー貼り付けを始めました。または貼り付けるために引っ張ってください。引き抜いたテキストを貼り付けようとすると、前の内容が右に押されて左に押されます。何を意味するかを示すために、2つのスクリーンショットを撮りました。そして

貼り付ける前: 貼り付ける前に

貼り付けた後: 貼り付けた後

私は.vimrcが貼り付け動作に影響を与えないと思います。

execute pathogen#infect()
set number
set tabstop=3 "tabs are 3 spaces big (smaller than default)
set shiftwidth=3 "3 spaces are also used with auto indent
set smartindent "You'll keep the indentation on the next line when you press enter.

"auto complete brackets
inoremap { {}<Esc>i 
inoremap [ []<Esc>i
inoremap ( ()<Esc>i

let g:solarized_termcolors=256
syntax on
set t_Co=256
colorscheme solarized
set background=light

"remap CTRL-c in visual mode for copy to clipboard
vnoremap <C-c> "+y

"Let vim change the working directory automatically (so you can open files from the current path)
set autochdir

"Open new split panes to right and bottom, which feels more natural than Vim’s default:
set splitbelow
set splitright

"map a key to maximize current screen
map <F5> <C-W>_<C-W><Bar>
map <F6> <C-W>=

ベストアンサー1

vimコピー/貼り付けにはいくつかの方法があります。 (以下の列挙では、最初のバリエーションのみを使用して3つのバリエーションを示しています。表示次に、テキストをコピー/貼り付けます。 )

  1. 全行範囲の選択:を入力しV、範囲の末尾に移動してを入力しますy。次にターゲットに移動し、p現在の行の下の印刷テキストを使用するか、P上記の印刷テキストを使用します。
  2. 文字精度を使用してテキスト範囲を選択します。を入力し、v範囲の末尾(他の行が可能)に移動して、を入力しますy。次にコピー先に移動し、コピーしたpテキストを現在の文字の後に印刷するか、P前に印刷します。 (既存の改行文字は保存されます.)
  3. 1つを選択してください詰まったテキスト:を入力し、Ctrl-V長方形の末尾に移動してを入力しますy。このブロックを既存のテキストに貼り付けると、既存のテキストが右に移動して新しいテキスト用のスペースが作成されます。

コピー/貼り付け方法は3のようです。 - あなたのニーズに最も適した他の方法のいずれかを使用してください。

おすすめ記事