diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 01:04:39 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 01:04:39 +1200 |
commit | 3e4750136708c9a557ef62d7547ee10653733cbc (patch) | |
tree | 2727ed315402f3121aa3e6cec159c59535baeaf1 | |
parent | Merge branch 'release/v5.14.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-5.15.0.tar.gz (sig) dotfiles-5.15.0.zip |
Merge branch 'release/v5.15.0'v5.15.0
* release/v5.15.0:
Update vim-write-mkpath to v1.1.0
Update vim-write-mkpath to v1.0.0
Update vim-insert-cancel to v6.0.1
Adjust code layout of long strong assignment
Move execution mappings into relevant filetypes
Shorten filetype.vim load guard
Alter structure of scripts.vim slightly
Update vim-cursorline-current to v1.0.0
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/after/ftplugin/sh.vim | 4 | ||||
-rw-r--r-- | vim/after/ftplugin/vim.vim | 21 | ||||
m--------- | vim/bundle/cursorline_current | 0 | ||||
m--------- | vim/bundle/insert_cancel | 0 | ||||
m--------- | vim/bundle/write_mkpath | 0 | ||||
-rw-r--r-- | vim/filetype.vim | 10 | ||||
-rw-r--r-- | vim/scripts.vim | 3 | ||||
-rw-r--r-- | vim/vimrc | 9 |
9 files changed, 24 insertions, 27 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v5.14.0 -Thu May 30 04:50:44 UTC 2019 +tejr dotfiles v5.15.0 +Fri May 31 13:04:38 UTC 2019 diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 0327db78..8468b133 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -44,3 +44,7 @@ nnoremap <buffer> <LocalLeader>l \ :<C-U>compiler shellcheck<CR> let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>c' \ . '|nunmap <buffer> <LocalLeader>l' + +" ,! executes line with 'shell' +nnoremap <buffer> <LocalLeader>! ^"zyg_:!<C-R>z<CR> +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>!' diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim index 5b4d0f95..30182bba 100644 --- a/vim/after/ftplugin/vim.vim +++ b/vim/after/ftplugin/vim.vim @@ -26,12 +26,11 @@ let &l:path = &runtimepath . ',' . &path " matches e.g. an opening "function" with the first "return" within, which I " don't like if exists('loaded_matchit') - let b:match_words = - \ '\<fu\%[nction]\>:\<endf\%[unction]\>,' . - \ '\<\(wh\%[ile]\|for\)\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' . - \ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' . - \ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' . - \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' + let b:match_words = '\<fu\%[nction]\>:\<endf\%[unction]\>,' + \ . '\<\(wh\%[ile]\|for\)\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' + \ . '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' + \ . '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' + \ . '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' endif " Stop here if the user doesn't want ftplugin mappings @@ -43,3 +42,13 @@ endif nnoremap <buffer> <LocalLeader>K \ :<C-U>helpgrep <cword><CR> let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K' + +" ,@ executes line in normal mode +nnoremap <buffer> <LocalLeader>@ + \ ^"zyg_@z +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>@' + +" ,: executes line in command mode +nnoremap <buffer> <LocalLeader>: + \ ^"zyg_:<C-R>z<CR> +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>:' diff --git a/vim/bundle/cursorline_current b/vim/bundle/cursorline_current -Subproject 1db91b7e90801021f11fb1ff4f5917e6df04d3d +Subproject bfb65858ea696cf1ed5ad2c8ed6d2174c28a780 diff --git a/vim/bundle/insert_cancel b/vim/bundle/insert_cancel -Subproject 607c2638b0fa94e8bd4a5db5e7757a060d7db09 +Subproject 934a1a2b26429a859fd940433751fc6b1defa3c diff --git a/vim/bundle/write_mkpath b/vim/bundle/write_mkpath -Subproject 2a712d8b119d993bfcd74575f0c4131280e4fea +Subproject 6255e5fae6a29cda2bf1abf7bcfad1818ec2529 diff --git a/vim/filetype.vim b/vim/filetype.vim index 8d0251b4..848637dd 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -1,15 +1,9 @@ -" Override system filetype.vim if sufficiently new -if exists('did_load_filetypes') || v:version < 700 +" Override system filetype.vim if sufficiently new and not 'compatible' +if exists('did_load_filetypes') || v:version < 700 || &compatible finish endif let did_load_filetypes = 1 -" If we don't have +autocmd or are 'compatible', do nothing, and don't try -" again later -if !has('autocmd') || &compatible - finish -endif - " Use our own filetype detection rules augroup filetypedetect autocmd! diff --git a/vim/scripts.vim b/vim/scripts.vim index 31b980f2..3c3c53cd 100644 --- a/vim/scripts.vim +++ b/vim/scripts.vim @@ -8,10 +8,9 @@ let s:line = getline(1) " If it's not a shebang, we're done if s:line !~# '^#!' finish -endif " AWK -if s:line =~# '\<[gm]\=awk\d*\>' +elseif s:line =~# '\<[gm]\=awk\d*\>' setfiletype awk " Perl 5 @@ -449,15 +449,6 @@ nnoremap <Leader><Insert> :<C-U>enew<CR> " \TAB toggles 'autoindent' nnoremap <Leader><Tab> :<C-U>setlocal autoindent! autoindent?<CR> -" Execution mappings; each of these clobbers register z - -" \@ executes line in normal mode -nnoremap <Leader>@ ^"zyg_@z -" \: executes line in command mode -nnoremap <Leader>: ^"zyg_:<C-R>z<CR> -" \! executes line with 'shell' -nnoremap <Leader>! ^"zyg_:!<C-R>z<CR> - " Things I almsot always type wrnog inoreabbrev almsot almost inoreabbrev wrnog wrong |