From 7eea1b6c9c6f807fe53ff896a88a14171334c690 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 19 Jan 2018 23:55:47 +0100 Subject: Added spell checking capabilities --- vimrc-full | 67 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'vimrc-full') 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, set textwidth=120 | " better done with modeline or local exrc set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against -set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a filetype basis -set 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) +set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis +set 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) "======================================================================================================================= " SHELL @@ -24,26 +24,26 @@ endif "======================================================================================================================= if has('persistent_undo') if isdirectory('/dev/shm') - set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos + set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undoes set directory=/dev/shm/ | " swap file directory to RAM set swapfile elseif isdirectory('/tmp/') set undodir=/tmp/ endif - set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistenece) + set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistence) endif "======================================================================================================================= " multi byte "======================================================================================================================= 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 encoding=utf-8 | " we need default UTF-8 encoding to use cool chars as line break and so on (see below) let &termencoding=&encoding | " once we use special chars we assume everybody uses a terminal supporting those set fillchars+=fold:\— | " set fillchars+=vert:\║ | " cool vertical split char - set fillchars+=diff:\ | " a whitespace gets used here + set fillchars+=diff:\ | " a white space gets used here set listchars= | " initialize empty listchars set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) @@ -63,6 +63,9 @@ end " SPELL_CHECKING "======================================================================================================================= let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell' +" add local user default spell file as primary source for words +let &spellfile=fnamemodify($MYVIMRC, ":p:h")."/spell/spellfile-user.UTF-8.add" + set nospell | " disable spell checker by default set spelllang=en,de | " languages for the spell checker set spellsuggest=10 | " how many words will z= suggest? @@ -74,7 +77,7 @@ set complete+=i " scan current and included files set complete+=d " scan current and included files for defined name or macro "======================================================================================================================= -" Cscope +" cscope "======================================================================================================================= " http://vim.wikia.com/wiki/Cscope if has('cscope') " compiled with cscope support? @@ -138,8 +141,8 @@ if has("gui_running") set guiheadroom=0 set guioptions+=eig set guioptions-=T | " toolbar - set guioptions+=c | " use console dialogs instead of popups - set guioptions+=a | " autoselect: copy&paste using middleclick + set guioptions+=c | " use console dialogues instead of popups + set guioptions+=a | " auto select: copy&paste using middle click set guioptions+=m | " remove menu set guioptions-=e | " do not display tabs set guioptions-=L | " do not show left scrollbar @@ -163,7 +166,7 @@ if has("gui_running") set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10 set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10 - " like in the terminal: use ctrl-shift-v for paste in vim's command editor + " like in the terminal: use Ctrl-shift-v for paste in vim's command editor cnoremap * endif @@ -173,34 +176,34 @@ endif set breakindent | " Every wrapped line will continue visually indented set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) set concealcursor=nc | " limits the display of concealed text to normal and command mode -set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX) +set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) set confirm | " asks 'do you want to save?' set cpoptions+=P | " makes :w filename set the current buffer to filename -set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) +set hidden | " allows switching buffers even if the current buffer contains changes (displays +) set linebreak | " wrap long lines at char 'breakat', not inside words -set mousemodel=popup | " only in gvim: right click opens a popup-menu +set mousemodel=popup | " only in gvim: right click opens a pop-up-menu set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode set noautochdir | " When on, Vim will change the current working directory set nostartofline | " when scrolling: do not move the cursor to column 1 set nowrap | " but do not (by default) wrap long lines around set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers set path+=** | " allow recursive searches for files -set incsearch | " highlight pattern while entering it (performancewise this isn't that good) -set pumheight=8 | " Determines the maximum number of items to show in the popup menu for +set incsearch | " highlight pattern while entering it (performance wise this isn't that good) +set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge set scrolloff=0 | " keeps cursor centered -set shiftround | " indent/unindent snaps to multiple of shiftwidths +set shiftround | " indent/un-indent snaps to multiple of shiftwidths set writedelay=0 " display and performance -set lazyredraw | " disables redraw during macro exectution (improves performance) +set lazyredraw | " disables redraw during macro execution (improves performance) set cmdheight=2 | " sets the command line's height set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators set nocursorcolumn | " turn visual cursor column off (improves performance) set updatetime=80 | " updates the screen more often set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry set notimeout | " improves performance but is known to cause problems on slow terminals -set ttimeout ttimeoutlen=150 | " set esc key timeout in ms- +set ttimeout ttimeoutlen=150 | " set Esc key timeout in ms- set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always set shortmess+=I | " don't give the intro message when starting Vim |:intro|. @@ -247,12 +250,12 @@ set noautoindent set nosmartindent set cindent cinoptions+=(0 | " indent at parentheses -set noshiftround | " indent/unindent sna=ps to multiple of shiftwidths +set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths set equalalways | " do not evenly size windows when opening new or closing old set nocursorline | " turn visual cursor line off (improves performance) "======================================================================================================================= -" Vim8 has a terminal command... +" Vim 8 has a terminal command... if has('terminal') " use default ESC key to leave insert mode in the internal terminal emulator tnoremap N @@ -262,7 +265,7 @@ endif " NEOVIM_incompatible: -" +" if has('nvim') " Neovim? autocmd TermOpen term://* set nobuflisted " use default ESC key to leave insert mode in the internal terminal emulator @@ -276,13 +279,13 @@ else " default Vim? autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") set ttymouse=xterm2 - set ttyscroll=100 | " improves speed for terminal vim, incomp. with nvim - set ttyfast | " improves speed for terminal vim (incomp. with nvim) + set ttyscroll=100 | " improves speed for terminal vim, incompatible with nvim + set ttyfast | " improves speed for terminal vim (incompatible with nvim) set nottybuiltin | " use external termcaps set restorescreen | " restores the console after exiting vim (intentionally not in nvim) " let g:loaded_ruby_provider = 1 " disable ruby support - let g:loaded_python_provider = 1 " disable pthon3 + let g:loaded_python_provider = 1 " disable python 3 if version >= 702 " clean up (see: http://vim.wikia.com/wiki/VimTip396) autocmd BufWinLeave * call clearmatches() @@ -480,7 +483,7 @@ if has("autocmd") \ if has("gui_running") == 0 - " in the gui F10 already triggeres the menu, not in a terminal vim, so upgrade that... + " in the gui F10 already triggers the menu, not in a terminal vim, so upgrade that... map :emenu endif 01menu &Functions.activate\ menu\ (:emenu) @@ -591,7 +594,7 @@ if has("autocmd") 1000menu &Tag.stack.jump\ older \ \ :po - 1000menu &Tag.stack.jump\ + 1000menu &Tag.stack.jump\ \:ta \ :ta endif @@ -614,12 +617,12 @@ endif " inoremap " inoremap -" Bind CTRL+Backspace to vims version (CTRL+W) in " insert mode (only works with gvim) +" Bind CTRL+Backspace to vim's version (CTRL+W) in " insert mode (only works with gvim) inoremap \ \ -" INDENTATION: allows deindenting a selected block and keeps selection +" INDENTATION: allows un-indenting a selected block and keeps selection vnoremap < >gv @@ -754,7 +757,7 @@ Plug 'itchyny/lightline.vim' " Plug 'taohex/lightline-buffer' " lightline-buffer ui settings -" replace these symbols with ascii characters if your environment does not support unicode +" replace these symbols with ASCII characters if your environment does not support unicode let g:lightline_buffer_logo = '' let g:lightline_buffer_readonly_icon = '' let g:lightline_buffer_modified_icon = '✭' @@ -1049,7 +1052,7 @@ endfunction autocmd! ColorScheme * call ExtendColorTheme() -set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incomp. with nvim +set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incompatible with nvim " set t_ut= if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) @@ -1079,6 +1082,6 @@ endif " endif autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2 - + " display highlight group under the cursor map h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') -- cgit v1.2.3