summaryrefslogtreecommitdiffstats
path: root/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/vim.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/dotfiles/vim.lua b/dotfiles/vim.lua
index 2010723..5c46e43 100644
--- a/dotfiles/vim.lua
+++ b/dotfiles/vim.lua
@@ -78,12 +78,13 @@ local mapopts = { noremap = true, silent = true }
78vim.fn["camelcasemotion#CreateMotionMappings"] "<LocalLeader>" 78vim.fn["camelcasemotion#CreateMotionMappings"] "<LocalLeader>"
79 79
80vim.keymap.set("n", "yof", function() 80vim.keymap.set("n", "yof", function()
81 if vim.bo.formatoptions:match "a" then 81 if vim.opt_local.formatoptions:get().a then
82 vim.bo.formatoptions = vim.bo.format:gsub("a", "") 82 vim.opt_local.formatoptions:remove "a"
83 print(":setlocal formatoptions-=a")
83 else 84 else
84 vim.bo.formatoptions = vim.bo.format .. "a" 85 vim.opt_local.formatoptions:append "a"
86 print(":setlocal formatoptions+=a")
85 end 87 end
86 print(":setlocal formatoptions=" .. vim.bo.formatoptions)
87end, mapopts) 88end, mapopts)
88 89
89-- Plugins 90-- Plugins