78

私は Sublime Text を初めて使用しますが、これは素朴な質問だと確信しています。http://www.sublimetext.com/ (2/6 スライド)で複数行の選択を見ています。絶対に大好きです。

Ctrl (Cmd)+ Shift+ L「複数選択」で同時に編集できることは理解しています。ただし、デモでは、すべての行を 1 行にまとめています。その近道とは?+
を使用しましたが、一度だけ削除され、改行がすべて削除されるわけではありません。CtrlJ

TextPad を使用\nし、空のスペースで検索/置換を使用します。しかし、デモを行っている人は何らかのショートカットを使用しているようです。

4

9 に答える 9

275

A single command shortcut for merging multiple lines into 1 is "join lines".

  • Command + Shift + J on the Mac to join lines.
  • CTRL + Shift + J on Windows
  • Edit > Lines > Join Lines

Important note: This keyboard shortcut changed in versions of sublime text released after around mid-2021. For older versions, use Command + J, or CTRL + J.

Another approach is seen in the demo animations on sublimetext.com. Using multiple selections, Ctrl+Shift+L is used to split a selection into lines, and each line is then edited simultaneously. end + del will then remove all line breaks. This can be seen in slide 2/6 at http://sublimetexttips.com/7-handy-text-manipulation-tricks-sublime-text-2/

于 2013-03-10T19:45:29.493 に答える
48

Delデモでは、行末にカーソルを置いて、複数選択でを押していると思います。このように\nして、選択したすべての行で が削除されます。

于 2012-11-27T08:00:13.057 に答える
7

編集

join 次の行を現在の行に結合し、その間のすべての空白を単一のスペースに置き換えます

http://www.sublimetext.com/docs/commands

メニューの編集オプションに移動し、[編集] -> [線] -> [線を結合]

于 2014-04-01T05:51:51.173 に答える