2020-06-01 14:14:26 +02:00
|
|
|
" bootstrap vim-plug automagically
|
|
|
|
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
|
|
|
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
|
|
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
autocmd VimEnter * PlugInstall --sync|source $MYVIMRC
|
|
|
|
endif
|
|
|
|
|
|
|
|
call plug#begin('~/.local/share/nvim/plugged')
|
|
|
|
|
|
|
|
" Some config/whitespace automation
|
|
|
|
Plug 'tpope/vim-sleuth'
|
|
|
|
Plug 'ntpeters/vim-better-whitespace'
|
|
|
|
|
|
|
|
"Better syntax
|
|
|
|
Plug 'lervag/vimtex', {'for': 'tex'}
|
|
|
|
Plug 'vivien/vim-linux-coding-style'
|
|
|
|
Plug 'NLKNguyen/c-syntax.vim'
|
2021-01-03 19:03:05 +01:00
|
|
|
Plug 'vim-python/python-syntax'
|
2020-06-01 14:14:26 +02:00
|
|
|
Plug 'rust-lang/rust.vim', {'for': 'rust'}
|
|
|
|
Plug 'dag/vim-fish', {'for': 'fish'}
|
|
|
|
Plug 'LnL7/vim-nix', {'for': 'nix'}
|
|
|
|
Plug 'chikamichi/mediawiki.vim'
|
2020-10-05 09:45:02 +02:00
|
|
|
Plug 'cespare/vim-toml'
|
2020-06-01 14:14:26 +02:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
"" TeX and co stuff
|
|
|
|
" disable TeX commands concealing
|
|
|
|
let g:tex_conceal = ''
|
|
|
|
|
|
|
|
" space is our leader!
|
|
|
|
let mapleader = "\<Space>"
|
|
|
|
let maplocalleader = "\\"
|
|
|
|
|
|
|
|
" set line numbering
|
|
|
|
set number
|
|
|
|
|
|
|
|
" Set place for backups
|
|
|
|
set nobackup
|
|
|
|
|
|
|
|
" Swap for slacks
|
|
|
|
set noswapfile
|
|
|
|
|
|
|
|
" autosmartident
|
|
|
|
set ai
|
|
|
|
set si
|
|
|
|
|
|
|
|
" Expand tabs to spaces
|
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
|
|
|
set softtabstop=4
|
|
|
|
set noexpandtab
|
|
|
|
|
|
|
|
" show indentation
|
|
|
|
set list
|
|
|
|
|
|
|
|
" Enlarge your Undo!
|
|
|
|
set history=999
|
|
|
|
set undolevels=999
|
|
|
|
|
|
|
|
" Copying and pasting
|
|
|
|
" Copy to clipboard
|
|
|
|
vnoremap <leader>y "+y
|
|
|
|
nnoremap <leader>Y "+yg_
|
|
|
|
nnoremap <leader>y "+y
|
|
|
|
nnoremap <leader>yy "+yy
|
|
|
|
" Paste from clipboard
|
|
|
|
nnoremap <leader>p "+p
|
|
|
|
nnoremap <leader>P "+P
|
|
|
|
vnoremap <leader>p "+p
|
|
|
|
vnoremap <leader>P "+P
|
|
|
|
|
|
|
|
" Update more often
|
|
|
|
set updatetime=107
|
|
|
|
|
|
|
|
" Activate linux coding style helper only in certain dirs
|
2021-01-03 19:02:40 +01:00
|
|
|
let g:linuxsty_patterns = ["/usr/src", "/linux", "~/git/linux", "~/fun/linux", "~/devel/linux"]
|
2020-06-01 14:14:26 +02:00
|
|
|
|
2020-06-15 20:49:51 +02:00
|
|
|
" markdown
|
|
|
|
let g:markdown_syntax_conceal = 0
|
2021-01-06 20:14:57 +01:00
|
|
|
let g:markdown_fenced_languages = ['c', 'html', 'python', 'scheme', 'yaml', 'sh']
|
2020-06-15 20:49:51 +02:00
|
|
|
|
2020-06-01 14:14:26 +02:00
|
|
|
" disable modelines
|
|
|
|
set nomodeline
|
|
|
|
|
|
|
|
" change tab completion to more bash-like
|
|
|
|
set wildmode=longest:full,list:full
|
|
|
|
|
|
|
|
" I cannot spell
|
|
|
|
set spelllang=en,ru,de
|
|
|
|
nnoremap <F9> :set spell!<CR>
|
|
|
|
inoremap <F9> <C-o>:set spell!<CR>
|
2020-06-15 20:48:50 +02:00
|
|
|
set spellsuggest+=10
|
2020-06-01 14:14:26 +02:00
|
|
|
|
|
|
|
" U is quite useless
|
|
|
|
nnoremap U :echo "NOPE!"<CR>
|
2020-10-08 16:19:10 +02:00
|
|
|
|
2020-10-19 22:01:58 +02:00
|
|
|
" do not conceal stuff
|
|
|
|
set conceallevel=0
|
2021-01-07 21:15:46 +01:00
|
|
|
|
|
|
|
set laststatus=1
|