Skip to content

Commit

Permalink
README.md: Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Mar 24, 2013
1 parent 1783d2c commit 9e3440d
Showing 1 changed file with 55 additions and 3 deletions.
58 changes: 55 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ Here is list of emulated commands with description where it can diverge from Vim
* command line (`:`)

### Normal and Visual Modes
* basic movement -- `h`/`j`/`k`/`l`, `<C-U>`, `<C-D>`, `<C-F>`, `<C-B>` etc.
* basic movement -- `h`/`j`/`k`/`l`, `<C-U>`, `<C-D>`, `<C-F>`, `<C-B>`, `gg`, `G`, `0`, `^`, `$` etc.
* word movement -- `w`, `e`, `b` etc.
* "inner/a" movement -- `ciw`, `3daw`, `ya{` etc.
* `f`, `t` movement
* `[`, `]` movement
* `{`, `}` -- paragraph movement
* delete/change/yank/paste with register
* undo/redo
* `<C-A>`, `<C-X>` -- increase or decrease number in decimal/octal/hexadecimal format (e.g. `128<C-A>` on or before "0x0ff" changes it to "0x17f")
* `.` -- repeat last change
* `/search`, `?search`, `*`, `#`, `n`, `N` -- most of regular expression syntax used in Vim except `\<` and `\>` just is the same as `\b` in QRegExp
* `@`, `q` (macro recording, execution) -- special keys are saved as `<S-Left>`
* marks
* gv -- last visual selection; can differ if text is edited around it
* `gv` -- last visual selection; can differ if text is edited around it
* indentation -- `=`, `<<`, `>>` etc. with movement, count and in visual mode
* "to upper/lower" -- `~`, `gU`, `gu` etc.
* `i`, `a`, `o`, `I`, `A`, `O` -- enter insert mode
Expand Down Expand Up @@ -59,7 +61,7 @@ Here is list of emulated commands with description where it can diverge from Vim
### Options (:set ...)
* `autoindent`
* `clipboard`
* `configbackspace`
* `backspace`
* `expandtab`
* `hlsearch`
* `ignorecase`
Expand All @@ -77,6 +79,56 @@ Here is list of emulated commands with description where it can diverge from Vim
* `tildeop`
* `wrapscan`

Example Vimrc
-------------

" highlight matched
set hlsearch
" case insensitive search
set ignorecase
set smartcase
" search while typing
set incsearch
" wrap-around when searching
set wrapscan
" show pressed keys in lower right corner
set showcmd
" tab -> spaces
set expandtab
set tabstop=4
set shiftwidth=4
" keep a 5 line buffer for the cursor from top/bottom of window
set scrolloff=5
" X11 clipboard
set clipboard=unnamed
" use ~ with movement
set tildeop

" mappings
nnoremap ; :
inoremap jj <Esc>

" typos
command! Q :q
command! W :w
command! Wq :wq
command! WQ :wq

" clear highlighted search term on space
noremap <silent> <Space> :nohls<CR>

" reselect visual block after indent
vnoremap < <gv
vnoremap > >gv

" MOVE LINE/BLOCK
nnoremap <C-S-J> :m+<CR>==
nnoremap <C-S-K> :m-2<CR>==
inoremap <C-S-J> <Esc>:m+<CR>==gi
inoremap <C-S-K> <Esc>:m-2<CR>==gi
vnoremap <C-S-J> :m'>+<CR>gv=gv
vnoremap <C-S-K> :m-2<CR>gv=gv

Implementation
--------------

Expand Down

0 comments on commit 9e3440d

Please sign in to comment.