done a little vimrc clean-up

* removed redundant (and anyway already commented out) vundle code
    as I use vimplug now
* added vim-gitgutter plugin
* added pdf viewer plugin with on-the-fly pdf-->text conversion
* added deoplete plugin
* added noscrollbind - prevents synchronized scrolling of split windows
This commit is contained in:
surtur 2019-12-12 17:07:26 +01:00
parent edf66cf504
commit 2743610195
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

97
vimrc
View File

@ -1,76 +1,11 @@
set nocompatible
filetype off "required
""set rtp+=~/.vim/bundle/Vundle.vim
""call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"filetype plugin on " required
" let Vundle manage Vundle, required
""Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
"myplugins
"Plugin 'valloric/youcompleteme'
""Plugin 'shougo/neocomplete.vim'
""call vundle#end()
filetype plugin on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3
" Define dictionary.
let g:neocomplete#sources#dictionary#dictionaries = {
\ 'default' : '',
\ 'vimshell' : $HOME.'/.vimshell_hist',
\ 'scheme' : $HOME.'/.gosh_completions'
\ }
" Define keyword.
if !exists('g:neocomplete#keyword_patterns')
let g:neocomplete#keyword_patterns = {}
endif
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
" Recommended key-mappings.
" <CR>: close popup and save indent.
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function()
return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>"
" For no inserting <CR> key.
"return pumvisible() ? "\<C-y>" : "\<CR>"
endfunction
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" Close popup by <Space>. NO, this makes it slow af to type
"inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"
" AutoComplPop like behavior.
let g:neocomplete#enable_auto_select = 0
" Enable omni completion.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
@ -83,7 +18,6 @@ if !exists('g:neocomplete#sources#omni#input_patterns')
let g:neocomplete#sources#omni#input_patterns = {}
endif
""""""""""""""""""""""""""""""""""""
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
@ -93,14 +27,25 @@ endif
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'https://github.com/suan/vim-instant-markdown', {'for': 'markdown'}
Plug 'https://tpope.io/vim/surround.git'
Plug 'https://github.com/tpope/vim-repeat.git'
Plug 'https://github.com/tpope/vim-fugitive.git'
Plug 'https://github.com/suan/vim-instant-markdown', {'for': 'markdown'}
"Plug 'plasticboy/vim-markdown', {'for': 'markdown'}
Plug 'airblade/vim-gitgutter'
Plug 'rhysd/open-pdf.vim'
"Plug 'voldikss/vim-mma'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
call plug#end()
"let g:vim_markdown_new_list_item_indent
let g:gitgutter_terminal_reports_focus=0
"let g:gitgutter_async = 0
let g:pdf_convert_on_edit = 1
let g:pdf_convert_on_read = 1
let g:deoplete#enable_at_startup = 1
" vim-instant-markdown options
let g:instant_markdown_allow_unsafe_content = 1
@ -109,7 +54,6 @@ let g:instant_markdown_browser = "chromium-browser --incognito"
let g:instant_markdown_autoscroll = 1
let g:instant_markdown_autostart = 1
""""""""""""""""""""""""""""""""""""
" change cursor shape for different editing modes, neovim does this by default
if !has('nvim')
@ -179,9 +123,9 @@ augroup vimrc
au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
augroup END
" autosave and load views
au BufWinLeave ?* mkview
au BufWinEnter ?* silent loadview
""" autosave and load views
""au BufWinLeave ?* mkview
""au BufWinEnter ?* silent loadview
au FileType xml setlocal shiftwidth=2 tabstop=2
@ -229,8 +173,8 @@ set autoindent
set backspace=2
set nolist " show/hide tabs and EOL chars (hidden characters)
set number " show/hide line numbers (nu/nonu)
set relativenumber " use relative number
"set number " show/hide line numbers (nu/nonu)
"set relativenumber " use relative number
set confirm " ask confirmation like save before quit.
set wildmenu " Tab completion menu when using command mode
set scrolloff=5 " scroll offset, min lines above/below cursor
@ -249,6 +193,7 @@ set nofoldenable
set encoding=utf-8 " important for powerline besides others
set smartcase " override 'ignorecase' when pattern has upper case characters
set noscrollbind
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>