From 04194c29e8b9b887363e13bec2bdefc15fdbd37b Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 13 Oct 2016 17:14:45 +0200 Subject: make Ctrl-Backspace delete a word in insert mode added most important of all command :viusage to the shortcuts.txt (which is my custom and less comprehensive version of viusage) added gitignore file from github as a reference. --- doc/gitignore | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/shortcuts.txt | 4 ++++ vimrc | 18 ++++++++++++++++-- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 doc/gitignore diff --git a/doc/gitignore b/doc/gitignore new file mode 100644 index 0000000..1d8dd28 --- /dev/null +++ b/doc/gitignore @@ -0,0 +1,50 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +bin/ +build/ +develop-eggs/ +dist/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Rope +.ropeproject + +# Django stuff: +*.log +*.pot + +# Sphinx documentation +docs/_build/ diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index 9162df8..540f086 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt @@ -1,3 +1,5 @@ +:viusage = summary of all keyboard shortcuts +:options = shows currently :set options (with descriptions) leader key = usually set to backslash expects a quick command @@ -61,6 +63,8 @@ dp = put changes from current window into the other ]c = jump to the next change [c = jump to the prevous change zR = opens all folds (unfold all) +zE = eliminates all folds +z= = show spellcheck suggestions [vim modeline] the last line can be a mode line, which holds settings like tab width: diff --git a/vimrc b/vimrc index 1cf91c1..4e56ac4 100644 --- a/vimrc +++ b/vimrc @@ -59,7 +59,7 @@ let g:airline_theme='base16' | " specifies which colors " Additional: ========================================. Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages Plug 'taglist-plus' " quick code navigator -nnoremap :TlistToggle| " bind TagList to Hotkey Ctrl+L +nnoremap l :TlistToggle| " bind TagList to Hotkey Ctrl+L " Autocompleter: =====================================. Plug 'Valloric/MatchTagAlways' @@ -86,6 +86,11 @@ let g:jedi#completions_enabled = 0 " we do not need completio let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi let g:jedi#show_call_signatures_delay = 0 let g:jedi#auto_vim_configure = 0 +let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163 +" autocmd FileType python jedi.preload_module('os', 'sys', 'math') +" let g:pymode_options_max_line_length = 120 +" let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' + Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) Plug 'honza/vim-snippets' " dependency of ultisnips " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. @@ -132,6 +137,12 @@ vnoremap > >gv nnoremap :bn| " lets one use CTRL+Tab to switch between buffers nnoremap :bp| " use CTRL+Shift+Tab to switch to previous buffers + +inoremap | " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode + + + + " settings ============================================. " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here set noshowmode | " because we are using some powerline derivat @@ -160,6 +171,7 @@ set spell spelllang=en,de | " enable spell checker set nostartofline | " when scrolling: do not move the cursor to column 1 set thesaurus+=/home/max/.vim/thesaurus/php.txt set hlsearch | " highlights all search matches (not as performant!) +set textwidth=100 | " line length (80 used to be default, but...) @@ -214,7 +226,8 @@ if has("autocmd") augroup set_window_title " { " autocmd BufWinEnter quickfix setl statusline=%t - autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" + " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" + autocmd BufEnter * let &titlestring = "%t|".$USER."@".hostname().":%{expand(\"%:~:.:h\")}%=%y" " set window title for screen(3) @@ -223,6 +236,7 @@ if has("autocmd") set t_fs=\ endif if &term == "screen" || &term == "xterm" + set titlelen=40 set title endif augroup END -- cgit v1.2.3