Some random changes

This commit is contained in:
2022-12-09 00:23:02 -08:00
parent 3dfaa747ca
commit 4bd0009ae6
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -59,13 +59,13 @@
;; Remove trailing whitespace
(fn remove-trailing-whitespace []
"Remove trailing whitespace from the whole file."
(let [res (pcall vim.cmd "%s/ \\+$//gc")]
(let [res (pcall vim.cmd "%s/ \\+$//")]
(vim.cmd.nohlsearch)
(when (not res)
(print "File is clean"))))
(vim.api.nvim_create_user_command :RemoveTrailingWhitespace
remove-trailing-whitespace {})
(bind! :n :<leader>ws remove-trailing-whitespace)
(hook! [ :BufWritePre ] "*" remove-trailing-whitespace)
;; Spell keybindings
(bind! :n :<leader>l (fn []