惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - 蔡秋心

Windows Azure VM的两种shut down 方式 转贴: A Simple c# Wrapper for ffMpeg PowerShell: 找到一个目录下最新的文件 PowerShell: 如何解决File **.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get- help about_sig" for more de 在localhost上使用fiddler 在SQL Server Business Intelligence Development Studio中编辑Dynamcis CRM中的Report Report Design: Best Practices and Guidelines Visual Studio使用小技巧6 – 为代码加上Using(Resolve using)和管理Using(Organize using) Visual Studio使用小技巧4 – Where am I(在Solution Explorer中显示当前文档) Visual Studio使用小技巧3 – 标签分组(Tab Group)和分割窗口(Split window) Visual Studio使用小技巧2 – 使用任务列表(task list) - 补充 Visual Studio使用小技巧2 – 使用任务列表(task list) Visual Studio使用小技巧1 – HTML编辑器中的格式化 部署Dotnetnuke Site到虚拟目录和端口不为80的网站 asp.net使用COM组件需要的权限设置 前台线程(Foreground Threads)和后台线程(Background Threads) 在Dynamics CRM 的 Entity Form中显示记录的ID的方法 如何使用VS2005创建web安装包 使用Visual Studio中的Item Template
Visual Studio使用小技巧5 – 区块选择(box selection)的拷贝(copy)和粘贴(paste)
蔡秋心 · 2011-04-01 · via 博客园 - 蔡秋心

区块选择(box selection)大家应该都很熟悉了,就是按住Alt键,然后拖动鼠标,跨越多行,释放鼠标后会将区块内的内容都选上。

image

下面列出些区块选择(box selection)相关的技巧,不过大部分只在vs2010中支持。


1. 从一个区块中copy内容到另一个区块中

Versions:  2008,2010

假设你有下面的代码:

image

你意识到你想将第一部分的变量依次声明称第二部分的变量同样的类型。

首先选中(ALT+鼠标左键)第二部分变量的类型,并copy。

image

然后选中第一部分的变量类型(ALT+鼠标左键)

image

最后粘贴(paste)

image

翻译自: Pasting the contents of one box selection into another -- zainnab

2. 替换区块中的内容

Versions:  2010

2010的功能,让你可以一次性替换区块内的所有行的内容。

首先选择区块

image

然后敲入要替换的内容

image

翻译自Replacing text with a box selection -- zainnab

3.  将单行内容copy到区块中

Versions:  2010

类似于第二条"代替区块中的内容",不同的是用粘贴代替输入。

假设你有下面的代码

image

你意识到你想将int改成double,没问题!选中double,并赋值(Ctrl +C)

image

区块选中int(ALT+鼠标左键)

image

最后,粘贴(Ctrl + V)

image

翻译自Pasting a single selection into a box selection -- zainnab

4.  零长度的区块选择

Versions:  2010

我在vs2008中试过了,确实不支持零长度的区块选择。

假设你有下面的代码,你想声明它们为public.

image

首先,进行零长度区块选择,按住Alt键和鼠标左键,向下拖动。像这样

image

然后松开Alt键和鼠标左键,就可以开始粘贴或者敲入public了。

image

翻译自: Zero-length box selection-- zainnab