aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/shortcuts.txt38
-rw-r--r--vimrc5
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
3gq - format text so that it fits in whatever :set textwidth was set 2gq - 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
18qa - start (q) macro recording in register a (can be anything)
19q - 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]
32do - get changes from other window into the current
33dp - put changes from current window into the other
34]c - jump to the next change
35[c - jump to the prevous change
diff --git a/vimrc b/vimrc
index d66c1ba..bbf0f03 100644
--- a/vimrc
+++ b/vimrc
@@ -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
30let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle 30let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle
31let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css
31 32
32call vundle#end() | " required by Vundle 33call vundle#end() | " required by Vundle
33filetype plugin indent on | " required by Vundle 34filetype plugin indent on | " required by Vundle
35behave mswin
34"================================================================================ 36"================================================================================
35" custom config 37" custom config
36colorscheme coderonline 38colorscheme coderonline
@@ -45,6 +47,7 @@ set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softt
45set autoindent | " always set autoindenting on 47set autoindent | " always set autoindenting on
46set copyindent | " copy the previous indentation on autoindenting 48set copyindent | " copy the previous indentation on autoindenting
47set scrolloff=2 | " always keeps at least two lines visible (when seeking) 49set scrolloff=2 | " always keeps at least two lines visible (when seeking)
50set selectmode=key,mouse | " make [strg+]shift-{left|right} enter SELECT mode (windows alike)
48 51
49set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap 52set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap
50set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap 53set 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
68set number | " toggle line numbers 71set number | " toggle line numbers
69 72
70if has("multi_byte") 73if 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)
..