xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
<root> / crib.txt (b8f56cfba1de4b94811229923d5bbd8d52d228a8) (3,141B) (mode 100644) [raw]
gm -- middle of screen line
g_ -- last non-space line character
+/- -- first character of next/previous line
nH -- {n} lines after top line
nL -- {n} lines before last line
z<cr> == zt
z. == zz
z- == zb
g*/g# -- embedded versions of */#
[i - list first occurrence of a word.
[I - list all occurrences of a word.
g;/g, -- move backwards/forwards in changelist.

<c-a> - in insert mode pastes previously typed text.
<c-w> - in insert mode deletes a word before the cursor.
<c-r><c-w> - copy word under the cursor to command line.
<c-x><c-f> - filename completion in insert mode.
<c-x><c-o> - omni-completion.
<c-x><c-l> - line-completion.
helptags <path to doc/> - regenerates docs tags.
:perldo - perl-style regexps.
<c-c> in q: buffer pastes line onto command-line.
<c-b>,<c-e> on command-line: to beginning/end of line
<c-w> } - tag preview

zi - toggle folding on/off

[[/]] - outer { block, next/previous
[]/][ - outer } block, next/previous
[{/]} - inner block's { and }
in such commands [ and ] define direction.

<count>[<tab> - go to <count> line in the [I list.
gt, gT - next/previous tab.
J - concatenate current and next line.
diw - delete current word.
daw - delete current word including surrounding spaces.
= - indentation (e.g. gg=G indents whole buffer).
:e $MYVIMRC - edit .vimrc.
<c-g> - print some information about current buffer.
g<c-g> - print some information in details about current buffer.
xp - swap current and next characters.
Xp - swap current and previous characters.
<c-^> - quick switch current and alternative buffers.
<c-w>T - edit file in new tab.

<c-]> - go to function definition (needs tags).
<c-i>/<c-o> - go forward/backward through history.
<c-t> - go backward through tags stack.

gd - go to local definition of variable under the cursor.
gD - go to global definition of variable under the cursor.
g,/g; - go to place of previous/next edit.
gi - go to place where the last insert operation was made.
`.  go to last edited line.
``  go to last active line.
gJ - join lines not inserting space between them

]p - same as p key, but re-indents line after pasting it
[p - same as P key, but re-indents line after pasting it
gp/gP - same as p/P, but puts cursor at the end of pasted text

/ - case sensitivity
    \ - ignore case
    \C - don't ignore case

Spell check:
set spell - enable spell check
set spelllang=ru,en - set spell check languages
]s  go to next incorrect word
[s  go to previous incorrect word
z=  show list of alternatives for incorrect word

A note for ctags:
    Use \ to escape new line in function definitions or it will not work
    right.

Display a fancy output based on your search of someWord:
:g/set/z#.1|echo"==========="

Ctrl-G and Ctrl-T in increment search can be used to move to the next and
previous match.

gw{motion} -- format keeping cursor where it is.

:help accepts literal keys, example: :help <c-v><c-t>

<c-w>r/R -- rotate windows.

:options -- open buffer with verbose dump of options

:let g: -- show global variables
:let g:var -- show global variable

:left/:center/:right -- align line.

Ctrl-X + Ctrl-C does command-line completion in a buffer.
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvim

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvim

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master