Update vim.md with "gvimdiff", "tab pages" and ajustment of the layout (#741)

* Update vim.md with "gvimdiff" command

* Update vim.md with a section for using tab pages

* VIM: Adjustement of the layout

Add table with Shortcut and Description for Calculator section.
Replace all of first letter of description by uppercase when it was lowercase.

* Update vim.md

* Update vim.md

* Update vim.md
This commit is contained in:
AntoineGoncalves 2018-11-07 22:35:25 +01:00 committed by chad d
parent 6892dc8615
commit 6a51d514e8
1 changed files with 61 additions and 29 deletions

90
vim.md
View File

@ -33,14 +33,18 @@ Getting started
### Navigating ### Navigating
| `h` `j` `k` `l` | Arrow keys | | Shortcut | Description |
| `<C-U>` _/_ `<C-D>` | Page up/page down | | --- | --- |
| `h` `j` `k` `l` | Arrow keys |
| `<C-U>` _/_ `<C-D>` | Page up/page down |
{: .-shortcuts} {: .-shortcuts}
#### Words #### Words
| `b` _/_ `w` | Previous/next word | | Shortcut | Description |
| `e` _/_ `ge` | Previous/next end of word | | --- | --- |
| `b` _/_ `w` | Previous/next word |
| `e` _/_ `ge` | Previous/next end of word |
{: .-shortcuts} {: .-shortcuts}
#### Line #### Line
@ -78,6 +82,18 @@ Getting started
| `L` | Move to bottom of screen | | `L` | Move to bottom of screen |
{: .-shortcuts} {: .-shortcuts}
#### Tab pages
| Shortcut | Description |
| --- | --- |
| `:tabedit [file]` | Edit file in a new tab |
| `:tabfind [file]` | Open file if exists in new tab |
| `:tabclose` | Close current tab |
| `:tabs` | List all tabs |
| `:tabfirst` | Go to first tab |
| `:tablast` | Go to last tab |
| `:tabn ` | Go to next tab |
| `:tabp ` | Go to previous tab |
### Editing ### Editing
@ -98,10 +114,10 @@ Getting started
### Exiting insert mode ### Exiting insert mode
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `Esc` _/_ `<C-[>` | Exit insert mode | | `Esc` _/_ `<C-[>` | Exit insert mode |
| `<C-C>` | Exit insert mode, and abort current command | | `<C-C>` | Exit insert mode, and abort current command |
{: .-shortcuts} {: .-shortcuts}
### Clipboard ### Clipboard
@ -119,13 +135,17 @@ Getting started
### Visual mode ### Visual mode
| `v` | Enter visual mode | | Shortcut | Description |
| `V` | Enter visual line mode | | --- | --- |
| `<C-V>` | Enter visual block mode | | `v` | Enter visual mode |
| `V` | Enter visual line mode |
| `<C-V>` | Enter visual block mode |
{: .-shortcuts} {: .-shortcuts}
#### In visual mode #### In visual mode
| Shortcut | Description |
| --- | --- |
| `d` _/_ `x` | Delete selection | | `d` _/_ `x` | Delete selection |
| `s` | Replace selection | | `s` | Replace selection |
| `y` | Yank selection _(Copy)_ | | `y` | Yank selection _(Copy)_ |
@ -229,6 +249,13 @@ Text objects let you operate (with an *operator*) in or around text blocks (*obj
See [Operators](#operators) for other things you can do. See [Operators](#operators) for other things you can do.
### Diff
| Shortcut | Description |
| --- | --- |
| `gvimdiff file1 file2 [file3]` | See differencies between files, in HMI |
Misc Misc
---- ----
@ -257,27 +284,29 @@ Uppercase ones are recursive (eg, `zO` is open recursively).
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `[(` `[{` `[<` | previous `(` or `{` or `<` | | `[(` `[{` `[<` | Previous `(` or `{` or `<` |
| `])` | next | | `])` | Next |
| --- | --- | | --- | --- |
| `[m` | previous method start | | `[m` | Previous method start |
| `[M` | previous method end | | `[M` | Previous method end |
{: .-shortcuts} {: .-shortcuts}
### Jumping ### Jumping
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `<C-O>` | Go back to previous location | | `<C-O>` | Go back to previous location |
| `<C-I>` | Go forward | | `<C-I>` | Go forward |
| --- | --- | | --- | --- |
| `gf` | go to file in cursor | | `gf` | Go to file in cursor |
{: .-shortcuts} {: .-shortcuts}
### Counters ### Counters
| `<C-A>` | increment number | | Shortcut | Description |
| `<C-X>` | decrement | | --- | --- |
| `<C-A>` | Increment number |
| `<C-X>` | Decrement |
{: .-shortcuts} {: .-shortcuts}
### Windows ### Windows
@ -303,12 +332,12 @@ Uppercase ones are recursive (eg, `zO` is open recursively).
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `~` | toggle case (Case => cASE) | | `~` | Toggle case (Case => cASE) |
| `gU` | uppercase | | `gU` | Uppercase |
| `gu` | lowercase | | `gu` | Lowercase |
| --- | --- | | --- | --- |
| `gUU` | uppercase current line (also `gUgU`) | | `gUU` | Uppercase current line (also `gUgU`) |
| `guu` | lowercase current line (also `gugu`) | | `guu` | Lowercase current line (also `gugu`) |
{: .-shortcuts} {: .-shortcuts}
Do these in visual or normal mode. Do these in visual or normal mode.
@ -330,16 +359,17 @@ Do these in visual or normal mode.
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `.` | repeat last command | | `.` | Repeat last command |
| `]p` | paste under the current indentation level | | `]p` | Paste under the current indentation level |
{: .-shortcuts} {: .-shortcuts}
### Command line ### Command line
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | --- | --- |
| `<C-R><C-W>` | insert current word into the command line | | `<C-R><C-W>` | Insert current word into the command line |
| `<C-R>"` | paste from " register | | `<C-R>"` | Paste from " register |
| `<C-X><C-F>` | Auto-completion of path in insert mode |
{: .-shortcuts} {: .-shortcuts}
### Text alignment ### Text alignment
@ -352,7 +382,9 @@ See `:help formatting`
### Calculator ### Calculator
<C-R>=128/2 | Shortcut | Description |
| --- | --- |
| `<C-R>=128/2` | Shows the result of the division : '64' |
Do this in insert mode. Do this in insert mode.