diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/default-config.lua | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/lua/default-config.lua b/lua/default-config.lua index 01b3ff83..cd49c136 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -292,4 +292,11 @@ require("lv-utils").define_augroups {      -- will cause split windows to be resized evenly if main window is resized      {'VimResized ', '*', 'wincmd ='},    }, +  _mode_switching = { +    -- will switch between absolute and relative line numbers depending on mode +    {'InsertEnter', '*', 'if &relativenumber | let g:ms_relativenumberoff = 1 | setlocal number norelativenumber | endif'}, +    {'InsertLeave', '*', 'if exists("g:ms_relativenumberoff") | setlocal relativenumber | endif'}, +    {'InsertEnter', '*', 'if &cursorline | let g:ms_cursorlineoff = 1 | setlocal nocursorline | endif'}, +    {'InsertLeave', '*', 'if exists("g:ms_cursorlineoff") | setlocal cursorline | endif'}, +  },  } | 
