如何在 SublimeText 中用引号将每一行括起来? [英] How to wrap each line in quotes in SublimeText?

查看:98
本文介绍了如何在 SublimeText 中用引号将每一行括起来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

输入:

boston beach summer figural yellow blue
boston floral flowers still still-life food pink figural
boston horse pink purple house flowers floral figural

预期输出:

"boston beach summer figural yellow blue"
"boston floral flowers still still-life food pink figural"
"boston horse pink purple house flowers floral figural"

实际输入文件有 600 多行,我正在寻找一种将每一行括在引号中的快速方法?该方法是否涉及使用多个游标?宏呢?

The actual input file has 600+ lines, and I'm looking at a quick way to wrap each line in quotes? Does the method involve using multiple cursors? How about macros?

推荐答案

我会像这样使用多游标方法:

I would use a multiple cursors approach like this:

Windows

  1. Ctrl + A(全选)
  2. Ctrl + Shift + L(分行)
  3. End(将光标放在行尾)
  4. "(在行尾添加引号)
  5. Home(转到行的第一个字符)
  6. Home(转到行首...就像有制表符或空格一样)
  7. "(在行首添加引号)
  1. Ctrl + A (Select everything)
  2. Ctrl + Shift + L (Split into lines)
  3. End (Put the cursor at the end of the line)
  4. " (Add the quote at the end of the line)
  5. Home (Go to the first character of the line)
  6. Home (Go to the beginning of the line... like if you have tabs or spaces)
  7. " (Add the quote at the beginning of the line)

Mac

  1. Cmd + A(全选)
  2. Cmd + Shift + L(分行)
  3. Cmd + (将光标放在行尾)
  4. "(在行尾添加引号)
  5. Cmd + (转到该行的第一个字符)
  6. Cmd + (转到行首......就像你有制表符或空格一样)
  7. "(在行首添加引号)
  1. Cmd + A (Select everything)
  2. Cmd + Shift + L (Split into lines)
  3. Cmd + (Put the cursor at the end of the line)
  4. " (Add the quote at the end of the line)
  5. Cmd + (Go to the first character of the line)
  6. Cmd + (Go to the beginning of the line... like if you have tabs or spaces)
  7. " (Add the quote at the beginning of the line)

这篇关于如何在 SublimeText 中用引号将每一行括起来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