Using IntelliJ IDEA as the Vim Editor
转载自https://www.jetbrains.com/help/idea/using-intellij-idea-as-the-vim-editor.html
This feature is only supported in the Ultimate edition.
The following is only valid when IdeaVim Plugin is installed and enabled!
Before you start
Make sure that:
- You are working with IntelliJ IDEA version 15.0.0 or higher. If you still do not have IntelliJ IDEA, download it from this page. To install IntelliJ IDEA, follow the instructions, depending on your platform.
Downloading and installing IdeaVim plugin
On the toolbar of the IntelliJ IDEA main window, press Ctrl+Alt+S to open the Settings/Preferences dialog, and then click Plugins settings.
You see the list of plugins currently installed on you computer. However, the IdeaVim plugin is not among them. Click the button Browse JetBrains plugins. IntelliJ IDEA shows the contents of the huge JetBrains repository... you can type the word "vim" in the search field to narrow down the list:

After installing the plugin, it actually becomes available after IntelliJ IDEA restart.

What happens to IntelliJ IDEA's UI after restart?
First, on the Tools menu, a check command Vim Emulator appears:

After IntelliJ IDEA restart, this check command is selected. You can disable Vim by clearing this check command.
Second, in Settings/Preferences dialog, an additional page Vim Emulation appears after restart.
Configuring shortcuts
Both Vim and IntelliJ IDEA are keyboard-centric. With IdeaVim plugin, it is quite possible that IntelliJ IDEA's keymap runs into a conflict with the Vim keymap. That's why IntelliJ IDEA allows you choosing which keyboard shortcut you prefer for a certain action. This is how it's done.
Open Settings/Preferences dialog, and click Vim Emulation:

In the Shortcut column, select the shortcut you want to configure. Next, in the Handler column, click the corresponding cell, and see the drop-down list of three possible options (Undefined, IDE, Vim):

If you choose IDE, it means that the IntelliJ IDEA's shortcut for this particular action is enabled. When you press, say, Ctrl+Z, IntelliJ IDEA silently performs its action.
If you leave the handler undefined, then, on pressing the shortcut, say, Ctrl+B, IntelliJ IDEA shows the banner.
You can choose to redefine this shortcut as an IDE shortcut and thus accept the IntelliJ IDEA's keymap. To do so, click the link IDE shortcut.
If you click the down arrow and then the link Vim Emulation, then IntelliJ IDEA will show the Vim Emulation page of the Settings/Preferences dialog.
For the purposes of this tutorial, click the link Vim Emulation. Then, when you press Ctrl+B, IntelliJ IDEA will perform the Vim action for this keyboard shortcut.
Editing modes
OK, now that you have Vim enabled, you see that the cursor has changed its shape - now it is a block, which means that you are in the Normal mode :

If you want to enter the Insert mode, press i, and the cursor will turn into a line:

In this mode you can type new or change the existing code. Same way, you can enter the various Vim modes: for example, press r for theReplace mode.
By the way, as soon as you enter Vim emulation, it is also reported in the Status bar.

