原文链接:http://devlog.en.alt-area.org/?p=1098

How to split one file into two views in Sublime Text2

You will often be coding while comparing the two places of the same file. Of course, Sublime Text2 can display vertical or horizontal split view of one file.

However, it is a little hard to understand how to do it. So, I will explain it. (In the following description, the key assignment is assumed to Windows.)

  1. Split window by View > Layout (alt + shift + num)
    Each view divided here is recognized as each “group”.
  2. Make file clone by File > “New View into File”
    Another tab of the file is made in the same group.
  3. Move to another tab by dragging & dropping the tab made in 2, or View > “Move File To Group” (Ctrl + num).

At least, you can display the same file into two groups.

To Make Shortcut for “New View into File”

By default, any shortcut is not assigned in the menu “New View into File”. If you want to assign it to “alt + shift + c”, open the definition file by Preferences > “Key Bindings – User” and add the following definition between [ ].

 
1
{ "keys": ["alt+shift+c"], "command": "clone_file" }

If you already have other definitions, add “,” after the last definition and the definition above. I think it will be as follows.

 
1
2
3
4
5
[
   { Definition1 },
   { Definition2 },
   { "keys": ["alt+shift+c"], "command": "clone_file" }
]

Use “SimpleClone”

Even if you define the shortcut in this way, it is cumbersome to take 3 steps: Split View > Clone File > Move Clone to Another Group. At such times, you may use a plug-in called “SimpleClone”.

If you already installed “Package Control”, you can install by Tools > “Command Palette…” > “Package Control: Install Package” > SimpleClone.

There are menu in View > SimpleClone and shortcut is as follows.
Ctrl + Shift + right: Split to right
Ctrl + Shift + down: Split down
Ctrl + Alt + Shift + n: Make clone in new window

Sublime Text怎么在切分两行视口内显示同一个文件的更多相关文章

  1. sublime text 3插件改造之添加从模版新增文件到指定目录

    简介:以前使用ST2里面的Sublime NFFT插件比较顺手,最近安装了ST3,但是Sublime NFFT插件不支持ST3,就下载了SublimeTmpl从模版新建文件插件.在使用时,习惯在侧边栏 ...

  2. Sublime Text 3中设置不记住上次打开的文件

    转自:https://blog.csdn.net/nicholaszao/article/details/79575251 在”User/Preferences.sublime-settings”配置 ...

  3. Sublime Text 全程指引 by Lucida

    作者:Lucida 微博:@peng_gong 豆瓣:@figure9 博客园:@figure9 原文链接:http://zh.lucida.me/blog/sublime-text-complete ...

  4. 如何优雅地使用Sublime Text

    Sublime Text:一款具有代码高亮.语法提示.自动完成且反应快速的编辑器软件,不仅具有华丽的界面,还支持插件扩展机制,用她来写代码,绝对是一种享受.相比于难于上手的Vim,浮肿沉重的Eclip ...

  5. Sublime Text 3 全程详细图文原创教程(持续更新中。。。)

    一. 前言 使用Sublime Text 也有几个年头了,版本也从2升级到3了,但犹如寒天饮冰水,冷暖尽自知.最初也是不知道从何下手,满世界地查找资料,但能查阅到的资料,苦于它们的零碎.片面,不够系统 ...

  6. 全栈开发必备的10款Sublime Text 插件

    Sublime Text 具有漂亮的用户界面和强大的功能,例如代码缩略图,多重选择,快捷命令等.Sublime Text 更妙的是它的可扩展性.所以,这里挑选了全栈开发必备的10款 Sublime T ...

  7. 全栈开发必备的10款 Sublime Text 插件

    Sublime Text 具有漂亮的用户界面和强大的功能,例如代码缩略图,多重选择,快捷命令等.Sublime Text 更妙的是它的可扩展性.所以,这里挑选了全栈开发必备的10款 Sublime T ...

  8. 如何优雅地使用 Sublime Text

    Sublime Text:一款具有代码高亮.语法提示.自动完成且反应快速的编辑器软件,不仅具有华丽的界面,还支持插件扩展机制,用她来写代码,绝对是一种享受.相比 于难于上手的Vim,浮肿沉重的Ecli ...

  9. Sublime Text 全程指南

    摘要(Abstract) 本文系统全面的介绍了 Sublime Text,旨在成为最优秀的 Sublime Text 中文教程. 更新记录 2014/09/27:完成初稿 2014/09/28: 更正 ...

随机推荐

  1. markdown语法学习笔记

    ##1.**标题** # 一级标题 ## 二级标题   ### 三级标题 #### 四级标题 ##### 五级标题 ###### 六级标题 ##2.**加粗** 首尾各加两个*号   ##3.*斜字体 ...

  2. C# 文件和文件夹操作

    一.文件操作 1.File类的常用静态方法: void AppendAllText(string path, string contents),将文本contents附加到文件path中 bool E ...

  3. 求最大连续bit数

    描述 功能: 求一个byte数字对应的二进制数字中1的最大连续数,例如3的二进制为00000011,最大连续2个1    输入: 一个byte型的数字    输出: 无     返回: 对应的二进制数 ...

  4. Bootstrap Chart组件使用分享

    图表组件Chart.js是Bootstrap比较好用的组件之一,与一款收费的组件highchart类似,效果上来看免费与收费的产品相差还是有一点点的,不过功能上差不多能满足我们项目的需要.下面这段JS ...

  5. 20145337实验三实验报告——敏捷开发与XP实践

    20145337实验三实验报告--敏捷开发与XP实践 实验名称 敏捷开发与XP实践 实验内容 XP基础 XP核心实践 相关工具 ** 实验步骤**### 敏捷开发与XP 软件工程包括下列领域:软件需求 ...

  6. HTML中id、name、class 区别

    参考:http://www.cnblogs.com/polk6/archive////.html http://blog.csdn.net/ithomer/article/details/ HTML ...

  7. Java序列化机制

    java的序列化机制支持将对象序列化为本地文件或者通过网络传输至别处, 而反序列化则可以读取流中的数据, 并将其转换为java对象. 被序列化的类需要实现Serializable接口, 使用Objec ...

  8. C++产生随机数四则运算

    产生两位随机整数,随机四则运算符,生成30道运算题. 一.编程思路 看到要求,首先想到的是怎么运用随机数,因为自己对随机数的不熟练所以还要在查很多东西.在一个for循环内先产生两个30以内的随机数,在 ...

  9. 影响 PHP 行为的扩展和网络函数

    <?php /* * * 影响 PHP 行为的扩展 * PHP 选项和信息 * * assert_options — 设置/获取断言的各种标志 assert — 检查一个断言是否为 FALSE ...

  10. Windows下获取本机IP地址方法介绍

    Windows下获取本机IP地址方法介绍 if((hostinfo = gethostbyname(name)) != NULL) { #if 1 ; printf("IP COUNT: % ...