1
0
Fork 0

vimrc, vimplugrc: welcome back, native vim package management is a nightmare

This commit is contained in:
Von Random 2019-11-11 16:08:59 +03:00
parent 11f4b34bff
commit 7ea408db84
2 changed files with 105 additions and 0 deletions

47
vimplugrc Normal file
View file

@ -0,0 +1,47 @@
" support my own way of using plugins in vim / bash
autocmd BufRead *vimplugrc set ft=vim
" enable plugins
execute 'source' fnameescape(plugdir) . '/vim-plug/plug.vim'
silent!call plug#begin(plugdir)
" plugin manager for self updates
Plug 'junegunn/vim-plug'
" general plugins
Plug 'junegunn/vim-easy-align'
Plug 'lifepillar/vim-solarized8'
Plug 'mhinz/vim-signify'
Plug 'neilhwatson/vim_cf3'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rsi'
Plug 'davidhalter/jedi-vim', {'for': 'python'}
Plug 'w0rp/ale', {'for': ['python', 'sh']}
Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
call plug#end()
" ale
let g:ale_python_flake8_executable = 'python2'
" easy-align
xmap <Leader>a <Plug>(EasyAlign)
nmap <Leader>a <Plug>(EasyAlign)
" vimwiki
let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
" color theme
if $TERM !~ '^linux'
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
let &bg = "light"
let g:solarized_use16 = 1
let g:solarized_italics = 1
let g:solarized_extra_hi_groups = 1
colorscheme solarized8
endif

58
vimrc Normal file
View file

@ -0,0 +1,58 @@
set nobackup nomodeline backspace=indent,eol,start foldmethod=marker cursorline
set list listchars=tab:\|_,nbsp:x,trail:*
set hlsearch incsearch ignorecase smartcase
set scrolloff=3 sidescrolloff=15 sidescroll=1
set tabstop=3 softtabstop=4 shiftwidth=4 smarttab expandtab autoindent
set wildmenu showcmd ruler laststatus=2
set statusline=[%F]\ %R%H%W%M\ %=[%{&fenc}/%{&ff}]\ %y\ [%4l/%L:%3v]
set belloff=all colorcolumn=80 formatoptions+=j relativenumber breakindent
set keymap=russian-jcukenwintype iminsert=0 imsearch=0
set title titlestring=[%{hostname()}]\ %t\ -\ vim
let g:sh_indent_case_labels = 1
let g:netrw_liststyle = 3
let g:netrw_banner = 0
" plugins
let plugrc = expand('$HOME/.vimplugrc')
let plugdir = expand('$HOME/.vim/plugged')
if filereadable(plugrc) && v:version >= 703
execute 'source' fnameescape(plugrc)
endif
if $TERM =~ '^screen'
set t_ts=k t_fs=\
endif
if has('gui_running')
set guifont=Fantasque\ Sans\ Mono\ 11
set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
set guiheadroom=0 guioptions=aeim mouse=a
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
else
set mouse=
endif
syntax on
filetype plugin on
map <Space> <NOP>
let mapleader="\<Space>"
noremap <F1> <Esc>
noremap! <F1> <Esc>
nnoremap <Leader>l :setlocal list!<CR>
nnoremap <Leader>c :setlocal cursorline!<CR>
nnoremap <Leader>w :setlocal wrap!<CR>
noremap <Leader>/ :noh<CR>
noremap <Leader>y "+y
noremap <Leader>d "+d
noremap <Leader>p "+p
noremap <Leader>P "+P
noremap q <NOP>
nnoremap <Leader>q :q<CR>
nnoremap <Leader>s :w<CR>
noremap <Leader>e :Explore<CR>
noremap! <C-@> <C-^>
noremap! <C-Space> <C-^>