From 1eda73ab4ef6c98af657c8d02fca7c78b7fed649 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 15:46:40 +1200 Subject: Blank 'ttymouse' in Vim --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index a33508c6..3a9abd3e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -137,6 +137,9 @@ set splitright " Give me a bit longer to complete mappings set timeoutlen=3000 +" No terminal mouse, even if we could +set ttymouse= + " Wildmenu settings; see also plugin/wildignore.vim set wildmenu " Use wildmenu set wildmode=list:longest " Tab press completes and lists -- cgit v1.2.3 From 126652898c670f89cd6d560c9eec0b4355285a81 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 15:52:34 +1200 Subject: Allow count prefixes for [,] maps --- vim/vimrc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 3a9abd3e..550488b4 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -199,17 +199,17 @@ if exists(':xnoremap') endif " Cycle through argument list -nnoremap [a :previous -nnoremap ]a :next +nnoremap [a :previous +nnoremap ]a :next " Cycle through buffers -nnoremap [b :bprevious -nnoremap ]b :bnext +nnoremap [b :bprevious +nnoremap ]b :bnext " Cycle through quicklist/:helpgrep items -nnoremap [c :cprevious -nnoremap ]c :cnext +nnoremap [c :cprevious +nnoremap ]c :cnext " Cycle through location list items -nnoremap [l :lprevious -nnoremap ]l :lnext +nnoremap [l :lprevious +nnoremap ]l :lnext " Cycle through tabs nnoremap [t :tabprevious nnoremap ]t :tabnext -- cgit v1.2.3 From 40fa4fe5abae544df6d765daca16d09ca540ef68 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 15:53:07 +1200 Subject: Remove superfluous [t,]t maps gt and gT are default and work fine --- vim/vimrc | 3 --- 1 file changed, 3 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 550488b4..75167735 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -210,9 +210,6 @@ nnoremap ]c :cnext " Cycle through location list items nnoremap [l :lprevious nnoremap ]l :lnext -" Cycle through tabs -nnoremap [t :tabprevious -nnoremap ]t :tabnext " Insert blank lines around current line nmap [ (PutBlankLinesAbove) -- cgit v1.2.3 From 90c0d6e95ca39f172764a77741fd5d1f03f748bc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 16:17:18 +1200 Subject: Inline 'undodir' assignment --- vim/vimrc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 75167735..2637170b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -159,10 +159,7 @@ endif " Keep undo files, hopefully in a dedicated directory if has('persistent_undo') set undofile - set undodir^=~/.vim/cache/undo// - if has('win32') || has('win64') - set undodir^=~/vimfiles/cache/undo// - endif + set undodir^=~/.vim/cache/undo//,~/vimfiles/cache/undo// endif " Don't store any options or mappings in sessions -- cgit v1.2.3 From ea99f440c0655d691f7485212219a90156e241d7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 16:51:42 +1200 Subject: Add autocmds to always pop open quickfix/loclist --- vim/vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 2637170b..ab0165c3 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -298,5 +298,14 @@ nnoremap :bdelete " \INS edits a new buffer nnoremap :enew +" Always pop open quickfix and location lists when changed +if exists('##QuickfixCmdPost') + augroup vimrc_quickfix + autocmd! + autocmd QuickfixCmdPost [^l]* cwindow + autocmd QuickfixCmdPost l* lwindow + augroup END +endif + " Source any .vim files from ~/.vim/config runtime! config/*.vim -- cgit v1.2.3 From a57b55af29914625451d257462ca777833026c0a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 23 Jul 2018 17:04:29 +1200 Subject: Remove now-unneeded :lwindow from \. map --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index ab0165c3..747c9c67 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -291,7 +291,7 @@ nnoremap = :call vimrc#Anchor('1G=G') " \+ runs the whole buffer through gq, preserving position nnoremap + :call vimrc#Anchor('1GgqG') " \. runs the configured make program into the location list -nnoremap . :lmake!:lwindow +nnoremap . :lmake! " \DEL deletes the current buffer nnoremap :bdelete -- cgit v1.2.3