To return to the Normal mode, press Escape.
SEE ALSO
EXTERNAL LINKS:
Using IntelliJ IDEA as the Vim Editor的更多相关文章
- spf13-vim – The Ultimate Distribution for Vim Editor
spf13-vim is a cross platform and highly customizable assortment of vim plugins and various resource ...
- Amazon.com: NEW VI AND VIM EDITOR KEYBOARD STICKER: Office Products
Amazon.com: NEW VI AND VIM EDITOR KEYBOARD STICKER: Office Products NEW VI AND VIM EDITOR KEYBOARD S ...
- 在IntelliJ IDEA中使用VIM
IdeaVim(下载)插件可以让你在IntelliJ IDEA中键盘敲的飞起. 安装 打开IDEA的设置,在Plugins里,你可以选择在线搜索Vim安装,当然如果不行,就可以选择单独下载后安装,以下 ...
- 教你在 IntelliJ IDEA 中使用 VIM!
Java技术栈 www.javastack.cn 优秀的Java技术公众号 IdeaVim(下载)插件可以让你在IntelliJ IDEA中键盘敲的飞起. 安装 打开IDEA的设置,在Plugins里 ...
- 高效编程:在IntelliJ IDEA中使用VIM
硬核干货分享,欢迎关注[Java补习课]成长的路上,我们一起前行 ! <高可用系列文章> 已收录在专栏,欢迎关注! 概述 Vim是一个功能强大.高度可定制的文本编辑器; 具体有多强大,我现 ...
- Solarized Colorscheme for IntelliJ IDEA
Solarized Colorscheme for IntelliJ IDEA Original Solarized color scheme developed by Ethan Schoonove ...
- Vim ide for shell development
Source : This article is part of the ongoing Vi / Vim Tips and Tricks Series. As a Linux sysadmin or ...
- CentOS安装vim
VMware下CentOS安装成功后,默认自带vi,但vi功能没vim丰富.以下为CentOS中安装vim: 用yum产看源中的vim安装包: [xi@localhost ~]$ yum search ...
- vi/vim使用指北 ---- Learning the vi and Vim Editors 读书 笔记
vi/vim作为liux系统下最强大,最流行的文本编辑器之一.边看<Learning the vi and vim Editor>边学习vim,顺便做写简单的笔记,供以后查询. 没看这本书 ...
随机推荐
- 动车上的书摘-java网络 连接服务器
摘要: 摘要: 原创出处: http://www.cnblogs.com/Alandre/ 泥沙砖瓦浆木匠 希望转载,保留摘要,谢谢! 应该有些延迟,你会看到黑幕中弹出 来自USA的X原子的计量时间: ...
- xml文件配置新增与读取
xml文件 <?xml version="1.0" encoding="utf-8" ?> <Config> <dbtype> ...
- 一套能体现 RBAC 的表结构设计
1.RBAC 概述 2.表结构设计 2.1.用户表 2.2.角色表 2.3.权限表 2.4.用户角色(关系)表 2.5.角色权限(关系)表 3.总结 1.RBAC 概述 RBAC(Role-Based ...
- Linux 命令 —— iconv 转换编码
iconv 是 Linux 系统自带的用于转换文件编码的命令行工具. 命令参数 使用 iconv --help 命令查看命令帮助信息: 用法: iconv [OPTION...] [-f ENCODI ...
- 五种IO模型透彻分析
1.基础 在引入IO模型前,先对io等待时某一段数据的"经历"做一番解释.如图: 当某个程序或已存在的进程/线程(后文将不加区分的只认为是进程)需要某段数据时,它只能在用户空间中属 ...
- Docker虚拟机理论
Docker虚拟机架构 ◆ Docker架构 Docker创建的所有虚拟实例共用同一个Linux内核,对硬件占用较小,属于轻量级虚拟机 Docker镜像与容 ...
- Java 学习笔记 执行外部命令 包装类 枚举类型
执行外部命令 Runtime只能通过静态方法getRuntime获得,可以用来执行外部的命令 Runtime runtime = Runtime.getRuntime(); runtime.exec( ...
- (8)Jquery1.8.3快速入门_可见性选择器
一.Jquery的可见性选择器: 可见性选择器: 1.:visable 筛选可以见的元素 2. :hidden 筛选不可见的元素 效果: 源码: <!DOCTYPE html> <h ...
- python多线程-共享全局变量
目录 多线程-共享全局变量 多线程-共享全局变量 列表当作实参传递到线程中 总结 多线程-共享全局变量问题 多线程开发可能遇到的问题 测试1 测试2 多线程-共享全局变量 多线程-共享全局变量 imp ...
- Mac下安装最新版本的Graphviz
由于版本兼容问题,Mac下Graphviz之前一直装的是低版本的2.36.高版本的安装方法如下: 1.log in & download Xcode an Xcode Command Line ...