diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-09-17 21:21:20 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-09-17 21:21:20 +1200 |
commit | 24ceebd754b26e2762371de25163e15841568259 (patch) | |
tree | 694168219e24567eff0a4e7071d820e6b1ec134f /vim/vimrc | |
parent | Merge branch 'release/v10.8.0' into develop (diff) | |
download | dotfiles-24ceebd754b26e2762371de25163e15841568259.tar.gz dotfiles-24ceebd754b26e2762371de25163e15841568259.zip |
Move plugin-dependent config to vim/after files
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 52 |
1 files changed, 1 insertions, 51 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Mon, 14 Sep 2020 02:28:57 UTC +" Last updated: Thu, 17 Sep 2020 09:18:45 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -801,15 +801,6 @@ set noshowcmd " set shortmess+=I -" We’ll only use the old 'showmatch' method of a brief jump to the matching -" bracket under the cursor if the much-preferred matchparen.vim standard -" plugin doesn’t look like it’s going to load, whether because plugins have -" been disabled, or it’s not in any of the plugin directories. -" -if !plugin#Ready('matchparen') - set showmatch matchtime=3 -endif - " I find the defaults of new windows opening above or to the left of the " previous window too jarring, because I’m used to both the i3 window manager " and the tmux terminal multiplexer doing it the other way around, in reading @@ -1052,47 +1043,6 @@ nnoremap <expr> <Space> \ ? "\<PageDown>" \ : ":\<C-U>next\<CR>" -" I hate CTRL-C’s default insert mode behavior. It ends the insert session -" without firing the InsertLeave event for automatic command hooks. Why would -" anyone want that? It breaks plugins that hinge on mirrored functionality -" between the InsertEnter and InsertLeave events, and doesn’t otherwise differ -" from Escape or :stopinsert. Even worse, people think it’s a *synonym* for -" Escape, and use it because it’s easier to reach than the Escape key or -" CTRL-[. Terrible! -" -" Instead, I apply a custom plugin named insert_cancel.vim to make it cancel -" the current insert operation; that is, if the buffer has changed at all -" since the start of the insert operation, pressing CTRL-C will reverse it, -" while ending insert mode and firing InsertLeave as normal. This makes way -" more sense to me, and I use it all the time now. -" -" <https://sanctum.geek.nz/cgit/vim-insert-cancel.git/about/> -" -" You might think on a first look, as I did, that a plugin is overkill, and -" that a mapping like this would be all that’s required: -" -" :inoremap <C-C> <Esc>u -" -" Indeed, it *mostly* works, but there are some subtle problems with it. The -" primary issue is that if you didn’t make any changes during the insert mode -" session that you’re terminating, it *still* reverses the previous change, -" which will be something else entirely that you probably *didn’t* mean to be -" undone. The plugin’s way of working around this and the other shortcomings -" of the simple mapping above is not too much more complicated, but it was not -" easy to figure out. -" -" At any rate, we only want to establish the mapping if we can expect the -" plugin to load, so test that 'loadplugins' is set and that the plugin file -" exists with the expected filename. -" -" If the plugin isn’t available, I just abandon CTRL-C to continue its -" uselessness. -" -if plugin#Ready('insert_cancel') - imap <C-C> - \ <Plug>(InsertCancel) -endif - " I often can’t remember (or guess) digraph codes, and want to look up how to " compose a specific character that I can name, at least in part. The table " in ‘:help digraph-table’ is what to use for that situation, and it solves |