This website is supported entirely by the generosity of its audience. If you enjoy the ideas and inventions shared here, please consider giving back in the form of a one-time or recurring donation. Any amount you gift is sincerely appreciated! Thank you.—l00sed
January 4 2025 Daniel Tompkins
Find my Neovim dotfiles on GitHub .
Commands
Toggle Wrapped Lines
Same function in VimScript (for Vim)
lua
local M = {}
-- Toggle Wrap
function M.toggle_wrap()
if vim.o.wrap then
vim.o.wrap = false
vim.o.virtualedit = 'all'
else
vim.o.wrap = true
vim.o.virtualedit = ''
vim.o.display = 'lastline'
end
end
return M

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.