.files/config/nvim/init.vim

95 lines
1.7 KiB
VimL
Raw Normal View History

2021-06-25 19:47:21 +02:00
if has('nvim')
call plug#begin(stdpath('data') . '/plugged')
else
set nocompatible
filetype plugin indent on
syntax enable
call plug#begin('~/.vim/plugged')
2020-06-01 14:14:26 +02:00
endif
" insert images into markdown automagically
Plug 'ferrine/md-img-paste.vim'
2020-06-01 14:14:26 +02:00
"Better syntax
2021-06-25 19:47:21 +02:00
Plug 'rust-lang/rust.vim'
Plug 'LnL7/vim-nix'
2020-10-05 09:45:02 +02:00
Plug 'cespare/vim-toml'
2021-06-25 19:47:21 +02:00
Plug 'JuliaEditorSupport/julia-vim'
2020-06-01 14:14:26 +02:00
call plug#end()
" disable TeX commands concealing
let g:tex_conceal = ''
" space is our leader!
let mapleader = "\<Space>"
let maplocalleader = "\\"
set number
set nobackup
set noswapfile
set guicursor=
2020-06-01 14:14:26 +02:00
" autosmartident
set ai
set si
set tabstop=4
set shiftwidth=4
set softtabstop=4
set noexpandtab
" arrows for visual line identation
imap <up> <C-O>gk
imap <down> <C-O>gj
nmap <up> gk
nmap <down> gj
vmap <up> gk
vmap <down> gj
2020-06-01 14:14:26 +02:00
set history=999
set undolevels=999
" 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
set updatetime=107
" markdown
let g:markdown_syntax_conceal = 0
let g:markdown_fenced_languages = ['c', 'html', 'python', 'scheme', 'yaml', 'sh']
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
" insert images into markdown automagically
autocmd FileType markdown nmap <buffer><silent> <localleader>p :call mdip#MarkdownClipboardImage()<CR>
let g:mdip_imgdir = 'static'
let g:mdip_imgname = 'image'
set laststatus=1