diff options
-rw-r--r-- | .netrwhist | 4 | ||||
-rw-r--r-- | doc/shortcuts.txt | 13 | ||||
-rw-r--r-- | ftplugin/help.vim | 3 | ||||
-rw-r--r-- | vimrc | 105 |
4 files changed, 75 insertions, 50 deletions
diff --git a/.netrwhist b/.netrwhist deleted file mode 100644 index 430f97c..0000000 --- a/.netrwhist +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | let g:netrw_dirhistmax =10 | ||
2 | let g:netrw_dirhist_cnt =2 | ||
3 | let g:netrw_dirhist_1='/home/max/.config/google-chrome' | ||
4 | let g:netrw_dirhist_2='/home/max/openvpn/cx20/client' | ||
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index 3b12d57..9162df8 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt | |||
@@ -21,7 +21,9 @@ iB = select block between curly braces (:help object-select) | |||
21 | :set list = display non printable characters | 21 | :set list = display non printable characters |
22 | :retab = replaces tabs with spaces | 22 | :retab = replaces tabs with spaces |
23 | :set expandtab = in insert mode: replace tab with spaces | 23 | :set expandtab = in insert mode: replace tab with spaces |
24 | :Explore = cli version open file dialog | 24 | :Explore = cli version open file dialog (file explorer) |
25 | :Lex = use netrw as project drawer (stays open in its own window) | ||
26 | :only = 'maximize' current buffer | ||
25 | 27 | ||
26 | 28 | ||
27 | [navigation] | 29 | [navigation] |
@@ -68,10 +70,19 @@ the last line can be a mode line, which holds settings like tab width: | |||
68 | :bn = buffer next | 70 | :bn = buffer next |
69 | :bp = buffer previous | 71 | :bp = buffer previous |
70 | :bd = buffer dispatch (close) | 72 | :bd = buffer dispatch (close) |
73 | :b <tab> = switch buffer by name (use <tab> and <return>) | ||
71 | 74 | ||
72 | 75 | ||
73 | [special] | 76 | [special] |
74 | g CTRL-g = display file properties including word and char count | 77 | g CTRL-g = display file properties including word and char count |
75 | CTRL-X CTRL-F = display file name completions using (vim-internal) omnicomplete | 78 | CTRL-X CTRL-F = display file name completions using (vim-internal) omnicomplete |
76 | 79 | ||
80 | |||
81 | [netrw] | ||
82 | :Lex = open the netrw-view as project drawer | ||
83 | gn = makes the directory under the cursor the root directory | ||
84 | a = toggles display of hidden files | ||
85 | |||
86 | |||
87 | |||
77 | # vim: noai:ts=2:sw=2 filetype=dosini | 88 | # vim: noai:ts=2:sw=2 filetype=dosini |
diff --git a/ftplugin/help.vim b/ftplugin/help.vim new file mode 100644 index 0000000..e2eb971 --- /dev/null +++ b/ftplugin/help.vim | |||
@@ -0,0 +1,3 @@ | |||
1 | " I will never get used to press CTRL-] to follow a link, never! | ||
2 | nnoremap <buffer> <CR> <C-]> | ||
3 | nnoremap <buffer> <BS> <C-T> | ||
@@ -3,16 +3,34 @@ call plug#begin() | |||
3 | " Brilliant_Plugins_by_tpope: ========================. | 3 | " Brilliant_Plugins_by_tpope: ========================. |
4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration | 4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration |
5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' | 5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' |
6 | Plug 'tpope/vim-vinegar' | " Improves :Explore | 6 | " Plug 'tpope/vim-vinegar' | " Improves :Explore |
7 | " Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) | 7 | " Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) |
8 | " Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin | 8 | " Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin |
9 | " Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround | 9 | " Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround |
10 | 10 | ||
11 | " Colorschemes: ======================================. | 11 | " Colorschemes: ======================================. |
12 | Plug 'nelstrom/vim-mac-classic-theme' | " light theme | ||
13 | Plug 'Valloric/vim-valloric-colorscheme' | " | ||
14 | Plug 'chriskempson/vim-tomorrow-theme' | " | ||
15 | Plug 'chriskempson/base16-vim' | " | 12 | Plug 'chriskempson/base16-vim' | " |
13 | map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>. | ||
14 | |||
15 | " NETRW: =============================================. | ||
16 | " let g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+' | " directly from the netrw-vim-docu (why isn't it default?) | ||
17 | let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot | ||
18 | let g:netrw_hide = 1 | " show not-hidden files only | ||
19 | let g:netrw_liststyle = 3 | " 3=tree | ||
20 | let g:netrw_banner = 0 | " display help messages? | ||
21 | let g:netrw_winsize = 20 | " window size in percent | ||
22 | let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors) | ||
23 | let g:netrw_keepdir = 0 | ||
24 | let g:netrw_browse_split = 4 | " 4=open in previous window | ||
25 | let g:netrw_preview = 0 | " | ||
26 | let g:netrw_alto = 0 | " open files on the right | ||
27 | let g:netrw_altv = 1 | " open files on the right | ||
28 | |||
29 | " let g:netrw_retmap = 1 | ||
30 | " let g:netrw_silent = 1 | ||
31 | " let g:netrw_special_syntax= 1 | ||
32 | " let g:netrw_preview = 0 | ||
33 | " let g:netrw_chgwin = 2 | ||
16 | 34 | ||
17 | " AIRLINE: ===========================================. | 35 | " AIRLINE: ===========================================. |
18 | Plug 'vim-airline/vim-airline' | " beautification of the mode line | 36 | Plug 'vim-airline/vim-airline' | " beautification of the mode line |
@@ -32,46 +50,44 @@ let g:airline#extensions#wordcount#enabled = 0 | | |||
32 | let g:airline_inactive_collapse = 1 | | 50 | let g:airline_inactive_collapse = 1 | |
33 | let g:airline_powerline_fonts = 1 | | 51 | let g:airline_powerline_fonts = 1 | |
34 | let g:airline_section_c = '%F' | 52 | let g:airline_section_c = '%F' |
53 | |||
35 | " AIRLINE_Theme: =====================================. | 54 | " AIRLINE_Theme: =====================================. |
36 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme | 55 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme |
37 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses | 56 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses |
38 | " let g:airline_theme='bubblegum' | " specifies which colorscheme should airline uses | ||
39 | " let g:airline_theme='dark' | | ||
40 | " let g:airline_theme='luna' | " specifies which colorscheme should airline uses | ||
41 | " let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses | 57 | " let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses |
42 | " let g:airline_theme='tomorrow' | " specifies which colorscheme should airline uses | ||
43 | 58 | ||
44 | " Additional: ========================================. | 59 | " Additional: ========================================. |
45 | Plug 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages | 60 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages |
46 | Plug 'taglist-plus' | " quick code navigator | 61 | Plug 'taglist-plus' " quick code navigator |
62 | nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L | ||
47 | 63 | ||
48 | " Autocompleter: =====================================. | 64 | " Autocompleter: =====================================. |
49 | Plug 'Valloric/MatchTagAlways' | 65 | Plug 'Valloric/MatchTagAlways' |
50 | Plug 'Valloric/YouCompleteMe' | 66 | Plug 'Valloric/YouCompleteMe' |
51 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar | 67 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar |
52 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar | 68 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar |
53 | let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file | 69 | let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file |
54 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure | 70 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure |
55 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword | 71 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword |
56 | let g:ycm_complete_in_comments = 1 " Completion in comments | 72 | let g:ycm_complete_in_comments = 1 " Completion in comments |
57 | let g:ycm_complete_in_strings = 1 " Completion in string | 73 | let g:ycm_complete_in_strings = 1 " Completion in string |
58 | Plug 'scrooloose/syntastic' | 74 | Plug 'scrooloose/syntastic' |
59 | set statusline+=%#warningmsg# | 75 | set statusline+=%#warningmsg# |
60 | set statusline+=%{SyntasticStatuslineFlag()} | 76 | set statusline+=%{SyntasticStatuslineFlag()} |
61 | set statusline+=%* | 77 | set statusline+=%* |
62 | let g:LatexBox_latexmk_preview_continuously = 1 | 78 | let g:LatexBox_latexmk_preview_continuously = 1 |
63 | let g:LatexBox_viewer = "evince" | 79 | let g:LatexBox_viewer = "evince" |
64 | let g:syntastic_always_populate_loc_list = 1 | 80 | let g:syntastic_always_populate_loc_list = 1 |
65 | let g:syntastic_auto_loc_list = 1 | 81 | let g:syntastic_auto_loc_list = 1 |
66 | let g:syntastic_check_on_open = 1 | 82 | let g:syntastic_check_on_open = 1 |
67 | let g:syntastic_check_on_wq = 0 | 83 | let g:syntastic_check_on_wq = 0 |
68 | Plug 'davidhalter/jedi-vim' | " jedi gets used to display python function signatures | 84 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures |
69 | let g:jedi#completions_enabled = 0 | " we do not need completions, because we have YouCompleteMe | 85 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe |
70 | let g:jedi#show_call_signatures = 1 | " which sadly does not support signatures like jedi | 86 | let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi |
71 | let g:jedi#show_call_signatures_delay = 0 | 87 | let g:jedi#show_call_signatures_delay = 0 |
72 | let g:jedi#auto_vim_configure = 0 | 88 | let g:jedi#auto_vim_configure = 0 |
73 | Plug 'SirVer/ultisnips' | " replaces loremipsum (and many more) | 89 | Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) |
74 | Plug 'honza/vim-snippets' | " dependency of ultisnips | 90 | Plug 'honza/vim-snippets' " dependency of ultisnips |
75 | " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. | 91 | " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. |
76 | "" Ultisnips | 92 | "" Ultisnips |
77 | let g:UltiSnipsExpandTrigger="<c-tab>" | 93 | let g:UltiSnipsExpandTrigger="<c-tab>" |
@@ -86,6 +102,9 @@ let g:UltiSnipsEditSplit="vertical" | |||
86 | " Plug 'indenthtml.vim' | " works better with mixed html/css/javascript | 102 | " Plug 'indenthtml.vim' | " works better with mixed html/css/javascript |
87 | " Plug 'evanmiller/nginx-vim-syntax' | " TODO: check if now included in syntastic? | 103 | " Plug 'evanmiller/nginx-vim-syntax' | " TODO: check if now included in syntastic? |
88 | 104 | ||
105 | " autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ | ||
106 | |||
107 | |||
89 | call plug#end() | " all plugins are getting loaded on this line, don't remove! | 108 | call plug#end() | " all plugins are getting loaded on this line, don't remove! |
90 | 109 | ||
91 | filetype on | 110 | filetype on |
@@ -97,15 +116,11 @@ syntax sync minlines=60 | " how many preceding lines will be parsed? (has | |||
97 | 116 | ||
98 | let base16colorspace=256 | 117 | let base16colorspace=256 |
99 | colorscheme base16-phd | 118 | colorscheme base16-phd |
100 | " colorscheme Tomorrow | 119 | " colorscheme base16-embers |
101 | " colorscheme Tomorrow-Night | 120 | " colorscheme base16-flat |
102 | " colorscheme Tomorrow-Night | 121 | " colorscheme base16-summerfruit-dark |
103 | " colorscheme Tomorrow-Night-Blue | 122 | " colorscheme base16-tommorow |
104 | " colorscheme Tomorrow-Night-Bright | ||
105 | " colorscheme base16-default-dark | 123 | " colorscheme base16-default-dark |
106 | " colorscheme mac_classic | " finally set which colorscheme to use | ||
107 | " colorscheme pencil | ||
108 | " colorscheme valloric | ||
109 | " colorscheme vividchalk | " finally set which colorscheme to use | 124 | " colorscheme vividchalk | " finally set which colorscheme to use |
110 | 125 | ||
111 | " Shortcut mods =======================================. | 126 | " Shortcut mods =======================================. |
@@ -114,9 +129,8 @@ inoremap <C-Space> <C-x><C-o> | |||
114 | " keep selection when indenting a selected block: | 129 | " keep selection when indenting a selected block: |
115 | vnoremap < <gv | 130 | vnoremap < <gv |
116 | vnoremap > >gv | 131 | vnoremap > >gv |
117 | nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs | 132 | nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between buffers |
118 | nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab | 133 | nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to previous buffers |
119 | nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L | ||
120 | 134 | ||
121 | " settings ============================================. | 135 | " settings ============================================. |
122 | " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here | 136 | " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here |
@@ -136,7 +150,7 @@ set clipboard=unnamedplus | " makes copy and paste work (autoselectplus migh | |||
136 | set nonumber | " turn line numbers off (improves performance) | 150 | set nonumber | " turn line numbers off (improves performance) |
137 | set nocursorline | " turn visual cursor line off (improves performance) | 151 | set nocursorline | " turn visual cursor line off (improves performance) |
138 | set nocursorcolumn | " turn visual cursor column off (improves performance) | 152 | set nocursorcolumn | " turn visual cursor column off (improves performance) |
139 | set ttyscroll=100 | " improves speed for terminal vim | 153 | set ttyscroll=100 | " improves speed for terminal vim |
140 | set ttyfast | " improves speed for terminal vim | 154 | set ttyfast | " improves speed for terminal vim |
141 | set lazyredraw | " disables redraw during macro exectution (improves performance) | 155 | set lazyredraw | " disables redraw during macro exectution (improves performance) |
142 | set re=1 | 156 | set re=1 |
@@ -145,13 +159,12 @@ set nofoldenable | " disable code folding. I hate code folding | |||
145 | set spell spelllang=en,de | " enable spell checker | 159 | set spell spelllang=en,de | " enable spell checker |
146 | set nostartofline | " when scrolling: do not move the cursor to column 1 | 160 | set nostartofline | " when scrolling: do not move the cursor to column 1 |
147 | set thesaurus+=/home/max/.vim/thesaurus/php.txt | 161 | set thesaurus+=/home/max/.vim/thesaurus/php.txt |
162 | set hlsearch | " highlights all search matches (not as performant!) | ||
148 | 163 | ||
149 | 164 | ||
150 | 165 | ||
151 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 166 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
152 | set laststatus=2 | 167 | set laststatus=2 |
153 | set nocursorcolumn | ||
154 | set nocursorline | ||
155 | set norelativenumber | 168 | set norelativenumber |
156 | set writedelay=0 | 169 | set writedelay=0 |
157 | 170 | ||
@@ -216,7 +229,9 @@ if has("autocmd") | |||
216 | 229 | ||
217 | augroup visual_mode_shows_unprintable " { | 230 | augroup visual_mode_shows_unprintable " { |
218 | set list | " shows unprinable characters in the current line | 231 | set list | " shows unprinable characters in the current line |
219 | autocmd ColorScheme * highlight NonText ctermbg=0 guifg=#061229 | 232 | " set cursorline | " use setcursorline in order to highlight non printable chars in the current line |
233 | autocmd ColorScheme * highlight NonText ctermbg=0 gui=bold guifg=#061229 | ||
234 | autocmd ColorScheme * highlight CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow | ||
220 | " | 235 | " |
221 | " | 236 | " |
222 | " highlight NonText guifg=#1d1f21 | " make non printable chars invisible. The active line is an exception. | 237 | " highlight NonText guifg=#1d1f21 | " make non printable chars invisible. The active line is an exception. |