From d98459ae4b1b46e381a62f38f177da22b1406f68 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 26 Jul 2021 07:54:07 +0200 Subject: Added vim autocompletion with Tab and Shift-Tab instead of C-n/C-p --- config/vim/vimrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'config/vim/vimrc') diff --git a/config/vim/vimrc b/config/vim/vimrc index 7d2441b..9f5c8fb 100644 --- a/config/vim/vimrc +++ b/config/vim/vimrc @@ -335,3 +335,19 @@ nnoremap ss :setlocal spell! hi link juliaFunctionCall Identifier hi link juliaParDelim Delimiter + +nnoremap gf :vsp + +" from: https://vim.fandom.com/wiki/Autocomplete_with_TAB_when_typing_words + +function! TabOrComplete(direction) + if col('.') > 1 && strpart(getline('.'), col('.') - 2, 3) =~# '^\w' + return a:direction ==# 'next' ? "\" : "\" + else + return "\" + endif +endfunction + +inoremap =TabOrComplete('next') +" st maps Shift-Tab to [Z (and it's discouraged to change it) +inoremap [Z =TabOrComplete('prev') -- cgit From b0dff6afa640cc540114a8d83486d47ce8282b5a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 28 Jul 2021 14:56:22 +0200 Subject: Updated vimrc markdown to auto wrap line, Changing main machine hostname, Added rlwrap XDG dirs complience, Added qutebrowser deepl search engine --- config/vim/vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/vim/vimrc') diff --git a/config/vim/vimrc b/config/vim/vimrc index 9f5c8fb..f815bbd 100644 --- a/config/vim/vimrc +++ b/config/vim/vimrc @@ -270,9 +270,10 @@ augroup vimrc_files " std::cout << ... << std::endl; shortcut autocmd Filetype cpp nnoremap cout istd::cout << << std::endl;2Fr :execute 'silent !pandoc % -o %:r.pdf &' \| redraw! \| echom 'Converting to pdf: ' . expand('%:r') . '.pdf' + autocmd Filetype markdown setlocal textwidth=80 augroup END " }}} -- cgit