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

推荐订阅源

B
Blog
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
罗磊的独立博客
J
Java Code Geeks
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
Jina AI
Jina AI
F
Fortinet All Blogs
H
Help Net Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
C
Check Point Blog
GbyAI
GbyAI

博客园 - 蔡秋心

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)的拷贝(...
蔡秋心 · 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