mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-09 00:34:07 +02:00
*** empty log message ***
This commit is contained in:
parent
f5516d3335
commit
d8092b5913
73
web/faq.php
Normal file
73
web/faq.php
Normal file
@ -0,0 +1,73 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>IdeaVIM - Frequently Asked Questions</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php include 'header.php'; ?>
|
||||
|
||||
<h1>Frequently Asked Questions</h1>
|
||||
|
||||
<a href="#noplugin">
|
||||
The <code>Tools</code> menu doesn't have a new option called <code>VIM Emulator</code>
|
||||
</a><br>
|
||||
<a href="#nokeymap">
|
||||
There is no "vim" keymap listed after selecting the <code>Options|Keymaps</code> menu
|
||||
</a><br>
|
||||
<a href="#pluginoff">
|
||||
Everything is installed properly but I just can't seem to enter VIM commands
|
||||
</a><br>
|
||||
<a href="#turnoff">
|
||||
How do I turn off the VIM plugin once it is installed?
|
||||
</a><br>
|
||||
<!--
|
||||
<a href="#">
|
||||
</a><br>
|
||||
-->
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<a name="noplugin"></a>
|
||||
The <code>Tools</code> menu doesn't have a new option called <code>VIM Emulator</code>
|
||||
</dt>
|
||||
<dd>
|
||||
This most likely means you did not properly copy the plugin jar file into the plugins directory of IDEA. Please make
|
||||
sure you have copied the IdeaVIM.jar file from the installation download into the plugins directory.
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="nokeymap"></a>
|
||||
There is no "vim" keymap listed after selecting the <code>Options|Keymaps</code> menu
|
||||
</dt>
|
||||
<dd>
|
||||
Have you verified that you copied the vim.xml file from the installation download into the
|
||||
<HOME>/.IntelliJIdea/config/keymaps directory?
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="pluginoff"></a>
|
||||
Everything is installed properly but I just can't seem to enter VIM commands
|
||||
</dt>
|
||||
<dd>
|
||||
Select the <code>Tools</code> menu and make sure the menu <code>VIM Emulator</code> has a checkmark next to it. Also
|
||||
select the <code>Options|Keymaps</code> menu and make sure the "vim" keymap says "active" next to it. If not, select
|
||||
the "vim" keymap and press the <code>Set Active</code> button.
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="turnoff"></a>
|
||||
How do I turn off the VIM plugin once it is installed?
|
||||
</dt>
|
||||
<dd>
|
||||
If you wish to temporarily turn off the VIM plugin you must select the <code>Tools</code> menu an uncheck the
|
||||
<code>VIM Emulator</code> menu. You must also select the <code>Options|Keymaps</code> menu and make some other
|
||||
keymap active other than "vim". Reverse this process to turn the VIM emulator back on. These settings will be saved
|
||||
and the next time you start IDEA, it will be in the same state as you left it.
|
||||
</dd>
|
||||
<!--
|
||||
<dt>
|
||||
<a name=""></a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
-->
|
||||
</dl>
|
||||
|
||||
</body>
|
||||
</html>
|
8
web/header.php
Normal file
8
web/header.php
Normal file
@ -0,0 +1,8 @@
|
||||
<div align="center">
|
||||
<a href="index.php">Home</a>
|
||||
| <a href="vim/index.txt">Reference</a>
|
||||
| <a href="http://sourceforge.net/project/showfiles.php?group_id=79039">Download</a>
|
||||
| <a href="http://sourceforge.net/tracker/?group_id=79039&atid=555309">Bug Reporting</a>
|
||||
| <a href="http://sourceforge.net/cvs/?group_id=79039">CVS Access</a>
|
||||
| <a href="faq.php">FAQ</a>
|
||||
</div>
|
68
web/index.php
Normal file
68
web/index.php
Normal file
@ -0,0 +1,68 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>VIM Emulator Plugin for IntelliJ IDEA</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php include 'header.php'; ?>
|
||||
|
||||
<h1>VIM Emulator Plugin for IntelliJ IDEA</h1>
|
||||
|
||||
<h3>Introduction</h3>
|
||||
|
||||
<a href="http://www.intellij.com">IntelliJ IDEA</a> is an outstanding IDE for editing Java source code and other
|
||||
related files. However, it lacks one
|
||||
important feature - <code>vi</code> style commands for editing. I've been using <code>vi</code> and
|
||||
<a href="http://www.vim.org">VIM</a>
|
||||
for about 20 years. I'm used to it. I know the command keyboard shortcuts are cryptic and stange but I've been using
|
||||
it so long I just know how to use them and I find I am very efficient with them.
|
||||
<p>
|
||||
IDEA makes my Java editing even more efficient. Now, if I could only combine the features of IDEA with the quick and
|
||||
easy editing of VIM, life would be grand. A quick search revealed that there wasn't a feature filled VIM plugin so I
|
||||
took it upon myself to write one. This project is the result of my desire to keep using my old keyboard habits.
|
||||
<p>
|
||||
The goal of this plugin is to support as much VIM functionality as makes sense within the scope of IDEA. The plugin
|
||||
was actually written in IDEA using the VIM plugin once there was enough basic editing support. For the curious, the
|
||||
plugin is being written without any reference to the VIM source code. I'm basically using the excellent VIM
|
||||
documentation and VIM itself as a reference to verify correct behavior.
|
||||
<p>
|
||||
This plugin is meant for developers that already know, and probably love, vi/VIM. I make no attempt to teach users
|
||||
how to use the VIM commands and you will not find any sort of help from within IDEA on what the key mappings are.
|
||||
Within the pages of this website however, you will find a reference of all working commands.
|
||||
|
||||
<h3>Installation</h3>
|
||||
|
||||
Once you have downloaded the binary release or built it from source, you have three simple steps to perform to begin
|
||||
using IDEA in VIM Emulation mode:
|
||||
|
||||
<ol>
|
||||
<li>Copy <code>IdeaVIM.jar</code> to the plugins directory. This is at <code><IDEA_HOME>/plugins</code> where
|
||||
<code>IDEA_HOME</code> is IDEA installation directory.</li>
|
||||
<li>Copy <code>vim.xml</code> to <code><HOME>/.IntelliJIdea/config/keymaps</code> where <code>HOME</code>
|
||||
if your home directory on Unix or <code>C:\Documents and Settings\<user></code> on Windows.</li>
|
||||
<li>Restart IDEA and then select the <code>Options|Keymaps</code> menu. Select the <code>vim</code> keymap and make
|
||||
it the active keymap by pressing the <code>Set Active</code> button.</li>
|
||||
</ol>
|
||||
|
||||
You only need to do these steps the first time you install the plugin. You will find a new menu under
|
||||
<code>Tools</code> named <code>VIM Emulator</code>. It should be checked by default. If this menu is not present you
|
||||
did not copy the jar file to the plugins directory. If the <code>vim</code> keymap was not present then you did not
|
||||
copy the <code>vim.xml</code> file to the correct directory.
|
||||
|
||||
<h3>Download</h3>
|
||||
|
||||
You may obtain the plugin by visiting the files page on
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=79039">SourceForge</a>
|
||||
|
||||
<h3>Versions</h3>
|
||||
|
||||
The VIM plugin has been developed and tested with IntelliJ IDEA 3.0.2 (#695). It is not known at this time if older
|
||||
or newer versions will work correctly.
|
||||
|
||||
<hr>
|
||||
|
||||
<a href="http://sourceforge.net">
|
||||
<img src="http://sourceforge.net/sflogo.php?group_id=79039&type=5" width="210" height="62" border="0"
|
||||
alt="SourceForge.net Logo">
|
||||
</a>
|
||||
</body>
|
||||
</html>
|
470
web/vim/index.txt
Normal file
470
web/vim/index.txt
Normal file
@ -0,0 +1,470 @@
|
||||
*index.txt* For IdeaVIM version 0.1.0. Last change: 2003 Apr 17
|
||||
|
||||
|
||||
IdeaVIM REFERENCE MANUAL by Rick Maddy
|
||||
|
||||
*index*
|
||||
This file contains a list of all commands for each mode, with a tag and a
|
||||
short description. The lists are sorted on ASCII value.
|
||||
|
||||
==============================================================================
|
||||
1. Insert mode *insert-index*
|
||||
|
||||
tag char action ~
|
||||
-----------------------------------------------------------------------
|
||||
|i_CTRL-@| CTRL-@ insert previously inserted text and stop
|
||||
insert
|
||||
|i_CTRL-A| CTRL-A insert previously inserted text
|
||||
|i_CTRL-C| CTRL-C quit insert mode
|
||||
|i_CTRL-D| CTRL-D delete one shiftwidth of indent in the current
|
||||
line
|
||||
|i_CTRL-E| CTRL-E insert the character which is below the cursor
|
||||
|i_<BS>| <BS> delete character before the cursor
|
||||
|i_CTRL-H| CTRL-H same as <BS>
|
||||
|i_<Tab>| <Tab> insert a <Tab> character
|
||||
|i_CTRL-I| CTRL-I same as <Tab>
|
||||
|i_<NL>| <NL> same as <CR>
|
||||
|i_CTRL-J| CTRL-J same as <CR>
|
||||
|i_<CR>| <CR> begin new line
|
||||
|i_CTRL-M| CTRL-M same as <CR>
|
||||
|i_CTRL-N| CTRL-N find next match for keyword in front of the
|
||||
cursor
|
||||
|i_CTRL-O| CTRL-O execute a single command and return to insert
|
||||
mode
|
||||
|i_CTRL-P| CTRL-P find previous match for keyword in front of
|
||||
the cursor
|
||||
|i_CTRL-R| CTRL-R {0-9a-z"%#*:=}
|
||||
insert the contents of a register
|
||||
|i_CTRL-T| CTRL-T insert one shiftwidth of indent in current
|
||||
line
|
||||
|i_CTRL-W| CTRL-W delete word before the cursor
|
||||
|i_CTRL-Y| CTRL-Y insert the character which is above the cursor
|
||||
|i_<Esc>| <Esc> end insert mode
|
||||
|i_CTRL-[| CTRL-[ same as <Esc>
|
||||
|i_CTRL-]| CTRL-] insert live template...
|
||||
|i_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode
|
||||
|i_<Del>| <Del> delete character under the cursor
|
||||
|i_<Left>| <Left> cursor one character left
|
||||
|i_<S-Left>| <S-Left> cursor one word left
|
||||
|i_<C-Left>| <C-Left> cursor one word left
|
||||
|i_<Right>| <Right> cursor one character right
|
||||
|i_<S-Right>| <S-Right> cursor one word right
|
||||
|i_<C-Right>| <C-Right> cursor one word right
|
||||
|i_<Up>| <Up> cursor one line up
|
||||
|i_<S-Up>| <S-Up> same as <PageUp>
|
||||
|i_<Down>| <Down> cursor one line down
|
||||
|i_<S-Down>| <S-Down> same as <PageDown>
|
||||
|i_<Home>| <Home> cursor to start of line
|
||||
|i_<C-Home>| <C-Home> cursor to start of file
|
||||
|i_<End>| <End> cursor past end of line
|
||||
|i_<C-End>| <C-End> cursor past end of file
|
||||
|i_<PageUp>| <PageUp> one screenfull backward
|
||||
|i_<PageDown>| <PageDown> one screenfull forward
|
||||
|i_<Insert>| <Insert> toggle Insert/Replace mode
|
||||
|i_<LeftMouse>| <LeftMouse> cursor at mouse click
|
||||
|
||||
==============================================================================
|
||||
2. Normal mode *normal-index*
|
||||
|
||||
CHAR any non-blank character
|
||||
WORD a sequence of non-blank characters
|
||||
N a number entered before the command
|
||||
{motion} a cursor movement command
|
||||
Nmove the text that is moved over with a {motion}
|
||||
SECTION a section that possibly starts with '}' instead of '{'
|
||||
|
||||
note: 1 = cursor movement command; 2 = can be undone/redone
|
||||
|
||||
tag char note action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|CTRL-B| CTRL-B 1 scroll N screens Backwards
|
||||
|CTRL-D| CTRL-D scroll Down N lines (default: half a screen)
|
||||
|CTRL-E| CTRL-E scroll N lines upwards (N lines Extra)
|
||||
|CTRL-F| CTRL-F 1 scroll N screens Forward
|
||||
|<BS>| <BS> 1 same as "h"
|
||||
|CTRL-H| CTRL-H 1 same as "h"
|
||||
|<NL>| <NL> 1 same as "j"
|
||||
|CTRL-J| CTRL-J 1 same as "j"
|
||||
|<CR>| <CR> 1 cursor to the first CHAR N lines lower
|
||||
|CTRL-M| CTRL-M> 1 same as <CR>
|
||||
|CTRL-N| CTRL-N 1 same as "j"
|
||||
|CTRL-P| CTRL-P 1 cursor N lines upward
|
||||
|CTRL-R| CTRL-R 2 redo changes which were undone with 'u'
|
||||
|CTRL-U| CTRL-U scroll N lines Upwards (default: half a
|
||||
screen)
|
||||
|CTRL-Y| CTRL-Y scroll N lines downwards
|
||||
|CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op)
|
||||
|<Space>| <Space> 1 same as "l"
|
||||
|quote| "{a-zA-Z0-9.%#:-"} use buffer {a-zA-Z0-9.%#:-"} for next
|
||||
delete, yank or put (uppercase to append)
|
||||
({.%#:} only work with put)
|
||||
|$| $ 1 cursor to the end of Nth next line
|
||||
|%| % 1 find the next (curly/square) bracket on
|
||||
this line and go to its match, or go to
|
||||
matching comment bracket, or go to matching
|
||||
preprocessor directive.
|
||||
|N%| {count}% 1 go to N percentage in the file
|
||||
|'| '{a-zA-Z0-9} 1 cursor to the first CHAR on the line with
|
||||
mark {a-zA-Z0-9}
|
||||
|''| '' 1 cursor to the first CHAR of the line where
|
||||
the cursor was before the latest jump.
|
||||
|'<| '< 1 cursor to the first CHAR of the line where
|
||||
highlighted area starts/started in the
|
||||
current buffer.
|
||||
|'>| '> 1 cursor to the first CHAR of the line where
|
||||
highlighted area ends/ended in the current
|
||||
buffer.
|
||||
|'[| '[ 1 cursor to the first CHAR on the line of the
|
||||
start of last operated text or start of
|
||||
putted text
|
||||
|']| '] 1 cursor to the first CHAR on the line of the
|
||||
end of last operated text or end of putted
|
||||
text
|
||||
|+| + 1 cursor to the first CHAR N lines lower
|
||||
|,| , 1 repeat latest f, t, F or T in opposite
|
||||
direction N times
|
||||
|-| - 1 cursor to the first CHAR N lines higher
|
||||
|.| . 2 repeat last change with count replaced with
|
||||
N
|
||||
|/| /{pattern}<CR> 1 search forward for the Nth occurrence of
|
||||
{pattern}
|
||||
|count| 0 1 cursor to the first char of the line
|
||||
|count| 1 prepend to command to give a count
|
||||
|count| 2 "
|
||||
|count| 3 "
|
||||
|count| 4 "
|
||||
|count| 5 "
|
||||
|count| 6 "
|
||||
|count| 7 "
|
||||
|count| 8 "
|
||||
|count| 9 "
|
||||
|:| : 1 start entering an Ex command
|
||||
|N:| {count}: start entering an Ex command with range
|
||||
from current line to N lines down
|
||||
|;| ; 1 repeat latest f, t, F or T N times
|
||||
|<| <{motion} 2 shift Nmove lines one 'shiftwidth'
|
||||
leftwards
|
||||
|<<| << 2 shift N lines one 'shiftwidth' leftwards
|
||||
|==| == 2 filter N lines through "indent" (one line)
|
||||
|>| >{motion} 2 shift Nmove lines one 'shiftwidth'
|
||||
rightwards
|
||||
|>>| >> 2 shift N lines one 'shiftwidth' rightwards
|
||||
|?| ?{pattern}<CR> 1 search backward for the Nth previous
|
||||
occurrence of {pattern}
|
||||
|A| A 2 append text after the end of the line N times
|
||||
|B| B 1 cursor N WORDS backward
|
||||
|C| ["x]C 2 change from the cursor position to the end
|
||||
of the line, and N-1 more lines [into
|
||||
buffer x]; synonym for "c$"
|
||||
|D| ["x]D 2 delete the characters under the cursor
|
||||
until the end of the line and N-1 more
|
||||
lines [into buffer x]; synonym for "d$"
|
||||
|E| E 1 cursor forward to the end of WORD N
|
||||
|F| F{char} 1 cursor to the Nth occurrence of {char} to
|
||||
the left
|
||||
|G| G 1 cursor to line N, default last line
|
||||
|H| H 1 cursor to line N from top of screen
|
||||
|I| I 2 insert text before the first CHAR on the
|
||||
line N times
|
||||
|J| J 2 Join N lines; default is 2
|
||||
|K| K Show Quick JavaDoc for Keyword under the
|
||||
cursor
|
||||
|L| L 1 cursor to line N from bottom of screen
|
||||
|M| M 1 cursor to middle line of screen
|
||||
|N| N 1 repeat the latest '/' or '?' N times in
|
||||
opposite direction
|
||||
|O| O 2 begin a new line above the cursor and
|
||||
insert text, repeat N times
|
||||
|P| ["x]P 2 put the text [from buffer x] before the
|
||||
cursor N times
|
||||
|R| R 2 enter replace mode: overtype existing
|
||||
characters, repeat the entered text N-1
|
||||
times
|
||||
|S| ["x]S 2 delete N lines [into buffer x] and start
|
||||
insert; synonym for "^cc" or "0cc",
|
||||
depending on autoindent
|
||||
|T| T{char} 1 cursor till after Nth occurrence of {char}
|
||||
to the left
|
||||
|V| V start linewise Visual mode
|
||||
|W| W 1 cursor N WORDS forward
|
||||
|X| ["x]X 2 delete N characters before the cursor [into
|
||||
buffer x]
|
||||
|Y| ["x]Y yank N lines [into buffer x]; synonym for
|
||||
"yy"
|
||||
|ZZ| ZZ store current file if modified, and exit
|
||||
|ZQ| ZQ exit current file always
|
||||
|[| [{char} square bracket command (see below)
|
||||
|]| ]{char} square bracket command (see below)
|
||||
|^| ^ 1 cursor to the first CHAR of the line
|
||||
|_| _ 1 cursor to the first CHAR N - 1 lines lower
|
||||
|`| `{a-zA-Z0-9} 1 cursor to the mark {a-zA-Z0-9}
|
||||
|`<| `< 1 cursor to the start of the highlighted area
|
||||
|`>| `> 1 cursor to the end of the highlighted area
|
||||
|`[| `[ 1 cursor to the start of last operated text
|
||||
or start of putted text
|
||||
|`]| `] 1 cursor to the end of last operated text or
|
||||
end of putted text
|
||||
|``| `` 1 cursor to the position before latest jump
|
||||
|a| a 2 append text after the cursor N times
|
||||
|b| b 1 cursor N words backward
|
||||
|c| ["x]c{motion} 2 delete Nmove text [into buffer x] and start
|
||||
insert
|
||||
|cc| ["x]cc 2 delete N lines [into buffer x] and start
|
||||
insert
|
||||
|d| ["x]d{motion} 2 delete Nmove text [into buffer x]
|
||||
|dd| ["x]dd 2 delete N lines [into buffer x]
|
||||
|e| e 1 cursor forward to the end of word N
|
||||
|f| f{char} 1 cursor to Nth occurrence of {char} to the
|
||||
right
|
||||
|g| g{char} extended commands, see below
|
||||
|h| h 1 cursor N chars to the left
|
||||
|i| i 2 insert text before the cursor N times
|
||||
|j| j 1 cursor N lines downward
|
||||
|k| k 1 cursor N lines upward
|
||||
|l| l 1 cursor N chars to the right
|
||||
|m| m{A-Za-z} set mark {A-Za-z} at cursor position
|
||||
|n| n 1 repeat the latest '/' or '?' N times
|
||||
|o| o 2 begin a new line below the cursor and
|
||||
insert text, repeat N times
|
||||
|p| ["x]p 2 put the text [from register x] after the
|
||||
cursor N times
|
||||
|r| r{char} 2 replace N chars with {char}
|
||||
|s| ["x]s 2 (substitute) delete N characters [into
|
||||
buffer x] and start insert
|
||||
|t| t{char} 1 cursor till before Nth occurrence of {char}
|
||||
to the right
|
||||
|u| u 2 undo changes
|
||||
|v| v start characterwise Visual mode
|
||||
|w| w 1 cursor N words forward
|
||||
|x| ["x]x 2 delete N characters under and after the
|
||||
cursor [into buffer x]
|
||||
|y| ["x]y{motion} yank Nmove text [into buffer x]
|
||||
|yy| ["x]yy yank N lines [into buffer x]
|
||||
|z| z{char} commands starting with 'z', see below
|
||||
|bar| | 1 cursor to column N
|
||||
|~| ~ 2 switch case of N characters
|
||||
under cursor and move the cursor N
|
||||
characters to the right
|
||||
|<C-End>| <C-End> 1 same as "G"
|
||||
|<C-Home>| <C-Home> 1 same as "gg"
|
||||
|<C-Left>| <C-Left> 1 same as "b"
|
||||
|<C-Right>| <C-Right> 1 same as "w"
|
||||
|<Del>| ["x]<Del> 2 same as "x"
|
||||
|N<Del>| {count}<Del> remove the last digit from {count}
|
||||
|<Down>| <Down> 1 same as "j"
|
||||
|<End>| <End> 1 same as "$"
|
||||
|<Home>| <Home> 1 same as "0"
|
||||
|<Insert>| <Insert> 2 same as "i"
|
||||
|<Left>| <Left> 1 same as "h"
|
||||
|<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position
|
||||
|<PageDown>| <PageDown> same as CTRL-F
|
||||
|<PageUp>| <PageUp> same as CTRL-B
|
||||
|<Right>| <Right> 1 same as "l"
|
||||
|<S-Down>| <S-Down> 1 same as CTRL-F
|
||||
|<S-Left>| <S-Left> 1 same as "b"
|
||||
|<S-Right>| <S-Right> 1 same as "w"
|
||||
|<S-Up>| <S-Up> 1 same as CTRL-B
|
||||
|<Up>| <Up> 1 same as "k"
|
||||
|
||||
==============================================================================
|
||||
2.1 Text objects *objects*
|
||||
|
||||
These can be used after an operator or in Visual mode to select an object.
|
||||
|
||||
tag command action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
==============================================================================
|
||||
2.2 Window commands *CTRL-W*
|
||||
|
||||
tag command action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
==============================================================================
|
||||
2.3 Square bracket commands *[* *]*
|
||||
|
||||
tag char note action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
==============================================================================
|
||||
2.4 Commands starting with 'g' *g*
|
||||
|
||||
tag char note action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|g$| g$ 1 when 'wrap' off go to rightmost character of
|
||||
the current line that is on the screen;
|
||||
when 'wrap' on go to the rightmost character
|
||||
of the current screen line
|
||||
|g0| g0 1 when 'wrap' off go to leftmost character of
|
||||
the current line that is on the screen;
|
||||
when 'wrap' on go to the leftmost character
|
||||
of the current screen line
|
||||
|gD| gD 1 go to definition of word under the cursor
|
||||
in current file
|
||||
|gE| gE 1 go backwards to the end of the previous
|
||||
WORD
|
||||
|gI| gI 2 like "I", but always start in column 1
|
||||
|gJ| gJ 2 join lines without inserting space
|
||||
|gU| gU{motion} 2 make Nmove text uppercase
|
||||
|g^| g^ 1 when 'wrap' off go to leftmost non-white
|
||||
character of the current line that is on
|
||||
the screen; when 'wrap' on go to the
|
||||
leftmost non-white character of the current
|
||||
screen line
|
||||
|gd| gd 1 go to definition of word under the cursor
|
||||
in current function
|
||||
|ge| ge 1 go backwards to the end of the previous
|
||||
word
|
||||
|gg| gg 1 cursor to line N, default first line
|
||||
|gi| gi 2 like "i", but first move to the |'^| mark
|
||||
|gj| gj 1 like "j", but when 'wrap' on go N screen
|
||||
lines down
|
||||
|gk| gk 1 like "k", but when 'wrap' on go N screen
|
||||
lines up
|
||||
|gm| gm 1 go to character at middle of the screenline
|
||||
|go| go 1 cursor to character N in the buffer
|
||||
|gu| gu{motion} 2 make Nmove text lowercase
|
||||
|gv| gv reselect the previous Visual area
|
||||
|g~| g~{motion} 2 swap case for Nmove text
|
||||
|g<Down>| g<Down> 1 same as "gj"
|
||||
|g<End>| g<End> 1 same as "g$"
|
||||
|g<Home>| g<Home> 1 same as "g0"
|
||||
|g<Up>| g<Up> 1 same as "gk"
|
||||
|
||||
==============================================================================
|
||||
2.5 Commands starting with 'z' *z*
|
||||
|
||||
tag char note action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|z<CR>| z<CR> redraw, cursor line to top of window,
|
||||
cursor on first non-blank
|
||||
|z-| z- redraw, cursor line at bottom of window,
|
||||
cursor on first non-blank
|
||||
|z.| z. redraw, cursor line to center of window,
|
||||
cursor on first non-blank
|
||||
|zb| zb redraw, cursor line at bottom of window
|
||||
|zc| zc close a fold
|
||||
|zo| zo open fold
|
||||
|zt| zt redraw, cursor line at top of window
|
||||
|zz| zz redraw, cursor line at center of window
|
||||
|
||||
==============================================================================
|
||||
3. Visual mode *visual-index*
|
||||
|
||||
Most commands in Visual mode are the same as in Normal mode. The ones listed
|
||||
here are those that are different.
|
||||
|
||||
tag command note action in Visual mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode
|
||||
|v_:| : start a command-line with the highlighted
|
||||
lines as a range
|
||||
|v_<| < 2 shift the highlighted lines one
|
||||
'shiftwidth' left
|
||||
|v_=| = 2 Reformat the highlighted lines
|
||||
|v_>| > 2 shift the highlighted lines one
|
||||
'shiftwidth' right
|
||||
|v_C| C 2 delete the highlighted lines and start
|
||||
insert
|
||||
|v_D| D 2 delete the highlighted lines
|
||||
|v_J| J 2 join the highlighted lines
|
||||
|v_O| O Move horizontally to other corner of area.
|
||||
Q does not start Ex mode
|
||||
|v_R| R 2 delete the highlighted lines and start
|
||||
insert
|
||||
|v_S| S 2 delete the highlighted lines and start
|
||||
insert
|
||||
|v_U| U 2 make highlighted area uppercase
|
||||
|v_V| V make Visual mode linewise or stop Visual
|
||||
mode
|
||||
|v_X| X 2 delete the highlighted lines
|
||||
|v_Y| Y yank the highlighted lines
|
||||
|v_c| c 2 delete highlighted area and start insert
|
||||
|v_d| d 2 delete highlighted area
|
||||
|v_gJ| gJ 2 join the highlighted lines without
|
||||
inserting spaces
|
||||
|v_gq| gq 2 format the highlighted lines
|
||||
|v_gv| gv exchange current and previous highlighted
|
||||
area
|
||||
|v_o| o move cursor to other corner of area
|
||||
|v_r| r 2 delete highlighted area and start insert
|
||||
|v_s| s 2 delete highlighted area and start insert
|
||||
|v_u| u 2 make highlighted area lowercase
|
||||
|v_v| v make Visual mode characterwise or stop
|
||||
Visual mode
|
||||
|v_x| x 2 delete the highlighted area
|
||||
|v_y| y yank the highlighted area
|
||||
|v_~| ~ 2 swap case for the highlighted area
|
||||
|
||||
==============================================================================
|
||||
4. Command-line editing *ex-edit-index*
|
||||
|
||||
Get to the command-line with the ':', '/' or '?' commands.
|
||||
Normal characters are inserted at the current cursor position.
|
||||
|
||||
|c_CTRL-B| CTRL-B cursor to begin of command-line
|
||||
|c_CTRL-C| CTRL-C same as <ESC>
|
||||
|c_CTRL-E| CTRL-E cursor to end of command-line
|
||||
|c_<BS>| <BS> delete the character in front of the cursor
|
||||
|c_CTRL-H| CTRL-H same as <BS>
|
||||
|c_<NL>| <NL> same as <CR>
|
||||
|c_CTRL-J| CTRL-J same as <CR>
|
||||
|c_<CR>| <CR> execute entered command
|
||||
|c_<CR>| CTRL-M same as <CR>
|
||||
|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
|
||||
insert the contents of a register or object
|
||||
under the cursor as if typed
|
||||
|c_CTRL-U| CTRL-U remove all characters up to cursor
|
||||
|c_CTRL-W| CTRL-W delete the word in front of the cursor
|
||||
|c_<Esc>| <Esc> abandon command-line without executing it
|
||||
|c_<Esc>| CTRL-[ same as <Esc>
|
||||
|c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line
|
||||
|c_<Del>| <Del> delete the character under the cursor
|
||||
|
||||
|c_<Left>| <Left> cursor left
|
||||
|c_<S-Left>| <S-Left> cursor one word left
|
||||
|c_<C-Left>| <C-Left> cursor one word left
|
||||
|c_<Right>| <Right> cursor right
|
||||
|c_<S-Right>| <S-Right> cursor one word right
|
||||
|c_<C-Right>| <C-Right> cursor one word right
|
||||
|c_<Home>| <Home> cursor to start of command-line
|
||||
|c_<End>| <End> cursor to end of command-line
|
||||
|c_<Insert>| <Insert> toggle insert/overstrike mode
|
||||
|c_<LeftMouse>| <LeftMouse> cursor at mouse click
|
||||
|
||||
==============================================================================
|
||||
5. EX commands *ex-cmd-index* *:index*
|
||||
|
||||
This is a brief but complete listing of all the ":" commands, without
|
||||
mentioning any arguments. The optional part of the command name is inside [].
|
||||
The commands are sorted on the non-optional part of their name.
|
||||
|
||||
|:<| :< shift lines one 'shiftwidth' left
|
||||
|:>| :> shift lines one 'shiftwidth' right
|
||||
|:Next| :N[ext] go to previous file in the argument list
|
||||
|:argument| :argu[ment] go to specific file in the argument list
|
||||
|:browse| :bro[wse] Opens the 'File Open...' dialog
|
||||
|:copy| :co[py] copy lines
|
||||
|:delete| :d[elete] delete lines
|
||||
|:edit| :e[dit] Opens the 'File Open...' dialog
|
||||
|:find| :fin[d] Opens the file search dialog
|
||||
|:first| :fir[st] go to the first file in the argument list
|
||||
|:goto| :go[to] go to character in the buffer
|
||||
|:help| :h[elp] open a help window
|
||||
|:join| :j[oin] join lines
|
||||
|:k| :k set a mark
|
||||
|:last| :la[st] go to the last file in the argument list
|
||||
|:move| :m[ove] move lines
|
||||
|:mark| :ma[rk] set a mark
|
||||
|:next| :n[ext] go to next file in the argument list
|
||||
|:previous| :prev[ious] go to previous file in argument list
|
||||
|:put| :pu[t] insert contents of register in the text
|
||||
|:quit| :q[uit] quit current window (when one window quit Vim)
|
||||
|:rewind| :rew[ind] go to the first file in the argument list
|
||||
|:substitute| :s[ubstitute] Opens the 'Replace...' dialog
|
||||
|:t| :t same as ":copy"
|
||||
|:write| :w[rite] write to a file
|
||||
|:wq| :wq write to a file and quit window or Vim
|
||||
|:yank| :y[ank] yank lines into a register
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user