From 0d68d51ed1580f198a80da50273a1de9e8b64c90 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 2 Jan 2022 10:26:14 +0000 Subject: [PATCH] feat(nvim): add a mapping for wrapping text --- nvim/.config/nvim/lua/opdavies/options.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nvim/.config/nvim/lua/opdavies/options.lua b/nvim/.config/nvim/lua/opdavies/options.lua index 7758b68..6acc43a 100644 --- a/nvim/.config/nvim/lua/opdavies/options.lua +++ b/nvim/.config/nvim/lua/opdavies/options.lua @@ -29,6 +29,10 @@ local function set_key_mappings() map('n', 'so', ':luafile ~/.config/nvim/init.lua', options) + -- Format paragraphs to an 80 character line length. + map('n', 'g', 'gqap', options) + map('x', 'g', 'gqa', options) + -- Make the current file executable map('n', 'x', ':!chmod +x %', options) @@ -91,6 +95,7 @@ local function set_vim_o() syntax = 'on', tabstop = 2, termguicolors = true, + textwidth = 0, updatetime = 1000, wrap = true, }