From 81571661d0c39e7261d1a55ff641e56970defff0 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sun, 13 Sep 2015 21:54:53 +0200 Subject: vimdiff shortcuts added and support for CTRL+Shift+LeftArrow... --- doc/shortcuts.txt | 38 ++++++++++++++++++++++++++++++-------- 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 @@ - [visual mode] - with selected lines -gq - format text so that it fits in whatever :set textwidth was set +gq - formats text so that it fits in whatever :set textwidth was set + [commands] -:spell [word] - adds a word to the current dictionary (no mistake any more) -:set list - display non printable characters -:retab - replaces tabs with spaces -:set expandtab - in insert mode: replace tab with spaces +:spell [word] - adds a word to the current dictionary (no mistake any more) +:set list - display non printable characters +:retab - replaces tabs with spaces +:set expandtab - in insert mode: replace tab with spaces + [navigation] - - go to tag under the cursor (help links as well) - - return back from tag under the cursor + - look up the tag under the cursor (help links as well) + - return back from tag under the cursor + + +[macros] - record and play back a series of vim commands +qa - start (q) macro recording in register a (can be anything) +q - stop macro recording +@a - replay macro a +:'<,'>normal @a - apply a to every line in the current selection + + +[windows] +v - splits buffer vertically (screen uses |) +s - splits buffer horizontally (same as screen) +w - moves the cursor to the next window and back +[dir] - moves the cursor in that direction (use hjkl or arrow keys) + + +[vimdiff] +do - get changes from other window into the current +dp - put changes from current window into the other +]c - jump to the next change +[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 "let g:ycm_semantic_triggers = {'c' : ['(', ',']} | " add additional triggers (not recommend) let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle +let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css call vundle#end() | " required by Vundle filetype plugin indent on | " required by Vundle +behave mswin "================================================================================ " custom config colorscheme coderonline @@ -45,6 +47,7 @@ set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softt set autoindent | " always set autoindenting on set copyindent | " copy the previous indentation on autoindenting set scrolloff=2 | " always keeps at least two lines visible (when seeking) +set selectmode=key,mouse | " make [strg+]shift-{left|right} enter SELECT mode (windows alike) set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap 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 set number | " toggle line numbers if has("multi_byte") - scriptencoding utf-8 | " tell vim that we are using utf-8 here set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) + scriptencoding utf-8 | " tell vim that we are using utf-8 here set showbreak+=› | " symbol used in the beginning of a wrapped line set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) -- cgit v1.2.3