diff options
author | Max Christian Pohle | 2015-09-13 21:54:53 +0200 |
---|---|---|
committer | Max Christian Pohle | 2015-09-13 21:54:53 +0200 |
commit | 81571661d0c39e7261d1a55ff641e56970defff0 (patch) | |
tree | c57fc0e343ac1ff46ee9d8671256e544432cac65 | |
parent | d1f054ef1a601b81054f74e18520a2bc8075c3d8 (diff) | |
download | vim-karlmarks-81571661d0c39e7261d1a55ff641e56970defff0.tar.bz2 vim-karlmarks-81571661d0c39e7261d1a55ff641e56970defff0.zip |
vimdiff shortcuts added and support for CTRL+Shift+LeftArrow...
-rw-r--r-- | doc/shortcuts.txt | 38 | ||||
-rw-r--r-- | vimrc | 5 |
2 files changed, 34 insertions, 9 deletions
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index 9f4325f..3b714bc 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt | |||
@@ -1,13 +1,35 @@ | |||
1 | |||
2 | [visual mode] - with selected lines | 1 | [visual mode] - with selected lines |
3 | gq - format text so that it fits in whatever :set textwidth was set | 2 | gq - formats text so that it fits in whatever :set textwidth was set |
3 | |||
4 | 4 | ||
5 | [commands] | 5 | [commands] |
6 | :spell [word] - adds a word to the current dictionary (no mistake any more) | 6 | :spell [word] - adds a word to the current dictionary (no mistake any more) |
7 | :set list - display non printable characters | 7 | :set list - display non printable characters |
8 | :retab - replaces tabs with spaces | 8 | :retab - replaces tabs with spaces |
9 | :set expandtab - in insert mode: replace tab with spaces | 9 | :set expandtab - in insert mode: replace tab with spaces |
10 | |||
10 | 11 | ||
11 | [navigation] | 12 | [navigation] |
12 | <CTRL-]> - go to tag under the cursor (help links as well) | 13 | <CTRL-]> - look up the tag under the cursor (help links as well) |
13 | <CTRL-T> - return back from tag under the cursor | 14 | <CTRL-T> - return back from tag under the cursor |
15 | |||
16 | |||
17 | [macros] - record and play back a series of vim commands | ||
18 | qa - start (q) macro recording in register a (can be anything) | ||
19 | q - stop macro recording | ||
20 | @a - replay macro a | ||
21 | :'<,'>normal @a - apply a to every line in the current selection | ||
22 | |||
23 | |||
24 | [windows] | ||
25 | <C-W>v - splits buffer vertically (screen uses |) | ||
26 | <C-W>s - splits buffer horizontally (same as screen) | ||
27 | <C-W>w - moves the cursor to the next window and back | ||
28 | <C-W>[dir] - moves the cursor in that direction (use hjkl or arrow keys) | ||
29 | |||
30 | |||
31 | [vimdiff] | ||
32 | do - get changes from other window into the current | ||
33 | dp - put changes from current window into the other | ||
34 | ]c - jump to the next change | ||
35 | [c - jump to the prevous change | ||
@@ -28,9 +28,11 @@ let g:ycm_autoclose_preview_window_after_insertion=1 | " close the window when | |||
28 | "let g:ycm_semantic_triggers = {'c' : ['(', ',']} | " add additional triggers (not recommend) | 28 | "let g:ycm_semantic_triggers = {'c' : ['(', ',']} | " add additional triggers (not recommend) |
29 | 29 | ||
30 | let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle | 30 | let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle |
31 | let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css | ||
31 | 32 | ||
32 | call vundle#end() | " required by Vundle | 33 | call vundle#end() | " required by Vundle |
33 | filetype plugin indent on | " required by Vundle | 34 | filetype plugin indent on | " required by Vundle |
35 | behave mswin | ||
34 | "================================================================================ | 36 | "================================================================================ |
35 | " custom config | 37 | " custom config |
36 | colorscheme coderonline | 38 | colorscheme coderonline |
@@ -45,6 +47,7 @@ set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softt | |||
45 | set autoindent | " always set autoindenting on | 47 | set autoindent | " always set autoindenting on |
46 | set copyindent | " copy the previous indentation on autoindenting | 48 | set copyindent | " copy the previous indentation on autoindenting |
47 | set scrolloff=2 | " always keeps at least two lines visible (when seeking) | 49 | set scrolloff=2 | " always keeps at least two lines visible (when seeking) |
50 | set selectmode=key,mouse | " make [strg+]shift-{left|right} enter SELECT mode (windows alike) | ||
48 | 51 | ||
49 | set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap | 52 | set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap |
50 | set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap | 53 | set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap |
@@ -68,8 +71,8 @@ set clipboard=unnamedplus | " makes copy and paste work (autoselectplus migh | |||
68 | set number | " toggle line numbers | 71 | set number | " toggle line numbers |
69 | 72 | ||
70 | if has("multi_byte") | 73 | if has("multi_byte") |
71 | scriptencoding utf-8 | " tell vim that we are using utf-8 here | ||
72 | set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) | 74 | set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) |
75 | scriptencoding utf-8 | " tell vim that we are using utf-8 here | ||
73 | set showbreak+=› | " symbol used in the beginning of a wrapped line | 76 | set showbreak+=› | " symbol used in the beginning of a wrapped line |
74 | set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) | 77 | set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) |
75 | set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) | 78 | set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) |