aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.netrwhist4
-rw-r--r--doc/shortcuts.txt13
-rw-r--r--ftplugin/help.vim3
-rw-r--r--vimrc105
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 @@
1let g:netrw_dirhistmax =10
2let g:netrw_dirhist_cnt =2
3let g:netrw_dirhist_1='/home/max/.config/google-chrome'
4let 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]
74g CTRL-g = display file properties including word and char count 77g CTRL-g = display file properties including word and char count
75CTRL-X CTRL-F = display file name completions using (vim-internal) omnicomplete 78CTRL-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
83gn = makes the directory under the cursor the root directory
84a = 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!
2nnoremap <buffer> <CR> <C-]>
3nnoremap <buffer> <BS> <C-T>
diff --git a/vimrc b/vimrc
index 538ffe8..1cf91c1 100644
--- a/vimrc
+++ b/vimrc
@@ -3,16 +3,34 @@ call plug#begin()
3" Brilliant_Plugins_by_tpope: ========================. 3" Brilliant_Plugins_by_tpope: ========================.
4Plug 'tpope/vim-sensible' | " a sane and modern default configuration 4Plug 'tpope/vim-sensible' | " a sane and modern default configuration
5Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' 5Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with '
6Plug '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: ======================================.
12Plug 'nelstrom/vim-mac-classic-theme' | " light theme
13Plug 'Valloric/vim-valloric-colorscheme' | "
14Plug 'chriskempson/vim-tomorrow-theme' | "
15Plug 'chriskempson/base16-vim' | " 12Plug 'chriskempson/base16-vim' | "
13map <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?)
17let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot
18let g:netrw_hide = 1 | " show not-hidden files only
19let g:netrw_liststyle = 3 | " 3=tree
20let g:netrw_banner = 0 | " display help messages?
21let g:netrw_winsize = 20 | " window size in percent
22let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors)
23let g:netrw_keepdir = 0
24let g:netrw_browse_split = 4 | " 4=open in previous window
25let g:netrw_preview = 0 | "
26let g:netrw_alto = 0 | " open files on the right
27let 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: ===========================================.
18Plug 'vim-airline/vim-airline' | " beautification of the mode line 36Plug 'vim-airline/vim-airline' | " beautification of the mode line
@@ -32,46 +50,44 @@ let g:airline#extensions#wordcount#enabled = 0 |
32let g:airline_inactive_collapse = 1 | 50let g:airline_inactive_collapse = 1 |
33let g:airline_powerline_fonts = 1 | 51let g:airline_powerline_fonts = 1 |
34let g:airline_section_c = '%F' 52let g:airline_section_c = '%F'
53
35" AIRLINE_Theme: =====================================. 54" AIRLINE_Theme: =====================================.
36Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme 55Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme
37let g:airline_theme='base16' | " specifies which colorscheme should airline uses 56let 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: ========================================.
45Plug 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages 60Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages
46Plug 'taglist-plus' | " quick code navigator 61Plug 'taglist-plus' " quick code navigator
62nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L
47 63
48" Autocompleter: =====================================. 64" Autocompleter: =====================================.
49Plug 'Valloric/MatchTagAlways' 65Plug 'Valloric/MatchTagAlways'
50Plug 'Valloric/YouCompleteMe' 66Plug 'Valloric/YouCompleteMe'
51let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar 67let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar
52let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar 68let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar
53let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file 69let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
54let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure 70let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
55let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword 71let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
56let g:ycm_complete_in_comments = 1 " Completion in comments 72let g:ycm_complete_in_comments = 1 " Completion in comments
57let g:ycm_complete_in_strings = 1 " Completion in string 73let g:ycm_complete_in_strings = 1 " Completion in string
58Plug 'scrooloose/syntastic' 74Plug 'scrooloose/syntastic'
59set statusline+=%#warningmsg# 75set statusline+=%#warningmsg#
60set statusline+=%{SyntasticStatuslineFlag()} 76set statusline+=%{SyntasticStatuslineFlag()}
61set statusline+=%* 77set statusline+=%*
62let g:LatexBox_latexmk_preview_continuously = 1 78let g:LatexBox_latexmk_preview_continuously = 1
63let g:LatexBox_viewer = "evince" 79let g:LatexBox_viewer = "evince"
64let g:syntastic_always_populate_loc_list = 1 80let g:syntastic_always_populate_loc_list = 1
65let g:syntastic_auto_loc_list = 1 81let g:syntastic_auto_loc_list = 1
66let g:syntastic_check_on_open = 1 82let g:syntastic_check_on_open = 1
67let g:syntastic_check_on_wq = 0 83let g:syntastic_check_on_wq = 0
68Plug 'davidhalter/jedi-vim' | " jedi gets used to display python function signatures 84Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures
69let g:jedi#completions_enabled = 0 | " we do not need completions, because we have YouCompleteMe 85let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe
70let g:jedi#show_call_signatures = 1 | " which sadly does not support signatures like jedi 86let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi
71let g:jedi#show_call_signatures_delay = 0 87let g:jedi#show_call_signatures_delay = 0
72let g:jedi#auto_vim_configure = 0 88let g:jedi#auto_vim_configure = 0
73Plug 'SirVer/ultisnips' | " replaces loremipsum (and many more) 89Plug 'SirVer/ultisnips' " replaces loremipsum (and many more)
74Plug 'honza/vim-snippets' | " dependency of ultisnips 90Plug '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
77let g:UltiSnipsExpandTrigger="<c-tab>" 93let 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
89call plug#end() | " all plugins are getting loaded on this line, don't remove! 108call plug#end() | " all plugins are getting loaded on this line, don't remove!
90 109
91filetype on 110filetype on
@@ -97,15 +116,11 @@ syntax sync minlines=60 | " how many preceding lines will be parsed? (has
97 116
98let base16colorspace=256 117let base16colorspace=256
99colorscheme base16-phd 118colorscheme 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:
115vnoremap < <gv 130vnoremap < <gv
116vnoremap > >gv 131vnoremap > >gv
117nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs 132nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between buffers
118nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab 133nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to previous buffers
119nnoremap <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
136set nonumber | " turn line numbers off (improves performance) 150set nonumber | " turn line numbers off (improves performance)
137set nocursorline | " turn visual cursor line off (improves performance) 151set nocursorline | " turn visual cursor line off (improves performance)
138set nocursorcolumn | " turn visual cursor column off (improves performance) 152set nocursorcolumn | " turn visual cursor column off (improves performance)
139set ttyscroll=100 | " improves speed for terminal vim 153set ttyscroll=100 | " improves speed for terminal vim
140set ttyfast | " improves speed for terminal vim 154set ttyfast | " improves speed for terminal vim
141set lazyredraw | " disables redraw during macro exectution (improves performance) 155set lazyredraw | " disables redraw during macro exectution (improves performance)
142set re=1 156set re=1
@@ -145,13 +159,12 @@ set nofoldenable | " disable code folding. I hate code folding
145set spell spelllang=en,de | " enable spell checker 159set spell spelllang=en,de | " enable spell checker
146set nostartofline | " when scrolling: do not move the cursor to column 1 160set nostartofline | " when scrolling: do not move the cursor to column 1
147set thesaurus+=/home/max/.vim/thesaurus/php.txt 161set thesaurus+=/home/max/.vim/thesaurus/php.txt
162set hlsearch | " highlights all search matches (not as performant!)
148 163
149 164
150 165
151set splitbelow | " open new windows below the current one (i find that more intuitive) 166set splitbelow | " open new windows below the current one (i find that more intuitive)
152set laststatus=2 167set laststatus=2
153set nocursorcolumn
154set nocursorline
155set norelativenumber 168set norelativenumber
156set writedelay=0 169set 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.
..