# HG changeset patch # User Steve Losh # Date 1678828660 14400 # Node ID a144ab99193b74a795f6d289d3893237401fee12 # Parent 82dfe29a2f63393d261ec5aa90898cb8503f4e13 More diff -r 82dfe29a2f63 -r a144ab99193b vim/vimrc --- a/vim/vimrc Tue Mar 14 17:15:47 2023 -0400 +++ b/vim/vimrc Tue Mar 14 17:17:40 2023 -0400 @@ -83,9 +83,6 @@ " Save when losing focus au FocusLost * :silent! wall -" Resize splits when the window is resized -" au VimResized * :wincmd = - " Leader let mapleader = "," let maplocalleader = "\\" @@ -213,39 +210,10 @@ " }}} " }}} -" Abbreviations ----------------------------------------------------------- {{{ - -function! EatChar(pat) - let c = nr2char(getchar(0)) - return (c =~ a:pat) ? '' : c -endfunction - -function! MakeSpacelessIabbrev(from, to) - execute "iabbrev ".a:from." ".a:to."=EatChar('\\s')" -endfunction -function! MakeSpacelessBufferIabbrev(from, to) - execute "iabbrev ".a:from." ".a:to."=EatChar('\\s')" -endfunction - -call MakeSpacelessIabbrev('sl/', 'http://stevelosh.com/') -call MakeSpacelessIabbrev('bb/', 'http://bitbucket.org/') -call MakeSpacelessIabbrev('bbs/', 'http://bitbucket.org/sjl/') -call MakeSpacelessIabbrev('gh/', 'http://github.com/') -call MakeSpacelessIabbrev('ghs/', 'http://github.com/sjl/') - -iabbrev ldis ಠ_ಠ -iabbrev lsad ಥ_ಥ -iabbrev lhap ಥ‿ಥ -iabbrev lmis ಠ‿ಠ - -iabbrev c8 CHIP-8 +" Abbreviations & Digraphs ------------------------------------------------ {{{ iabbrev todo TODO -iabbrev sl@ steve@stevelosh.com - -iabbrev spf set -euo pipefail - silent! digr -. 8230 "U+2026=… HORIZONTAL ELLIPSIS silent! digr !, 8816 "U+2270=≰ NEITHER LESS-THAN NOR EQUAL TO silent! digr !. 8817 "U+2271=≱ NEITHER GREATER-THAN NOR EQUAL TO @@ -270,7 +238,6 @@ silent! digr ~~ 8967 "U+2307=⌇ WAVY LINE - " }}} " Convenience mappings ---------------------------------------------------- {{{ @@ -1615,7 +1582,6 @@ au FileType javascript setlocal foldmethod=marker au FileType javascript setlocal foldmarker={,} - au FileType javascript call MakeSpacelessBufferIabbrev('clog', 'console.log();') " Make { insert a pair of brackets in such a way that the cursor is correctly " positioned inside of them AND the following code doesn't get unfolded.