nvim: Improve completino menu, add cursor context

Improved completion menu by allowing c-p,c-n scrolling through it.

Removed automatically resizing buffers, use c-w= if you need it.

Added scrolloff, controlling the amount of lines that are always
under/above the cursor. This fixes the cursor being at the very bottom
of the page, after doing e.g. zb or zt and will allow seeing a bit more
information around it at all times.
This commit is contained in:
Marty Oehme 2020-09-24 21:59:38 +02:00
parent b29570327b
commit facaa3e185
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -168,6 +168,29 @@ au BufNewFile,BufRead /dev/shm/pass.?*/?*.txt setlocal noswapfile nobackup nound
au BufNewFile,BufRead $TMPDIR/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo= au BufNewFile,BufRead $TMPDIR/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo=
au BufNewFile,BufRead /tmp/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo= au BufNewFile,BufRead /tmp/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo=
" from https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/init.vim
if has('nvim-0.4')
" make completion menu slightly transparent
set pumblend=17
set wildmode=longest:full
" Makes floating PopUpMenu for completing stuff on the command line.
" Very similar to completing in insert mode.
set wildoptions+=pum
else
set wildmode=longest,list,full
" Vim Galore recommended mappings
" Make next and previous use smart history
cnoremap <C-N> <Up>
cnoremap <C-P> <Down>
end
" turn of automatic resizing of individual splits
set noequalalways
" make sure there's always *some* context below cursor
set scrolloff=5
" }}} " }}}
" KEYBINDINGS {{{ " KEYBINDINGS {{{
" ================================================================================ " ================================================================================