aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2018-01-19 23:55:47 +0100
committerMax Christian Pohle2018-01-19 23:55:47 +0100
commit7eea1b6c9c6f807fe53ff896a88a14171334c690 (patch)
tree616f0b2c0432b6bea14b7104d53726f93ae422c8
parent989a349f9a5da58f5b158c448c93e6a6005cb867 (diff)
downloadvim-karlmarks-7eea1b6c9c6f807fe53ff896a88a14171334c690.tar.bz2
vim-karlmarks-7eea1b6c9c6f807fe53ff896a88a14171334c690.zip
Added spell checking capabilities
-rw-r--r--vimrc-full67
1 files changed, 35 insertions, 32 deletions
diff --git a/vimrc-full b/vimrc-full
index 7c7f1cc..02c7246 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -7,8 +7,8 @@ set exrc | " enable exrc, a specific .exrc per project,
7set textwidth=120 | " better done with modeline or local exrc 7set textwidth=120 | " better done with modeline or local exrc
8set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc 8set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc
9set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against 9set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
10set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a filetype basis 10set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
11set ignorecase smartcase hlsearch | " search with ignorecase by default, but use case sensitive search when one captical char is contained and highlight while typing (even though its slower) 11set ignorecase smartcase hlsearch | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower)
12 12
13"======================================================================================================================= 13"=======================================================================================================================
14" SHELL 14" SHELL
@@ -24,26 +24,26 @@ endif
24"======================================================================================================================= 24"=======================================================================================================================
25if has('persistent_undo') 25if has('persistent_undo')
26 if isdirectory('/dev/shm') 26 if isdirectory('/dev/shm')
27 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos 27 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undoes
28 set directory=/dev/shm/ | " swap file directory to RAM 28 set directory=/dev/shm/ | " swap file directory to RAM
29 set swapfile 29 set swapfile
30 elseif isdirectory('/tmp/') 30 elseif isdirectory('/tmp/')
31 set undodir=/tmp/ 31 set undodir=/tmp/
32 endif 32 endif
33 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistenece) 33 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistence)
34endif 34endif
35 35
36"======================================================================================================================= 36"=======================================================================================================================
37" multi byte 37" multi byte
38"======================================================================================================================= 38"=======================================================================================================================
39if has("multi_byte") 39if has("multi_byte")
40 scriptencoding utf-8 | " tell vim that we are using utf-8 here 40 scriptencoding utf-8 | " tell vim that we are using UTF-8 here
41 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) 41 set encoding=utf-8 | " we need default UTF-8 encoding to use cool chars as line break and so on (see below)
42 let &termencoding=&encoding | " once we use special chars we assume everybody uses a terminal supporting those 42 let &termencoding=&encoding | " once we use special chars we assume everybody uses a terminal supporting those
43 43
44 set fillchars+=fold:\— | " 44 set fillchars+=fold:\— | "
45 set fillchars+=vert:\║ | " cool vertical split char 45 set fillchars+=vert:\║ | " cool vertical split char
46 set fillchars+=diff:\ | " a whitespace gets used here 46 set fillchars+=diff:\ | " a white space gets used here
47 47
48 set listchars= | " initialize empty listchars 48 set listchars= | " initialize empty listchars
49 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) 49 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
@@ -63,6 +63,9 @@ end
63" SPELL_CHECKING 63" SPELL_CHECKING
64"======================================================================================================================= 64"=======================================================================================================================
65let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell' 65let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
66" add local user default spell file as primary source for words
67let &spellfile=fnamemodify($MYVIMRC, ":p:h")."/spell/spellfile-user.UTF-8.add"
68
66set nospell | " disable spell checker by default 69set nospell | " disable spell checker by default
67set spelllang=en,de | " languages for the spell checker 70set spelllang=en,de | " languages for the spell checker
68set spellsuggest=10 | " how many words will z= suggest? 71set spellsuggest=10 | " how many words will z= suggest?
@@ -74,7 +77,7 @@ set complete+=i " scan current and included files
74set complete+=d " scan current and included files for defined name or macro 77set complete+=d " scan current and included files for defined name or macro
75 78
76"======================================================================================================================= 79"=======================================================================================================================
77" Cscope 80" cscope
78"======================================================================================================================= 81"=======================================================================================================================
79" http://vim.wikia.com/wiki/Cscope 82" http://vim.wikia.com/wiki/Cscope
80if has('cscope') " compiled with cscope support? 83if has('cscope') " compiled with cscope support?
@@ -138,8 +141,8 @@ if has("gui_running")
138 set guiheadroom=0 141 set guiheadroom=0
139 set guioptions+=eig 142 set guioptions+=eig
140 set guioptions-=T | " toolbar 143 set guioptions-=T | " toolbar
141 set guioptions+=c | " use console dialogs instead of popups 144 set guioptions+=c | " use console dialogues instead of popups
142 set guioptions+=a | " autoselect: copy&paste using middleclick 145 set guioptions+=a | " auto select: copy&paste using middle click
143 set guioptions+=m | " remove menu 146 set guioptions+=m | " remove menu
144 set guioptions-=e | " do not display tabs 147 set guioptions-=e | " do not display tabs
145 set guioptions-=L | " do not show left scrollbar 148 set guioptions-=L | " do not show left scrollbar
@@ -163,7 +166,7 @@ if has("gui_running")
163 set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10 166 set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10
164 set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10 167 set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10
165 168
166 " like in the terminal: use ctrl-shift-v for paste in vim's command editor 169 " like in the terminal: use Ctrl-shift-v for paste in vim's command editor
167 cnoremap <c-s-v> <c-r>* 170 cnoremap <c-s-v> <c-r>*
168endif 171endif
169 172
@@ -173,34 +176,34 @@ endif
173set breakindent | " Every wrapped line will continue visually indented 176set breakindent | " Every wrapped line will continue visually indented
174set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) 177set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
175set concealcursor=nc | " limits the display of concealed text to normal and command mode 178set concealcursor=nc | " limits the display of concealed text to normal and command mode
176set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX) 179set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX)
177set confirm | " asks 'do you want to save?' 180set confirm | " asks 'do you want to save?'
178set cpoptions+=P | " makes :w filename set the current buffer to filename 181set cpoptions+=P | " makes :w filename set the current buffer to filename
179set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) 182set hidden | " allows switching buffers even if the current buffer contains changes (displays +)
180set linebreak | " wrap long lines at char 'breakat', not inside words 183set linebreak | " wrap long lines at char 'breakat', not inside words
181set mousemodel=popup | " only in gvim: right click opens a popup-menu 184set mousemodel=popup | " only in gvim: right click opens a pop-up-menu
182set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode 185set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode
183set noautochdir | " When on, Vim will change the current working directory 186set noautochdir | " When on, Vim will change the current working directory
184set nostartofline | " when scrolling: do not move the cursor to column 1 187set nostartofline | " when scrolling: do not move the cursor to column 1
185set nowrap | " but do not (by default) wrap long lines around 188set nowrap | " but do not (by default) wrap long lines around
186set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers 189set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
187set path+=** | " allow recursive searches for files 190set path+=** | " allow recursive searches for files
188set incsearch | " highlight pattern while entering it (performancewise this isn't that good) 191set incsearch | " highlight pattern while entering it (performance wise this isn't that good)
189set pumheight=8 | " Determines the maximum number of items to show in the popup menu for 192set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
190set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge 193set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
191set scrolloff=0 | " keeps cursor centered 194set scrolloff=0 | " keeps cursor centered
192set shiftround | " indent/unindent snaps to multiple of shiftwidths 195set shiftround | " indent/un-indent snaps to multiple of shiftwidths
193set writedelay=0 196set writedelay=0
194 197
195" display and performance 198" display and performance
196set lazyredraw | " disables redraw during macro exectution (improves performance) 199set lazyredraw | " disables redraw during macro execution (improves performance)
197set cmdheight=2 | " sets the command line's height 200set cmdheight=2 | " sets the command line's height
198set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators 201set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators
199set nocursorcolumn | " turn visual cursor column off (improves performance) 202set nocursorcolumn | " turn visual cursor column off (improves performance)
200set updatetime=80 | " updates the screen more often 203set updatetime=80 | " updates the screen more often
201set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry 204set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry
202set notimeout | " improves performance but is known to cause problems on slow terminals 205set notimeout | " improves performance but is known to cause problems on slow terminals
203set ttimeout ttimeoutlen=150 | " set esc key timeout in ms- 206set ttimeout ttimeoutlen=150 | " set Esc key timeout in ms-
204set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) 207set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
205set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always 208set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always
206set shortmess+=I | " don't give the intro message when starting Vim |:intro|. 209set shortmess+=I | " don't give the intro message when starting Vim |:intro|.
@@ -247,12 +250,12 @@ set noautoindent
247set nosmartindent 250set nosmartindent
248set cindent cinoptions+=(0 | " indent at parentheses 251set cindent cinoptions+=(0 | " indent at parentheses
249 252
250set noshiftround | " indent/unindent sna=ps to multiple of shiftwidths 253set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths
251set equalalways | " do not evenly size windows when opening new or closing old 254set equalalways | " do not evenly size windows when opening new or closing old
252set nocursorline | " turn visual cursor line off (improves performance) 255set nocursorline | " turn visual cursor line off (improves performance)
253"======================================================================================================================= 256"=======================================================================================================================
254 257
255" Vim8 has a terminal command... 258" Vim 8 has a terminal command...
256if has('terminal') 259if has('terminal')
257 " use default ESC key to leave insert mode in the internal terminal emulator 260 " use default ESC key to leave insert mode in the internal terminal emulator
258 tnoremap <Esc> <C-W>N 261 tnoremap <Esc> <C-W>N
@@ -262,7 +265,7 @@ endif
262 265
263 266
264" NEOVIM_incompatible: 267" NEOVIM_incompatible:
265" 268"
266if has('nvim') " Neovim? 269if has('nvim') " Neovim?
267 autocmd TermOpen term://* set nobuflisted 270 autocmd TermOpen term://* set nobuflisted
268 " use default ESC key to leave insert mode in the internal terminal emulator 271 " use default ESC key to leave insert mode in the internal terminal emulator
@@ -276,13 +279,13 @@ else " default Vim?
276 autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") 279 autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib")
277 280
278 set ttymouse=xterm2 281 set ttymouse=xterm2
279 set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim 282 set ttyscroll=100 | " improves speed for terminal vim, incompatible with nvim
280 set ttyfast | " improves speed for terminal vim (incomp. with nvim) 283 set ttyfast | " improves speed for terminal vim (incompatible with nvim)
281 set nottybuiltin | " use external termcaps 284 set nottybuiltin | " use external termcaps
282 set restorescreen | " restores the console after exiting vim (intentionally not in nvim) 285 set restorescreen | " restores the console after exiting vim (intentionally not in nvim)
283 " 286 "
284 let g:loaded_ruby_provider = 1 " disable ruby support 287 let g:loaded_ruby_provider = 1 " disable ruby support
285 let g:loaded_python_provider = 1 " disable pthon3 288 let g:loaded_python_provider = 1 " disable python 3
286 289
287 if version >= 702 " clean up (see: http://vim.wikia.com/wiki/VimTip396) 290 if version >= 702 " clean up (see: http://vim.wikia.com/wiki/VimTip396)
288 autocmd BufWinLeave * call clearmatches() 291 autocmd BufWinLeave * call clearmatches()
@@ -480,7 +483,7 @@ if has("autocmd")
480 \ <F9> 483 \ <F9>
481 484
482 if has("gui_running") == 0 485 if has("gui_running") == 0
483 " in the gui F10 already triggeres the menu, not in a terminal vim, so upgrade that... 486 " in the gui F10 already triggers the menu, not in a terminal vim, so upgrade that...
484 map <F10> :emenu <C-Z> 487 map <F10> :emenu <C-Z>
485 endif 488 endif
486 01menu &Functions.activate\ menu\ (:emenu) 489 01menu &Functions.activate\ menu\ (:emenu)
@@ -591,7 +594,7 @@ if has("autocmd")
591 1000menu &Tag.stack.jump\ older 594 1000menu &Tag.stack.jump\ older
592 \<Tab><C-T> 595 \<Tab><C-T>
593 \ :po 596 \ :po
594 1000menu &Tag.stack.jump\ 597 1000menu &Tag.stack.jump\
595 \<Tab>:ta 598 \<Tab>:ta
596 \ :ta 599 \ :ta
597 endif 600 endif
@@ -614,12 +617,12 @@ endif
614" inoremap <C-Space> <C-x><C-o> 617" inoremap <C-Space> <C-x><C-o>
615" inoremap <C-@> <C-Space> 618" inoremap <C-@> <C-Space>
616 619
617" Bind CTRL+Backspace to vims version (CTRL+W) in " <CR> insert mode (only works with gvim) 620" Bind CTRL+Backspace to vim's version (CTRL+W) in " <CR> insert mode (only works with gvim)
618inoremap 621inoremap
619 \ <C-Backspace> 622 \ <C-Backspace>
620 \ <C-W> 623 \ <C-W>
621 624
622" INDENTATION: allows deindenting a selected block and keeps selection 625" INDENTATION: allows un-indenting a selected block and keeps selection
623vnoremap < <gv 626vnoremap < <gv
624vnoremap > >gv 627vnoremap > >gv
625 628
@@ -754,7 +757,7 @@ Plug 'itchyny/lightline.vim'
754" Plug 'taohex/lightline-buffer' 757" Plug 'taohex/lightline-buffer'
755 758
756" lightline-buffer ui settings 759" lightline-buffer ui settings
757" replace these symbols with ascii characters if your environment does not support unicode 760" replace these symbols with ASCII characters if your environment does not support unicode
758let g:lightline_buffer_logo = '' 761let g:lightline_buffer_logo = ''
759let g:lightline_buffer_readonly_icon = '' 762let g:lightline_buffer_readonly_icon = ''
760let g:lightline_buffer_modified_icon = '✭' 763let g:lightline_buffer_modified_icon = '✭'
@@ -1049,7 +1052,7 @@ endfunction
1049autocmd! ColorScheme * call ExtendColorTheme() 1052autocmd! ColorScheme * call ExtendColorTheme()
1050 1053
1051 1054
1052set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim 1055set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incompatible with nvim
1053" set t_ut= 1056" set t_ut=
1054 1057
1055if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) 1058if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest"))
@@ -1079,6 +1082,6 @@ endif
1079" endif 1082" endif
1080 1083
1081autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2 1084autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2
1082 1085
1083" display highlight group under the cursor 1086" display highlight group under the cursor
1084map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> 1087map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
..