From f59a23b334474c4ae2f53da775d4d0054beff4e2 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 5 Sep 2020 01:50:38 -0400 Subject: .vimrc: Use execute shorthand --- .vimrc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index a54b526..ca85225 100644 --- a/.vimrc +++ b/.vimrc @@ -156,9 +156,9 @@ nmap mm :Maps nmap ma :Marks " Search documentation under cursor -nmap dm :execute ':term ++close fzf-man ' . expand('') -nmap di :execute ':term ++close fzf-doc ' . expand('') -nmap dt :execute ':term dict -h localhost -d dict-moby-thesaurus-latest ' . expand('') +nmap dm :exe ':term ++close fzf-man ' . expand('') +nmap di :exe ':term ++close fzf-doc ' . expand('') +nmap dt :exe ':term dict -h localhost -d dict-moby-thesaurus-latest ' . expand('') " View function documentation nmap dp :call fzf#run({'options': ['--preview', 'echo doc {} \| psysh \| fold -s -w 80'], 'source': "psysh-doc", 'sink': ':term psysh-doc', 'down': '50%'}) @@ -168,7 +168,7 @@ nmap jl :norm yaW \| :Jump " Load and save sessions nmap sl :source ~/.vim/sessions/session.vim \| :source ~/.vimrc -nmap ss :silent! exec "!~/.vim/hooks/pre-session-save && notify-send 'Vim session saved.'" \| :mksession! ~/.vim/sessions/session.vim \| :redraw! +nmap ss :silent! exe "!~/.vim/hooks/pre-session-save && notify-send 'Vim session saved.'" \| :mksession! ~/.vim/sessions/session.vim \| :redraw! " Toggle Spell Check nmap sp :set spell! @@ -195,7 +195,7 @@ nmap re gg=G nmap ra :set all& \| :source ~/.vimrc \| :e " Toggle color column -nmap cv :execute "set colorcolumn=" . (&colorcolumn == "" ? "80" : "") +nmap cv :exe "set colorcolumn=" . (&colorcolumn == "" ? "80" : "") " Toggle cursor column nmap cx :set cursorcolumn! @@ -210,7 +210,7 @@ nmap ob :BLines nmap op :History nmap oc :History: nmap ol :Locate -nmap ot :execute '! urxvt -cd ' . expand('%:p:h') . ' &' +nmap ot :exe '! urxvt -cd ' . expand('%:p:h') . ' &' nmap of :call fzf#run({'options': [], 'source': "cat $FZF_FILE_MARKS", 'sink': 'e', 'down': '20%'}):pwd nmap od :call fzf#run({'options': ['--preview', 'ls {}'], 'source': "cut -d' ' -f3 $FZF_DIRECTORY_MARKS", 'sink': 'cd', 'down': '20%'}):pwd nmap oo :call fzf#run({'options': ['--preview', 'highlight -O ansi --force {}'], 'source': 'rg --files --hidden \|\| find . -type f -printf "%P\n"', 'sink': 'e', 'down': '20%'}) @@ -267,7 +267,7 @@ function s:repl(start, end, language) call term_sendkeys(g:terminal_buffer, a:language . "; exit" . "\") wincmd p elseif bufwinnr(g:terminal_buffer) == -1 - exec 'sbuffer ' . g:terminal_buffer + exe 'sbuffer ' . g:terminal_buffer wincmd p endif call term_sendkeys(g:terminal_buffer, join(getline(a:start, a:end), "\") . "\") @@ -333,7 +333,7 @@ augroup AutoCommands " Automatically save file on insert and idle. autocmd InsertLeave,CursorHold * silent! write - \| silent! exec "!~/.vim/hooks/post-save > /dev/null 2>&1 &" + \| silent! exe "!~/.vim/hooks/post-save > /dev/null 2>&1 &" \| :echo @% '[filetype=' . &filetype . ']' augroup END -- cgit v1.2.3